[EGIT] [core/efl] master 01/01: selection: delete callbacks when the manager is deleted

2018-01-16 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit e625c9b8307175f68725abf067518670b36a3263
Author: Thiep Ha 
Date:   Wed Jan 17 09:22:13 2018 +0900

selection: delete callbacks when the manager is deleted

If the selection manager is deleted before the drop objects
are deleted, we need to remove callbacks in its destructor.

Thank @herdsman for reporting this.
---
 src/lib/elementary/efl_selection_manager.c | 31 +-
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/efl_selection_manager.c 
b/src/lib/elementary/efl_selection_manager.c
index 1acd8c2af8..6405ea3923 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -282,21 +282,17 @@ _tmpinfo_free(Tmp_Info *info)
return 0;
 }
 
-static void
-_all_drop_targets_cbs_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, 
void *info EINA_UNUSED)
+static inline void
+_drop_target_cbs_del(Efl_Selection_Manager_Data *pd, Sel_Manager_Dropable 
*dropable, Efl_Object *obj)
 {
-   Efl_Selection_Manager_Data *pd = data;
-   Sel_Manager_Dropable *dropable = NULL;
-
-   if (!pd) return;
-   dropable = efl_key_data_get(obj, "__elm_dropable");
if (dropable)
  {
 Drop_Format *df;
 while (dropable->format_list)
   {
  df = EINA_INLIST_CONTAINER_GET(dropable->format_list, 
Drop_Format);
- efl_selection_manager_drop_target_del(pd->sel_man, obj, 
df->format, dropable->seat);
+ efl_selection_manager_drop_target_del(pd->sel_man, obj,
+   df->format, dropable->seat);
  // If drop_target_del() happened to delete dropabale, then
  // re-fetch it each loop to make sure it didn't
  dropable = efl_key_data_get(obj, "__elm_dropable");
@@ -306,6 +302,17 @@ _all_drop_targets_cbs_del(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj, voi
 }
 
 static void
+_all_drop_targets_cbs_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, 
void *info EINA_UNUSED)
+{
+   Efl_Selection_Manager_Data *pd = data;
+   Sel_Manager_Dropable *dropable = NULL;
+
+   if (!pd) return;
+   dropable = efl_key_data_get(obj, "__elm_dropable");
+   _drop_target_cbs_del(pd, dropable, obj);
+}
+
+static void
 _dropable_coords_adjust(Sel_Manager_Dropable *dropable, Eina_Position2D *pos)
 {
Ecore_Evas *ee;
@@ -370,7 +377,7 @@ _drag_cancel_animate(void *data, double pos)
 Ecore_X_Window xdragwin = _x11_xwin_get(seat_sel->drag_win);
 ecore_x_window_ignore_set(xdragwin, 0);
 #endif
-ERR("Delete drag_win");
+sel_debug("Delete drag_win");
 evas_object_del(seat_sel->drag_win);
 seat_sel->drag_win = NULL;
 return ECORE_CALLBACK_CANCEL;
@@ -5214,7 +5221,13 @@ static void
 _efl_selection_manager_efl_object_destructor(Eo *obj, 
Efl_Selection_Manager_Data *pd)
 {
Sel_Manager_Seat_Selection *seat_sel;
+   Eina_List *l;
+   Sel_Manager_Dropable *dropable;
 
+   EINA_LIST_FOREACH(pd->drop_list, l, dropable)
+ {
+_drop_target_cbs_del(pd, dropable, dropable->obj);
+ }
 #ifdef HAVE_ELEMENTARY_X
ecore_event_handler_del(pd->notify_handler);
ecore_event_handler_del(pd->clear_handler);

-- 




[EGIT] [core/efl] master 01/01: selection_dnd: fix warnings in clang

2018-01-15 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 07e7bbd4b5cc17bbf8c1e48e500396e66f98120e
Author: Thiep Ha 
Date:   Tue Jan 16 16:33:30 2018 +0900

selection_dnd: fix warnings in clang

Fix warnings about type convert and vars init in clang and remove comments.
---
 src/lib/elementary/efl_selection.c | 12 +++-
 src/lib/elementary/efl_selection_manager.c | 12 ++--
 src/lib/elementary/efl_ui_dnd.c| 27 ++-
 src/lib/elementary/efl_ui_dnd_container.eo |  6 ++
 4 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/src/lib/elementary/efl_selection.c 
b/src/lib/elementary/efl_selection.c
index cbbe98286c..84f81a89c4 100644
--- a/src/lib/elementary/efl_selection.c
+++ b/src/lib/elementary/efl_selection.c
@@ -165,8 +165,8 @@ _selection_data_ready_cb(void *data, Efl_Object *obj, 
Efl_Selection_Data *seldat
 ddata.len = seldata->data.len;
 ddata.x = seldata->pos.x;
 ddata.y = seldata->pos.y;
-ddata.format = seldata->format;
-ddata.action = seldata->action;
+ddata.format = (Elm_Sel_Format)seldata->format;
+ddata.action = (Elm_Xdnd_Action)seldata->action;
 wdata->datacb(wdata->udata, obj, &ddata);
 free(ddata.data);
 }
@@ -216,7 +216,8 @@ elm_cnp_selection_get(const Evas_Object *obj, Elm_Sel_Type 
type,
 #endif
wdata->udata = udata;
wdata->datacb = datacb;
-   efl_selection_manager_selection_get(sel_man, (Evas_Object *)obj, type, 
format,
+   efl_selection_manager_selection_get(sel_man, (Evas_Object *)obj, 
(Efl_Selection_Type)type,
+   (Efl_Selection_Format)format,
wdata, _selection_data_ready_cb, NULL, 
seatid);
return EINA_TRUE;
 }
@@ -238,7 +239,8 @@ elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type type,
 #ifdef HAVE_ELEMENTARY_WL2
seatid = _wl_default_seat_id_get(obj);
 #endif
-   f = efl_selection_manager_selection_set(sel_man, obj, type, format, data, 
seatid);
+   f = efl_selection_manager_selection_set(sel_man, obj, 
(Efl_Selection_Type)type,
+   (Efl_Selection_Format)format, data, 
seatid);
 
ldata->obj = obj;
ldata->type = type;
@@ -256,7 +258,7 @@ elm_object_cnp_selection_clear(Evas_Object *obj, 
Elm_Sel_Type type)
 #ifdef HAVE_ELEMENTARY_WL2
seatid = _wl_default_seat_id_get(obj);
 #endif
-   efl_selection_manager_selection_clear(sel_man, obj, type, seatid);
+   efl_selection_manager_selection_clear(sel_man, obj, 
(Efl_Selection_Type)type, seatid);
 
return EINA_TRUE;
 }
diff --git a/src/lib/elementary/efl_selection_manager.c 
b/src/lib/elementary/efl_selection_manager.c
index db7cc5cfca..ed543ef172 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -882,7 +882,7 @@ _efl_sel_manager_x11_selection_notify(void *udata, int type 
EINA_UNUSED, void *e
  else
{
   sel_debug("Drop on container");
-  Eina_Position2D pos, posret;
+  Eina_Position2D pos, posret = {0, 0};
   evas_object_geometry_get(dropable->obj, 
&pos.x, &pos.y, NULL, NULL);
   //get item
   pos = 
EINA_POSITION2D(seat_sel->saved_types->pos.x + pos.x,
@@ -1490,7 +1490,7 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, 
Sel_Manager_Dropable *d
}
  else
{
-  Eina_Position2D posret;
+  Eina_Position2D posret = {0, 0};
   Efl_Object *it = NULL;
 
   if (dropable->item_func)
@@ -1563,7 +1563,7 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, 
Sel_Manager_Dropable *d
}
  else
{
-  Eina_Position2D posret;
+  Eina_Position2D posret = {0, 0};
   Efl_Object *it = NULL;
   if (dropable->item_func)
 it = dropable->item_func(dropable->item_func_data, 
dropable->obj,
@@ -1907,7 +1907,7 @@ found:
   //for container
   Efl_Object *it = NULL;
   Evas_Coord x0 = 0, y0 = 0;
-  Eina_Position2D pos, posret;
+  Eina_Position2D pos, posret = {0, 0};
 
   evas_object_geometry_get(dropable->obj, &x0, &y0, NULL, 
NULL);
   pos = EINA_POSITION2D(seat_sel->saved_types->pos.x + x0,
@@ -4393,9 +4393,9 @@ _abort_drag(Evas_Object *obj EINA_UNUSED, 
Sel_Manager_Drag_Container *dc)
 }
 
 static void
-_c

[EGIT] [core/efl] master 01/01: eolian_cxx: support multiple function pointers

2018-01-12 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 360ce182efa373598b39225a8458f8e36d110fe1
Author: Thiep Ha 
Date:   Fri Jan 12 18:45:13 2018 +0900

eolian_cxx: support multiple function pointers
---
 src/lib/eolian_cxx/grammar/converting_argument.hpp | 4 ++--
 src/lib/eolian_cxx/grammar/klass_def.hpp   | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/converting_argument.hpp 
b/src/lib/eolian_cxx/grammar/converting_argument.hpp
index c419d36b7c..6975743520 100644
--- a/src/lib/eolian_cxx/grammar/converting_argument.hpp
+++ b/src/lib/eolian_cxx/grammar/converting_argument.hpp
@@ -35,8 +35,8 @@ struct converting_argument_generator
  attributes::qualifier_def qualifier = 
param.type.original_type.visit(attributes::get_qualifier_visitor{});
  if (param.type.original_type.visit(this->is_function_ptr))
{
-  // FIXME: This supports only one function pointer.
-  return as_generator("fw->data_to_c(), fw->func_to_c(), 
fw->free_to_c()")
+  return as_generator("fw_" << param.param_name << "->data_to_c(), 
fw_" << param.param_name << "->func_to_c(), fw_"
+  << param.param_name << "->free_to_c()")
 .generate(sink, param, ctx);
}
  else
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp 
b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 16d15b6f24..baaa61382e 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -703,7 +703,6 @@ struct function_def
 
   std::vector opening_statements() const
   {
- // FIXME: Supports only one function pointer
  std::vector statements;
  char template_typename = 'F';
  for (auto const& param : this->parameters)
@@ -714,7 +713,7 @@ struct function_def
 {
char typenam[2] = { 0, };
typenam[0] = template_typename++;
-   std::string statement = "auto fw = new 
::efl::eolian::function_wrapper<";
+   std::string statement = "auto fw_" + param.param_name + " = new 
::efl::eolian::function_wrapper<";
statement += param.type.c_type + ", " + typenam + ">(" + 
param.param_name + ");";
statements.push_back(statement);
 }

-- 




[EGIT] [core/efl] master 02/05: selection: add efl_selection interface

2018-01-11 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit f191d6821f0fd94389dc92c8353b769eaacad28a
Author: Thiep Ha 
Date:   Tue Jan 9 15:34:12 2018 +0900

selection: add efl_selection interface

Efl_Selection is the object interface for selection api of elm_cnp.
It allows get, set, clear, check selection.
---
 src/Makefile_Elementary.am |  2 +
 src/lib/elementary/Elementary.h|  1 +
 src/lib/elementary/efl_selection.c | 62 ++
 src/lib/elementary/efl_selection.eo| 45 ++
 src/lib/elementary/efl_selection_manager.c |  4 +-
 src/lib/elementary/efl_ui_widget.eo|  2 +-
 6 files changed, 113 insertions(+), 3 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index b1ac2657ae..a1712eca5e 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -97,6 +97,7 @@ elm_public_eolian_files = \
lib/elementary/efl_access_window.eo \
lib/elementary/efl_config_global.eo \
lib/elementary/elm_code_widget.eo \
+   lib/elementary/efl_selection.eo \
$(NULL)
 
 # More public files -- FIXME
@@ -761,6 +762,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/efl_ui_scroll_manager.c \
lib/elementary/efl_ui_pan.c \
lib/elementary/efl_selection_manager.c \
+   lib/elementary/efl_selection.c \
$(NULL)
 
 
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index b5c58c77f7..2e5e4cb5b7 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -324,6 +324,7 @@ EAPI extern Elm_Version *elm_version;
 # include "efl_selection_types.eot.h"
 # include "efl_ui_dnd_types.eot.h"
 # include 
+# include "efl_selection.eo.h"
 #endif
 
 /* include deprecated calls last of all */
diff --git a/src/lib/elementary/efl_selection.c 
b/src/lib/elementary/efl_selection.c
new file mode 100644
index 00..9f086e340e
--- /dev/null
+++ b/src/lib/elementary/efl_selection.c
@@ -0,0 +1,62 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+
+#define EFL_SELECTION_MANAGER_BETA
+
+#include 
+#include "elm_priv.h"
+
+#define MY_CLASS EFL_SELECTION_MIXIN
+#define MY_CLASS_NAME "Efl.Selection"
+
+static inline Eo*
+_selection_manager_get(Eo *obj)
+{
+   Eo *top = elm_widget_top_get(obj);
+   if (!top)
+ {
+top = obj;
+ }
+   Eo *sel_man = efl_key_data_get(top, "__selection_manager");
+   if (!sel_man)
+ {
+sel_man = efl_add(EFL_SELECTION_MANAGER_CLASS, top);
+efl_key_data_set(top, "__selection_manager", sel_man);
+ }
+   return sel_man;
+}
+
+EOLIAN static void
+_efl_selection_selection_get(Eo *obj, void *pd EINA_UNUSED, Efl_Selection_Type 
type, Efl_Selection_Format format,
+ void *data_func_data, 
Efl_Selection_Data_Ready data_func, Eina_Free_Cb data_func_free_cb, unsigned 
int seat)
+{
+   Eo *sel_man = _selection_manager_get(obj);
+   efl_selection_manager_selection_get(sel_man, obj, type, format,
+   data_func_data, data_func,
+   data_func_free_cb, seat);
+}
+
+EOLIAN static Eina_Future *
+_efl_selection_selection_set(Eo *obj, void *pd EINA_UNUSED, Efl_Selection_Type 
type, Efl_Selection_Format format, Eina_Slice data, unsigned int seat)
+{
+   Eo *sel_man = _selection_manager_get(obj);
+   return efl_selection_manager_selection_set(sel_man, obj, type, format, 
data, seat);
+}
+
+EOLIAN static void
+_efl_selection_selection_clear(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Type type, unsigned int seat)
+{
+   Eo *sel_man = _selection_manager_get(obj);
+   efl_selection_manager_selection_clear(sel_man, obj, type, seat);
+}
+
+EOLIAN static Eina_Bool
+_efl_selection_has_owner(Eo *obj, void *pd EINA_UNUSED, Efl_Selection_Type 
type, unsigned int seat)
+{
+Eo *sel_man = _selection_manager_get(obj);
+return efl_selection_manager_selection_has_owner(sel_man, obj, type, seat);
+}
+
+
+#include "efl_selection.eo.c"
diff --git a/src/lib/elementary/efl_selection.eo 
b/src/lib/elementary/efl_selection.eo
new file mode 100644
index 00..2f836567a1
--- /dev/null
+++ b/src/lib/elementary/efl_selection.eo
@@ -0,0 +1,45 @@
+import efl_selection_types;
+
+mixin Efl.Selection {
+   [[Efl Selection class]]
+   data: null;
+   methods {
+  selection_set {
+ [[Set the selection data to the object]]
+ params {
+@in type: Efl.Selection.Type; [[Selection Type]]
+@in format: Efl.Selection.Format; [[Selection Format]]
+@in data: Eina.Slice;
+@in seat: uint;[[Specified seat for multiple seats case.]]
+ }
+ return: ptr(Eina.Future); [[Future for tracking w

[EGIT] [core/efl] master 04/05: dnd: add efl_ui_dnd_container

2018-01-11 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 35339504b0db553083abeccd0bf5c1dcd05b4acc
Author: Thiep Ha 
Date:   Tue Jan 9 16:37:27 2018 +0900

dnd: add efl_ui_dnd_container

efl_ui_dnd_container is the interface of dnd for container objects.
---
 src/Makefile_Elementary.am |  1 +
 src/lib/elementary/Elementary.h|  1 +
 src/lib/elementary/efl_ui_dnd.c| 67 +++---
 src/lib/elementary/efl_ui_dnd_container.eo | 50 ++
 src/lib/elementary/elm_config.c| 21 ++
 src/lib/elementary/elm_config.h| 19 +
 src/lib/elementary/elm_priv.h  |  2 +
 7 files changed, 155 insertions(+), 6 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index c000a86fd3..75204582fe 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -99,6 +99,7 @@ elm_public_eolian_files = \
lib/elementary/elm_code_widget.eo \
lib/elementary/efl_selection.eo \
lib/elementary/efl_ui_dnd.eo \
+   lib/elementary/efl_ui_dnd_container.eo \
$(NULL)
 
 # More public files -- FIXME
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index a9cdb945c9..36057bdcea 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -326,6 +326,7 @@ EAPI extern Elm_Version *elm_version;
 # include 
 # include 
 # include 
+# include 
 #endif
 
 /* include deprecated calls last of all */
diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c
index 761abfe474..731229d121 100644
--- a/src/lib/elementary/efl_ui_dnd.c
+++ b/src/lib/elementary/efl_ui_dnd.c
@@ -13,6 +13,12 @@
 #include 
 #include "elm_priv.h"
 
+typedef struct _Efl_Ui_Dnd_Container_Data Efl_Ui_Dnd_Container_Data;
+struct _Efl_Ui_Dnd_Container_Data
+{
+unsigned int drag_delay_time;
+};
+
 extern int _wl_default_seat_id_get(Evas_Object *obj);
 
 static inline Eo*
@@ -37,7 +43,6 @@ _efl_ui_dnd_drag_start(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Format forma
Efl_Selection_Action action, void *icon_func_data, 
Efl_Dnd_Drag_Icon_Create icon_func, Eina_Free_Cb icon_func_free_cb,
unsigned int seat)
 {
-   ERR("In");
Eo *sel_man = _selection_manager_get(obj);
efl_selection_manager_drag_start(sel_man, obj, format, data, action,
 icon_func_data, icon_func, 
icon_func_free_cb,
@@ -47,7 +52,6 @@ _efl_ui_dnd_drag_start(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Format forma
 EOLIAN static void
 _efl_ui_dnd_drag_cancel(Eo *obj, void *pd EINA_UNUSED, unsigned int seat)
 {
-   ERR("In");
Eo *sel_man = _selection_manager_get(obj);
efl_selection_manager_drag_cancel(sel_man, obj, seat);
 }
@@ -55,7 +59,6 @@ _efl_ui_dnd_drag_cancel(Eo *obj, void *pd EINA_UNUSED, 
unsigned int seat)
 EOLIAN static void
 _efl_ui_dnd_drag_action_set(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Action action, unsigned int seat)
 {
-   ERR("In");
Eo *sel_man = _selection_manager_get(obj);
efl_selection_manager_drag_action_set(sel_man, obj, action, seat);
 }
@@ -64,8 +67,6 @@ _efl_ui_dnd_drag_action_set(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Action
 EOLIAN static void
 _efl_ui_dnd_drop_target_add(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Format format, unsigned int seat)
 {
-   ERR("In");
-
Eo *sel_man = _selection_manager_get(obj);
efl_selection_manager_drop_target_add(sel_man, obj, format, seat);
 }
@@ -73,9 +74,63 @@ _efl_ui_dnd_drop_target_add(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Format
 EOLIAN static void
 _efl_ui_dnd_drop_target_del(Eo *obj, void *pd EINA_UNUSED, 
Efl_Selection_Format format, unsigned int seat)
 {
-   ERR("In");
Eo *sel_man = _selection_manager_get(obj);
efl_selection_manager_drop_target_del(sel_man, obj, format, seat);
 }
 
+EOLIAN static double
+_efl_ui_dnd_container_drag_delay_time_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Dnd_Container_Data *pd)
+{
+return pd->drag_delay_time;
+}
+
+EOLIAN static void
+_efl_ui_dnd_container_drag_delay_time_set(Eo *obj EINA_UNUSED, 
Efl_Ui_Dnd_Container_Data *pd, double drag_delay_time)
+{
+pd->drag_delay_time = drag_delay_time;
+}
+
+EOLIAN static void
+_efl_ui_dnd_container_drag_item_add(Eo *obj, Efl_Ui_Dnd_Container_Data *pd,
+void *data_func_data, 
Efl_Dnd_Drag_Data_Get data_func, Eina_Free_Cb data_func_free_cb,
+void *item_func_data, Efl_Dnd_Item_Get 
item_func, Eina_Free_Cb item_func_free_cb,
+void *icon_func_data, 
Efl_Dnd_Drag_Icon_Create icon_func, Eina_Free_Cb icon_func_free_cb,
+void *icon_list_func_data, 
Efl_Dnd_Drag_Ico

[EGIT] [core/efl] master 03/05: dnd: add efl_ui_dnd

2018-01-11 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit e6ab4b41ed8487bf93c5a174a7b06317c2b7e824
Author: Thiep Ha 
Date:   Tue Jan 9 16:22:49 2018 +0900

dnd: add efl_ui_dnd

Efl_Ui_Dnd is the interface for drag and drop of elm_cnp.
---
 src/Makefile_Elementary.am |  2 +
 src/lib/elementary/Elementary.h|  7 +--
 src/lib/elementary/efl_selection_manager.c | 56 ++---
 src/lib/elementary/efl_ui_dnd.c| 81 ++
 src/lib/elementary/efl_ui_dnd.eo   | 62 +++
 src/lib/elementary/efl_ui_widget.eo|  2 +-
 6 files changed, 176 insertions(+), 34 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index a1712eca5e..c000a86fd3 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -98,6 +98,7 @@ elm_public_eolian_files = \
lib/elementary/efl_config_global.eo \
lib/elementary/elm_code_widget.eo \
lib/elementary/efl_selection.eo \
+   lib/elementary/efl_ui_dnd.eo \
$(NULL)
 
 # More public files -- FIXME
@@ -763,6 +764,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/efl_ui_pan.c \
lib/elementary/efl_selection_manager.c \
lib/elementary/efl_selection.c \
+   lib/elementary/efl_ui_dnd.c \
$(NULL)
 
 
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 2e5e4cb5b7..a9cdb945c9 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -321,10 +321,11 @@ EAPI extern Elm_Version *elm_version;
 # include 
 # include 
 # include 
-# include "efl_selection_types.eot.h"
-# include "efl_ui_dnd_types.eot.h"
+# include 
+# include 
 # include 
-# include "efl_selection.eo.h"
+# include 
+# include 
 #endif
 
 /* include deprecated calls last of all */
diff --git a/src/lib/elementary/efl_selection_manager.c 
b/src/lib/elementary/efl_selection_manager.c
index 6aaf9d8eed..91cc4a6149 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -864,7 +864,7 @@ _efl_sel_manager_x11_selection_notify(void *udata, int type 
EINA_UNUSED, void *e
 if (df->format & dropable->last.format)
   {
  sel_debug("calling Drop event on: 
%p", dropable->obj);
- 
//efl_event_callback_call(dropable->obj, EFL_UI_DND_EVENT_DRAG_DROP, &ddata);
+ 
efl_event_callback_call(dropable->obj, EFL_UI_DND_EVENT_DRAG_DROP, &ddata);
   }
}
   }
@@ -1221,7 +1221,7 @@ _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, 
void *event)
}
   }
 if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
-//efl_event_callback_call(seat_sel->drag_obj, 
EFL_UI_DND_EVENT_DRAG_DONE, NULL);
+efl_event_callback_call(seat_sel->drag_obj, 
EFL_UI_DND_EVENT_DRAG_DONE, NULL);
 if (seat_sel->drag_win)
   {
  if (seat_sel->drag_obj)
@@ -1275,7 +1275,7 @@ _x11_drag_move(void *data, Ecore_X_Xdnd_Position *pos)
dp.pos.y = pos->position.y;
dp.action = seat_sel->drag_action;
//for drag side
-   //efl_event_callback_call(seat_sel->drag_obj, EFL_UI_DND_EVENT_DRAG_POS, 
&dp);
+   efl_event_callback_call(seat_sel->drag_obj, EFL_UI_DND_EVENT_DRAG_POS, &dp);
 }
 
 static void
@@ -1310,7 +1310,7 @@ _x11_dnd_status(void *data, int etype EINA_UNUSED, void 
*ev)
  {
 sel_debug("Won't accept accept\n");
  }
-   //efl_event_callback_call(seat_sel->drag_obj, EFL_UI_DND_EVENT_DRAG_ACCEPT, 
&seat_sel->accept);
+   efl_event_callback_call(seat_sel->drag_obj, EFL_UI_DND_EVENT_DRAG_ACCEPT, 
&seat_sel->accept);
 
return EINA_TRUE;
 }
@@ -1500,10 +1500,8 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data *pd, 
Sel_Manager_Dropable *d
  pos_data.action = action;
  EINA_INLIST_FOREACH_SAFE(dropable->format_list, itr, df)
{
-if (df->format & dropable->last.format)
-  {
- //efl_event_callback_call(dropable->obj, 
EFL_UI_DND_EVENT_DRAG_POS, &pos_data);
-  }
+  if (df->format & dropable->last.format)
+efl_event_callback_call(dropable->obj, 
EFL_UI_DND_EVENT_DRAG_POS, &pos_data);
}
   }
 else
@@ -1519,13 +1517,13 @@ _x11_dnd_dropable_handle(Efl_Selection_Manager_Data 
*pd, Sel_Manager_Dropable *d
   Drop_For

[EGIT] [core/efl] efl-1.20 17/47: doc: add missing parameters and fix references for some elm widgets

2017-11-07 Thread Thiep Ha
raster pushed a commit to branch efl-1.20.

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

commit 960e6d3c05cd60fdf8656f778abac8f6ac7dccb4
Author: Thiep Ha 
Date:   Tue Oct 24 15:13:07 2017 +0900

doc: add missing parameters and fix references for some elm widgets
---
 src/lib/elementary/elm_button.h| 12 ++--
 src/lib/elementary/elm_calendar.h  |  4 ++--
 src/lib/elementary/elm_check.h |  4 ++--
 src/lib/elementary/elm_colorselector.h |  4 ++--
 src/lib/elementary/elm_config.h|  3 +++
 src/lib/elementary/elm_conform.h   |  4 ++--
 src/lib/elementary/elm_entry.h |  6 +++---
 src/lib/elementary/elm_entry_legacy.h  |  2 ++
 src/lib/elementary/elm_layout.h| 14 +++---
 9 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/src/lib/elementary/elm_button.h b/src/lib/elementary/elm_button.h
index f8396a730c..49053e54f1 100644
--- a/src/lib/elementary/elm_button.h
+++ b/src/lib/elementary/elm_button.h
@@ -15,11 +15,11 @@
  * This is a push-button. Press it and run some function. It can contain
  * a simple label and icon object and it also has an autorepeat feature.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for button objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * @li "clicked": the user clicked the button (press/release).
  * @li "repeated": the user pressed the button without releasing it.
  * @li "pressed": button was pressed.
@@ -34,11 +34,11 @@
  * @li default: a normal button.
  * @li anchor: Like default, but the button fades away when the mouse is not
  * over it, leaving only the text or icon.
- * @li hoversel_vertical: Internally used by @ref Hoversel to give a
+ * @li hoversel_vertical: Internally used by @ref Elm_Hoversel to give a
  * continuous look across its options.
- * @li hoversel_vertical_entry: Another internal for @ref Hoversel.
- * @li naviframe: Internally used by @ref Naviframe for its back button.
- * @li colorselector: Internally used by @ref Colorselector
+ * @li hoversel_vertical_entry: Another internal for @ref Elm_Hoversel.
+ * @li naviframe: Internally used by @ref Elm_Naviframe for its back button.
+ * @li colorselector: Internally used by @ref Elm_Colorselector
  * for its left and right buttons.
  *
  * Default content parts of the button widget that you can use for are:
diff --git a/src/lib/elementary/elm_calendar.h 
b/src/lib/elementary/elm_calendar.h
index f0fc828a7b..f67daf5ee2 100644
--- a/src/lib/elementary/elm_calendar.h
+++ b/src/lib/elementary/elm_calendar.h
@@ -17,11 +17,11 @@
  * - setting the day names of the week (e.g. "Thu" or "Thursday")
  * - setting the year and month format.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for calendar objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * - @c "changed" - emitted when the date in the calendar is changed.
  * - @c "display,changed" - emitted when the current month displayed in the
  * calendar is changed.
diff --git a/src/lib/elementary/elm_check.h b/src/lib/elementary/elm_check.h
index 6004ca1de6..0cf6b821c7 100644
--- a/src/lib/elementary/elm_check.h
+++ b/src/lib/elementary/elm_check.h
@@ -23,11 +23,11 @@
  * like the radio objects, you can set a pointer to a boolean directly
  * with elm_check_state_pointer_set() for it to modify.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for check objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * - @c "changed" - This is called whenever the user changes the state of
  * the check objects (@p event_info is always @c NULL).
  * - @c "focused" - When the check has received focus. (since 1.8)
diff --git a/src/lib/elementary/elm_colorselector.h 
b/src/lib/elementary/elm_colorselector.h
index ffce041334..bc13bc4cf2 100644
--- a/src/lib/elementary/elm_colorselector.h
+++ b/src/lib/elementary/elm_colorselector.h
@@ -15,11 +15,11 @@
  * can be picked by user from the color set by clicking on individual
  * color item on the palette or by selecting it from selector.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for check objects.
  *
  * This widget emits the following signals, besides the ones sent from
-

[EGIT] [core/efl] efl-1.20 16/47: doc: enable elementary_examples building

2017-11-07 Thread Thiep Ha
raster pushed a commit to branch efl-1.20.

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

commit 203a238fbea58beffab8f33b13ad382a31c1df38
Author: Thiep Ha 
Date:   Tue Oct 24 12:09:19 2017 +0900

doc: enable elementary_examples building

The elementary examples were built before, but not now.
I guess it was missed when we merged elementary to efl source tree.
This enables it and fixes some references.
---
 doc/Doxyfile.in |  3 ++-
 doc/elementary_examples.dox | 30 +++---
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 50470a8d2d..e2a6742652 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -609,7 +609,8 @@ INPUT  = @top_srcdir@/src/lib \
  @srcdir@/ephysics_examples.dox \
  @srcdir@/edje_examples.dox \
  @top_srcdir@/src/bin/edje/edje_cc_handlers.c \
- @srcdir@/emotion_examples.dox
+ @srcdir@/emotion_examples.dox \
+ @srcdir@/elementary_examples.dox
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/doc/elementary_examples.dox b/doc/elementary_examples.dox
index 8be745e752..af37ae2c62 100644
--- a/doc/elementary_examples.dox
+++ b/doc/elementary_examples.dox
@@ -396,7 +396,7 @@
  *
  * To be able to create our actionsliders we need to do some setup, but this
  * isn't really relevant here, so if you want to know about that go @ref
- * Win "here".
+ * Elm_Win "here".
  *
  * With all that boring stuff out of the way we can proceed to creating some
  * actionsliders.@n
@@ -915,7 +915,7 @@
   *
   * Keeping any of those four buttons pressed will trigger their autorepeat
   * callback, where we move the button doing some size hint magic. To
-  * understand how that works better, refer to the @ref Box documentation.
+  * understand how that works better, refer to the @ref Elm_Box documentation.
   * Also, the first time the function is called, we change the icon in the
   * middle button, using elm_object_content_unset() first to keep the reference
   * to the previous one, so we don't need to recreate it when we are done
@@ -3170,7 +3170,7 @@
 /**
  * @page layout_example_01 Layout - Content, Table and Box
  *
- * This example shows how one can use the @ref Layout widget to create a
+ * This example shows how one can use the @ref Elm_Layout widget to create a
  * customized distribution of widgets on the screen, controlled by an Edje 
theme.
  * The full source code for this example can be found at @ref
  * layout_example_01_c.
@@ -3247,7 +3247,7 @@
  * of putting them in row, column, both, or any other available layout. This is
  * also described in the Edje documentation.
  *
- * This box area is similar to the @ref Box widget of elementary, with the
+ * This box area is similar to the @ref Elm_Box widget of elementary, with the
  * difference that its position and properties are controlled by the theme of 
the
  * layout. It also contains more than one API to add items to it, since the
  * items position now is defined in terms of a list of items, not a matrix.
@@ -3314,7 +3314,7 @@
 /**
  * @page layout_example_02 Layout - Predefined Layout
  *
- * This example shows how one can use the @ref Layout with a predefined theme
+ * This example shows how one can use the @ref Elm_Layout with a predefined 
theme
  * layout to add a back and next button to a simple window. The full source 
code
  * for this example can be found at @ref layout_example_02_c.
  *
@@ -3424,7 +3424,7 @@
  * middle positions. In the middle position we are placing a button that when
  * clicked will hide the hover. We are also going to use a non-default theme
  * for our hover. We won't explain the functioning of button for that see @ref
- * Button.
+ * Elm_Button.
  *
  * We start our example with a couple of callbacks that show and hide the data
  * they're given(which we'll see later on is the hover widget):
@@ -3479,7 +3479,7 @@
   * green). Our example will allow the user to choose the animation the flip
   * uses and to interact with it. To allow the user to choose the interaction
   * mode we use radio buttons, we will however not explain them, if you would
-  * like to know more about radio buttons see @ref Radio.
+  * like to know more about radio buttons see @ref Elm_Radio.
   *
   * We start our example with the usual setup and then create the 2 rectangles
   * we will use in our flip:
@@ -4430,11 +4430,11 @@
 /**
  * @page entry_example Entry - Example of simple editing
  *
- * As a general overview of @ref Entry we are going to write an, albeit simple,
+ * As a general overview of @ref Elm_Entry we are going to write an, albeit 
simple,
  *

[EGIT] [core/efl] master 01/02: doc: enable elementary_examples building

2017-10-23 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 4642fe2f649a45ad0e242fc803b683e7436f4f29
Author: Thiep Ha 
Date:   Tue Oct 24 12:09:19 2017 +0900

doc: enable elementary_examples building

The elementary examples were built before, but not now.
I guess it was missed when we merged elementary to efl source tree.
This enables it and fixes some references.
---
 doc/Doxyfile.in |  3 ++-
 doc/elementary_examples.dox | 30 +++---
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 50470a8d2d..e2a6742652 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -609,7 +609,8 @@ INPUT  = @top_srcdir@/src/lib \
  @srcdir@/ephysics_examples.dox \
  @srcdir@/edje_examples.dox \
  @top_srcdir@/src/bin/edje/edje_cc_handlers.c \
- @srcdir@/emotion_examples.dox
+ @srcdir@/emotion_examples.dox \
+ @srcdir@/elementary_examples.dox
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/doc/elementary_examples.dox b/doc/elementary_examples.dox
index 8be745e752..af37ae2c62 100644
--- a/doc/elementary_examples.dox
+++ b/doc/elementary_examples.dox
@@ -396,7 +396,7 @@
  *
  * To be able to create our actionsliders we need to do some setup, but this
  * isn't really relevant here, so if you want to know about that go @ref
- * Win "here".
+ * Elm_Win "here".
  *
  * With all that boring stuff out of the way we can proceed to creating some
  * actionsliders.@n
@@ -915,7 +915,7 @@
   *
   * Keeping any of those four buttons pressed will trigger their autorepeat
   * callback, where we move the button doing some size hint magic. To
-  * understand how that works better, refer to the @ref Box documentation.
+  * understand how that works better, refer to the @ref Elm_Box documentation.
   * Also, the first time the function is called, we change the icon in the
   * middle button, using elm_object_content_unset() first to keep the reference
   * to the previous one, so we don't need to recreate it when we are done
@@ -3170,7 +3170,7 @@
 /**
  * @page layout_example_01 Layout - Content, Table and Box
  *
- * This example shows how one can use the @ref Layout widget to create a
+ * This example shows how one can use the @ref Elm_Layout widget to create a
  * customized distribution of widgets on the screen, controlled by an Edje 
theme.
  * The full source code for this example can be found at @ref
  * layout_example_01_c.
@@ -3247,7 +3247,7 @@
  * of putting them in row, column, both, or any other available layout. This is
  * also described in the Edje documentation.
  *
- * This box area is similar to the @ref Box widget of elementary, with the
+ * This box area is similar to the @ref Elm_Box widget of elementary, with the
  * difference that its position and properties are controlled by the theme of 
the
  * layout. It also contains more than one API to add items to it, since the
  * items position now is defined in terms of a list of items, not a matrix.
@@ -3314,7 +3314,7 @@
 /**
  * @page layout_example_02 Layout - Predefined Layout
  *
- * This example shows how one can use the @ref Layout with a predefined theme
+ * This example shows how one can use the @ref Elm_Layout with a predefined 
theme
  * layout to add a back and next button to a simple window. The full source 
code
  * for this example can be found at @ref layout_example_02_c.
  *
@@ -3424,7 +3424,7 @@
  * middle positions. In the middle position we are placing a button that when
  * clicked will hide the hover. We are also going to use a non-default theme
  * for our hover. We won't explain the functioning of button for that see @ref
- * Button.
+ * Elm_Button.
  *
  * We start our example with a couple of callbacks that show and hide the data
  * they're given(which we'll see later on is the hover widget):
@@ -3479,7 +3479,7 @@
   * green). Our example will allow the user to choose the animation the flip
   * uses and to interact with it. To allow the user to choose the interaction
   * mode we use radio buttons, we will however not explain them, if you would
-  * like to know more about radio buttons see @ref Radio.
+  * like to know more about radio buttons see @ref Elm_Radio.
   *
   * We start our example with the usual setup and then create the 2 rectangles
   * we will use in our flip:
@@ -4430,11 +4430,11 @@
 /**
  * @page entry_example Entry - Example of simple editing
  *
- * As a general overview of @ref Entry we are going to write an, albeit simple,
+ * As a general overview of @ref Elm_Entry we are going to write an, albeit 
simple,
  * fun

[EGIT] [core/efl] master 02/02: doc: add missing parameters and fix references for some elm widgets

2017-10-23 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 0258ac77b05de2c8fecf0ec22ccaaf6f814383c0
Author: Thiep Ha 
Date:   Tue Oct 24 15:13:07 2017 +0900

doc: add missing parameters and fix references for some elm widgets
---
 src/lib/elementary/elm_button.h| 12 ++--
 src/lib/elementary/elm_calendar.h  |  4 ++--
 src/lib/elementary/elm_check.h |  4 ++--
 src/lib/elementary/elm_colorselector.h |  4 ++--
 src/lib/elementary/elm_config.h|  3 +++
 src/lib/elementary/elm_conform.h   |  4 ++--
 src/lib/elementary/elm_entry.h |  6 +++---
 src/lib/elementary/elm_entry_legacy.h  |  2 ++
 src/lib/elementary/elm_layout.h| 14 +++---
 9 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/src/lib/elementary/elm_button.h b/src/lib/elementary/elm_button.h
index f8396a730c..49053e54f1 100644
--- a/src/lib/elementary/elm_button.h
+++ b/src/lib/elementary/elm_button.h
@@ -15,11 +15,11 @@
  * This is a push-button. Press it and run some function. It can contain
  * a simple label and icon object and it also has an autorepeat feature.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for button objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * @li "clicked": the user clicked the button (press/release).
  * @li "repeated": the user pressed the button without releasing it.
  * @li "pressed": button was pressed.
@@ -34,11 +34,11 @@
  * @li default: a normal button.
  * @li anchor: Like default, but the button fades away when the mouse is not
  * over it, leaving only the text or icon.
- * @li hoversel_vertical: Internally used by @ref Hoversel to give a
+ * @li hoversel_vertical: Internally used by @ref Elm_Hoversel to give a
  * continuous look across its options.
- * @li hoversel_vertical_entry: Another internal for @ref Hoversel.
- * @li naviframe: Internally used by @ref Naviframe for its back button.
- * @li colorselector: Internally used by @ref Colorselector
+ * @li hoversel_vertical_entry: Another internal for @ref Elm_Hoversel.
+ * @li naviframe: Internally used by @ref Elm_Naviframe for its back button.
+ * @li colorselector: Internally used by @ref Elm_Colorselector
  * for its left and right buttons.
  *
  * Default content parts of the button widget that you can use for are:
diff --git a/src/lib/elementary/elm_calendar.h 
b/src/lib/elementary/elm_calendar.h
index f0fc828a7b..f67daf5ee2 100644
--- a/src/lib/elementary/elm_calendar.h
+++ b/src/lib/elementary/elm_calendar.h
@@ -17,11 +17,11 @@
  * - setting the day names of the week (e.g. "Thu" or "Thursday")
  * - setting the year and month format.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for calendar objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * - @c "changed" - emitted when the date in the calendar is changed.
  * - @c "display,changed" - emitted when the current month displayed in the
  * calendar is changed.
diff --git a/src/lib/elementary/elm_check.h b/src/lib/elementary/elm_check.h
index 6004ca1de6..0cf6b821c7 100644
--- a/src/lib/elementary/elm_check.h
+++ b/src/lib/elementary/elm_check.h
@@ -23,11 +23,11 @@
  * like the radio objects, you can set a pointer to a boolean directly
  * with elm_check_state_pointer_set() for it to modify.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for check objects.
  *
  * This widget emits the following signals, besides the ones sent from
- * @ref Layout:
+ * @ref Elm_Layout :
  * - @c "changed" - This is called whenever the user changes the state of
  * the check objects (@p event_info is always @c NULL).
  * - @c "focused" - When the check has received focus. (since 1.8)
diff --git a/src/lib/elementary/elm_colorselector.h 
b/src/lib/elementary/elm_colorselector.h
index ffce041334..bc13bc4cf2 100644
--- a/src/lib/elementary/elm_colorselector.h
+++ b/src/lib/elementary/elm_colorselector.h
@@ -15,11 +15,11 @@
  * can be picked by user from the color set by clicking on individual
  * color item on the palette or by selecting it from selector.
  *
- * This widget inherits from the @ref Layout one, so that all the
+ * This widget inherits from the @ref Elm_Layout one, so that all the
  * functions acting on it also work for check objects.
  *
  * This widget emits the following signals, besides the ones sent from
-

[EGIT] [core/efl] master 01/02: textpath: get the right size of text object

2017-10-17 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 65a87eb575408bc316c778d1d6cd88696cbb117b
Author: Thiep Ha 
Date:   Wed Oct 18 10:51:04 2017 +0900

textpath: get the right size of text object

Recent change to use EINA_SIZE2D made the size be gotten incorrectly.
This corrects it.
---
 src/lib/elementary/efl_ui_textpath.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/efl_ui_textpath.c 
b/src/lib/elementary/efl_ui_textpath.c
index 7019f59348..5d4678d0b8 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -77,17 +77,18 @@ _deg_to_rad(double angle)
 static void
 _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, int w1, int w2, int cmp, 
Evas_Map *map, Eina_Bezier bezier)
 {
-   int x = 0, y = 0, w = 0, h = 0;
int i, len, seg_len;
double u0, u1, v0, v1;
double dist, t, dt;
double px, py, px2, py2;
double rad;
+   Eina_Rect r;
Eina_Vector2 vec, nvec, vec0, vec1, vec2, vec3;
Eina_Matrix2 mat;
 
len = w2 - w1;
-   EINA_SIZE2D(w, h) = efl_gfx_size_get(pd->text_obj);
+   r = efl_gfx_geometry_get(pd->text_obj);
+
seg_len = eina_bezier_length_get(&bezier);
if (pd->autofit)
  dt = len / (seg_len * (double) slice_no);
@@ -108,7 +109,7 @@ _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, int 
w1, int w2, int cmp, E
 
eina_vector2_transform(&vec, &mat, &nvec);
eina_vector2_normalize(&nvec, &vec);
-   eina_vector2_scale(&vec, &nvec, ((double) h) * 0.5);
+   eina_vector2_scale(&vec, &nvec, ((double) r.h) * 0.5);
 
vec1.x = (vec.x + px);
vec1.y = (vec.y + py);
@@ -134,23 +135,23 @@ _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, int 
w1, int w2, int cmp, E
 eina_vector2_normalize(&nvec, &vec);
 eina_vector2_transform(&vec, &mat, &nvec);
 eina_vector2_normalize(&nvec, &vec);
-eina_vector2_scale(&vec, &nvec, ((double) h) * 0.5);
+eina_vector2_scale(&vec, &nvec, ((double) r.h) * 0.5);
 
 vec1.x = (vec.x + px);
 vec1.y = (vec.y + py);
 vec2.x = (-vec.x + px);
 vec2.y = (-vec.y + py);
 
-evas_map_point_coord_set(map, cmp + i * 4, (int) vec0.x + x, (int) 
vec0.y + y, 0);
-evas_map_point_coord_set(map, cmp + i * 4 + 1, (int) vec1.x + x, (int) 
vec1.y + y, 0);
-evas_map_point_coord_set(map, cmp + i * 4 + 2, (int) vec2.x + x, (int) 
vec2.y + y, 0);
-evas_map_point_coord_set(map, cmp + i * 4 + 3, (int) vec3.x + x, (int) 
vec3.y + y, 0);
+evas_map_point_coord_set(map, cmp + i * 4, (int) vec0.x + r.x, (int) 
vec0.y + r.y, 0);
+evas_map_point_coord_set(map, cmp + i * 4 + 1, (int) vec1.x + r.x, 
(int) vec1.y + r.y, 0);
+evas_map_point_coord_set(map, cmp + i * 4 + 2, (int) vec2.x + r.x, 
(int) vec2.y + r.y, 0);
+evas_map_point_coord_set(map, cmp + i * 4 + 3, (int) vec3.x + r.x, 
(int) vec3.y + r.y, 0);
 
 //UV
 u0 = w1 + i * dist;
 u1 = u0 + dist;
 v0 = (double) 0;
-v1 = (double) h;
+v1 = (double) r.h;
 
 evas_map_point_image_uv_set(map, cmp + i * 4, u0, v0);
 evas_map_point_image_uv_set(map, cmp + i * 4 + 1, u1, v0);

-- 




[EGIT] [core/efl] master 02/02: edje: correct the usage of EINA_SIZE2D

2017-10-17 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 6597b89f53abf99719cbc2bc06d9daa61b08ca94
Author: Thiep Ha 
Date:   Wed Oct 18 10:51:49 2017 +0900

edje: correct the usage of EINA_SIZE2D

The usage of EINA_SIZE2D macro as left hand side variable
does not save the size value. The Eina_Size2D should be used.
---
 src/lib/edje/edje_calc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index fc71bad49a..5a01da863f 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2116,7 +2116,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
  {
 const char *text;
 const char *font;
-Evas_Coord tw, th;
+Eina_Size2D ts;
 int inlined_font = 0;
 Edje_Real_Part *source, *text_source;
 
@@ -2247,33 +2247,33 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
 
  evas_obj_text_style_set(ep->object, style);
  evas_obj_text_set(ep->object, text);
- EINA_SIZE2D(tw, th) = efl_gfx_size_get(ep->object);
+ ts = efl_gfx_size_get(ep->object);
  if (chosen_desc->text.max_x)
{
   int l, r;
   evas_object_text_style_pad_get(ep->object, &l, &r, NULL, 
NULL);
-  mw = tw + l + r;
+  mw = ts.w + l + r;
   if ((*maxw < 0) || (mw < *maxw)) *maxw = mw;
}
  if (chosen_desc->text.max_y)
{
   int t, b;
   evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, 
&b);
-  mh = th + t + b;
+  mh = ts.h + t + b;
   if ((*maxh < 0) || (mh < *maxh)) *maxh = mh;
}
  if (chosen_desc->text.min_x)
{
   int l, r;
   evas_object_text_style_pad_get(ep->object, &l, &r, NULL, 
NULL);
-  mw = tw + l + r;
+  mw = ts.w + l + r;
   if (mw > *minw) *minw = mw;
}
  if (chosen_desc->text.min_y)
{
   int t, b;
   evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, 
&b);
-  mh = th + t + b;
+  mh = ts.h + t + b;
   if (mh > *minh) *minh = mh;
}
   }

-- 




[EGIT] [core/efl] master 03/08: elm cnp/Wl: Remove duplicated data send callback

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 8796e938a349087ddb4fb4d8aa2f2941ffdb862c
Author: Thiep Ha 
Date:   Tue May 3 09:44:16 2016 +

elm cnp/Wl: Remove duplicated data send callback

If we do drag & drop and then do copy & paste, both _wl_selection_send
and _wl_dnd_send are called for one action (dnd or cnp). It is reduntdant.
We only need one callback to handle two cases dnd and cnp.
---
 src/lib/elementary/elm_cnp.c | 104 ---
 1 file changed, 38 insertions(+), 66 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 61dac7d..5e9ca60 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2458,7 +2458,6 @@ static Eina_Bool _wl_dnd_position(void *data EINA_UNUSED, 
int type EINA_UNUSED,
 static Eina_Bool _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event);
 /* static Eina_Bool _wl_dnd_offer(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event); */
 
-static Eina_Bool _wl_dnd_send(void *data, int type EINA_UNUSED, void *event);
 static Eina_Bool _wl_dnd_receive(void *data, int type EINA_UNUSED, void 
*event);
 static Eina_Bool _wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event EINA_UNUSED);
 static void _wl_dropable_data_handle(Wl_Cnp_Selection *sel, 
Ecore_Wl2_Event_Selection_Data_Ready *ev);
@@ -3063,20 +3062,50 @@ _wl_elm_cnp_selection_clear(Evas_Object *obj, 
Elm_Sel_Type selection EINA_UNUSED
 }
 
 static Eina_Bool
-_wl_selection_send(void *udata, int type EINA_UNUSED, void *event)
+_wl_selection_send(void *data, int type EINA_UNUSED, void *event)
 {
char *buf;
int ret, len_remained;
int len_written = 0;
-   Wl_Cnp_Selection *sel = udata;
-   Ecore_Wl2_Event_Data_Source_Send *ev = event;
+   Wl_Cnp_Selection *sel;
+   Ecore_Wl2_Event_Data_Source_Send *ev;
+   void *data_ret = NULL;
+   int len_ret = 0;
+   int i = 0;
 
_wl_elm_cnp_init();
+   cnp_debug("In\n");
+   ev = event;
+   sel = data;
 
-   len_remained = sel->buflen;
-   buf = sel->selbuf;
+   for (i = 0; i < CNP_N_ATOMS; i++)
+ {
+if (!strcmp(_atoms[i].name, ev->type))
+  {
+ cnp_debug("Found a type: %s\n", _atoms[i].name);
+ Dropable *drop;
+ drop = eo_key_data_get(sel->requestwidget, "__elm_dropable");
+ if (drop)
+   drop->last.type = _atoms[i].name;
+ if (_atoms[i].wl_converter)
+   {
+  _atoms[i].wl_converter(ev->type, sel, sel->selbuf,
+ sel->buflen, &data_ret, &len_ret);
+   }
+ else
+   {
+  data_ret = strdup(sel->selbuf);
+  len_ret = sel->buflen;
+   }
+ break;
+  }
+ }
+
+   len_remained = len_ret;
+   buf = data_ret;
+   cnp_debug("write: %s", buf);
 
-   while (len_written < sel->buflen)
+   while (len_written < len_ret)
  {
 ret = write(ev->fd, buf, len_remained);
 if (ret == -1) break;
@@ -3084,6 +3113,7 @@ _wl_selection_send(void *udata, int type EINA_UNUSED, 
void *event)
 len_written += ret;
 len_remained -= ret;
  }
+   free(data_ret);
 
close(ev->fd);
return ECORE_CALLBACK_PASS_ON;
@@ -3204,8 +3234,7 @@ _wl_elm_dnd_init(void)
 
text_uri = eina_stringshare_add("text/uri-list");
 
-   ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
-   _wl_dnd_send, &wl_cnp_selection);
+   _wl_elm_cnp_init();
ecore_event_handler_add(ECORE_WL2_EVENT_SELECTION_DATA_READY,
_wl_dnd_receive, &wl_cnp_selection);
 
@@ -3635,63 +3664,6 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event)
 }
 
 static Eina_Bool
-_wl_dnd_send(void *data, int type EINA_UNUSED, void *event)
-{
-   char *buf;
-   int ret, len_remained;
-   int len_written = 0;
-   Wl_Cnp_Selection *sel;
-   Ecore_Wl2_Event_Data_Source_Send *ev;
-   void *data_ret = NULL;
-   int len_ret = 0;
-   int i = 0;
-
-   cnp_debug("In\n");
-   ev = event;
-   sel = data;
-
-   for (i = 0; i < CNP_N_ATOMS; i++)
- {
-if (!strcmp(_atoms[i].name, ev->type))
-  {
- cnp_debug("Found a type: %s\n", _atoms[i].name);
- Dropable *drop;
- drop = eo_key_data_get(sel->requestwidget, "__elm_dropable");
- if (drop)
-   drop->last.type = _atoms[i].name;
- if (_atoms[i].wl_converter)
-   {
-  _atoms[i].wl_converter(ev->type, sel, sel->selbuf,
- sel->buflen, &data_ret, &len_ret);
-   

[EGIT] [core/efl] master 04/08: elm cnp/Wl: set selection for all data types

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit ae1b2a124fcb8fb2d7a53e9b578b8cb846f09e8a
Author: Thiep Ha 
Date:   Tue May 3 09:49:14 2016 +

elm cnp/Wl: set selection for all data types

Currently, not all selection data types are set.
This patch sets selection for all suitable types that we supported.
---
 src/lib/elementary/elm_cnp.c | 73 +++-
 1 file changed, 51 insertions(+), 22 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 5e9ca60..ab0951e 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2470,6 +2470,21 @@ static Ecore_Wl2_Window *_wl_elm_widget_window_get(const 
Evas_Object *obj);
 static Evas * _wl_evas_get_from_win(unsigned int win);
 
 static Eina_Bool
+_wl_is_uri_type_data(const char *data, int len)
+{
+   char *p;
+   if (len < 6) return EINA_FALSE;
+
+   p = (char *)data;
+   if (!p) return EINA_FALSE;
+   if (strncmp(p, "file:/", 6))
+ {
+if (*p != '/') return EINA_FALSE;
+ }
+   return EINA_TRUE;
+}
+
+static Eina_Bool
 _wl_targets_converter(char *target, Wl_Cnp_Selection *sel EINA_UNUSED, void 
*data EINA_UNUSED, int size EINA_UNUSED, void **data_ret, int *size_ret)
 {
cnp_debug("in\n");
@@ -2912,6 +2927,10 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type 
selection, Elm_Sel_Form
 
if (selbuf)
  {
+int i = 0, count = 0;
+Eina_Bool is_uri = EINA_FALSE;
+const char **types;
+
 if (format & ELM_SEL_FORMAT_IMAGE)
   {
  /* FIXME */
@@ -2927,36 +2946,46 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, 
Elm_Sel_Type selection, Elm_Sel_Form
   }
 else
   {
- const char *types[10] = {0, };
- int i = -1;
+ free(sel->selbuf);
+ sel->buflen = buflen;
+ sel->selbuf = strdup((char*)selbuf);
+  }
 
- if ((format & ELM_SEL_FORMAT_MARKUP) ||
- (format & ELM_SEL_FORMAT_TEXT))
+is_uri = _wl_is_uri_type_data(selbuf, buflen);
+types = malloc(sizeof(char *));
+if (!types) return EINA_FALSE;
+for (i = 0, count = 1; i < CNP_N_ATOMS; i++)
+  {
+ if (format & _atoms[i].formats)
{
-  types[++i] = "application/x-elementary-markup";
-  types[++i] = "text/plain";
-  types[++i] = "text/plain;charset=utf-8";
-   }
+  if ((is_uri) || ((!is_uri) &&
+   strcmp(_atoms[i].name, "text/uri-list")))
+{
+   const char **t = NULL;
 
- if (format & ELM_SEL_FORMAT_HTML)
-   {
-  types[++i] = "text/html";
-  types[++i] = "text/html;charset=utf-8";
+   types[count - 1] = _atoms[i].name;
+   count++;
+   t = realloc(types, sizeof(char *) * count);
+   if (!t)
+ {
+free(types);
+return EINA_FALSE;
+ }
+   types = t;
+}
}
+  }
+types[count - 1] = 0;
 
- if (i < 0) return EINA_FALSE;
-
- ecore_wl2_dnd_selection_set(ecore_wl2_window_input_get(win), 
types);
+ecore_wl2_dnd_selection_set(ecore_wl2_window_input_get(win), types);
 
- free(sel->selbuf);
- sel->buflen = buflen;
- sel->selbuf = strdup((char*)selbuf);
-
- return EINA_TRUE;
-  }
+free(types);
+return EINA_TRUE;
  }
else
- sel->selbuf = NULL;
+ {
+sel->selbuf = NULL;
+ }
 
return EINA_FALSE;
 }

-- 




[EGIT] [core/efl] master 08/08: elm entry: remove unused funtions

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 2e68debe7b6853dff2d58e1fa89ba7939708871f
Author: Thiep Ha 
Date:   Tue May 3 15:05:42 2016 +

elm entry: remove unused funtions

The _elm_entry_entry_paste is removed from elm_cnp.c.
It is unused now. We can remove it and related function.
---
 src/lib/elementary/elm_entry.c | 74 --
 src/lib/elementary/elm_priv.h  |  3 --
 2 files changed, 77 deletions(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 6a31b5d..d193a53 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -1358,80 +1358,6 @@ _hover_selected_cb(void *data,
  elm_widget_scroll_hold_push(data);
 }
 
-static char *
-_item_tags_remove(const char *str)
-{
-   char *ret;
-   Eina_Strbuf *buf;
-
-   if (!str)
- return NULL;
-
-   buf = eina_strbuf_new();
-   if (!buf)
- return NULL;
-
-   if (!eina_strbuf_append(buf, str))
- {
-eina_strbuf_free(buf);
-return NULL;
- }
-
-   while (EINA_TRUE)
- {
-const char *temp = eina_strbuf_string_get(buf);
-char *start_tag = NULL;
-char *end_tag = NULL;
-size_t sindex;
-size_t eindex;
-
-start_tag = strstr(temp, "");
-else
-  break;
-if (!end_tag || start_tag > end_tag)
-  break;
-
-sindex = start_tag - temp;
-eindex = end_tag - temp + 1;
-if (!eina_strbuf_remove(buf, sindex, eindex))
-  break;
- }
-
-   ret = eina_strbuf_string_steal(buf);
-   eina_strbuf_free(buf);
-
-   return ret;
-}
-
-void
-_elm_entry_entry_paste(Evas_Object *obj,
-   const char *entry)
-{
-   char *str = NULL;
-
-   if (!entry) return;
-
-   ELM_ENTRY_CHECK(obj);
-   ELM_ENTRY_DATA_GET(obj, sd);
-
-   if (sd->cnp_mode == ELM_CNP_MODE_NO_IMAGE)
- {
-str = _item_tags_remove(entry);
-if (!str) str = strdup(entry);
- }
-   else
- str = strdup(entry);
-   if (!str) str = (char *)entry;
-
-   _edje_entry_user_insert(obj, str);
-
-   if (str != entry) free(str);
-}
-
 static void
 _paste_cb(void *data,
   Evas_Object *obj EINA_UNUSED,
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index d307983..101f398 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -604,9 +604,6 @@ _elm_dgettext(const char *string)
 
 #endif
 
-/* Used by the paste handler */
-void   _elm_entry_entry_paste(Evas_Object *obj, const char *entry);
-
 double _elm_atof(const char *s);
 
 #endif

-- 




[EGIT] [core/efl] master 07/08: elm cnp/Wl: Remove duplicated data receive callback

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit f5d10f1961fcfae5ca0204c1bc0c787c96fb4f2c
Author: Thiep Ha 
Date:   Tue May 3 14:58:10 2016 +

elm cnp/Wl: Remove duplicated data receive callback

If we do drag & drop and then do copy & paste, both _wl_selection_receive
and _wl_dnd_receive are called for one action (dnd or cnp). It is 
reduntdant.
We only need one data received callback to handle two cases dnd and cnp.
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c |   3 +-
 src/lib/elementary/elm_cnp.c  | 213 ++
 2 files changed, 100 insertions(+), 116 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index e9feb12..26ab52f 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -235,7 +235,8 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh)
event->sel_type = source->sel_type;
if (len <= 0)
  {
-if (source->input->drag.source)
+if (source->input->drag.source &&
+source->sel_type == ECORE_WL2_SELECTION_DND)
   {
  if (source->input->display->wl.data_device_manager_version >=
WL_DATA_OFFER_FINISH_SINCE_VERSION)
diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 9808f45..56c34d5 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2424,6 +2424,8 @@ struct _Wl_Cnp_Selection
Elm_Xdnd_Action action;
 
Eina_Bool active : 1;
+   Eina_Bool requestfinished : 1;
+   const char *requesttype;
 };
 
 static Eina_Bool _wl_elm_cnp_init(void);
@@ -2432,7 +2434,7 @@ static Wl_Cnp_Selection wl_cnp_selection =
 {
0, 0, NULL, NULL,
NULL, 0, 0, NULL, NULL, NULL,
-   0, NULL, 0, EINA_FALSE
+   0, NULL, 0, EINA_FALSE, EINA_FALSE, ""
 };
 
 static void _wl_sel_obj_del2(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj, void *event_info EINA_UNUSED);
@@ -2458,7 +2460,6 @@ static Eina_Bool _wl_dnd_position(void *data EINA_UNUSED, 
int type EINA_UNUSED,
 static Eina_Bool _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event);
 /* static Eina_Bool _wl_dnd_offer(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event); */
 
-static Eina_Bool _wl_dnd_receive(void *data, int type EINA_UNUSED, void 
*event);
 static Eina_Bool _wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, 
void *event EINA_UNUSED);
 static void _wl_dropable_data_handle(Wl_Cnp_Selection *sel, 
Ecore_Wl2_Event_Selection_Data_Ready *ev);
 
@@ -2709,6 +2710,49 @@ done:
 }
 
 static Eina_Bool
+_wl_selection_get_timer_cb(void *data)
+{
+   Wl_Cnp_Selection *sel = data;
+   Ecore_Wl2_Window *win;
+
+   win = _wl_elm_widget_window_get(sel->requestwidget);
+   ecore_wl2_dnd_selection_get(ecore_wl2_window_input_get(win),
+   sel->requesttype);
+   return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool
+_wl_notify_handler_targets(Wl_Cnp_Selection *sel, 
Ecore_Wl2_Event_Selection_Data_Ready *ev)
+{
+   cnp_debug("In\n");
+   if (!ev) return EINA_FALSE;
+   char *data = ev->data;
+   int len = ev->len;
+   int count = 0, i = 0;
+   char **data_arr = NULL;
+   Cnp_Atom *atom = NULL;
+
+   _wl_selection_parser(data, len, &data_arr, &count);
+   for (i = 0; i < count; i++)
+ {
+atom = eina_hash_find(_types_hash, data_arr[i]);
+if (atom && (atom->formats != ELM_SEL_FORMAT_TARGETS))
+  {
+ cnp_debug("Match found: %s\n", atom->name);
+ sel->requestfinished = EINA_FALSE;
+ /* Since we cannot call ecore_wl2_dnd_selection_get in here
+(it makes selection_send cannot be called), we use ecore_timer
+to call it */
+ sel->requesttype = atom->name;
+ ecore_timer_add(0.001, _wl_selection_get_timer_cb, sel);
+ break;
+  }
+ }
+   free(data_arr);
+   return EINA_TRUE;
+}
+
+static Eina_Bool
 _wl_data_preparer_markup(Wl_Cnp_Selection *sel, Elm_Selection_Data *ddata, 
Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info **tmp_info EINA_UNUSED)
 {
cnp_debug("In\n");
@@ -3021,9 +3065,9 @@ _wl_elm_cnp_selection_get(const Evas_Object *obj, 
Elm_Sel_Type selection, Elm_Se
sel->requestformat = format;
sel->requestwidget = (Evas_Object *) obj;
sel->win = win;
-   /* sel->request(win, ECORE_X_SELECTION_TARGET_TARGETS); */
sel->datacb = datacb;
sel->udata = udata;
+   sel->requesttype = "TARGETS";
 
evas_object_event_callback_add(sel->requestwidget,
   EVAS_CALLBACK_DEL, _wl_sel_obj_del2,
@@ -3033,28 +3077,7 @@ _wl_elm_cnp_selection_get(const Evas_Object *obj, 
Elm_Sel_Type selection, Elm_Se
   

[EGIT] [core/efl] master 06/08: ecore wayland: add selection type

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit aa0ace21d7d1aa014fd3a5e743d8787ee35622aa
Author: Thiep Ha 
Date:   Tue May 3 10:42:31 2016 +

ecore wayland: add selection type

We have copy & paste and drag & drop selection types, but we cannot
distinguish between these two types when requesters receive data
from data ready event.
This patch adds a new enum to help selection requesters distinguish
between two selection types and have suitable actions for each type.
---
 src/lib/ecore_wl2/Ecore_Wl2.h | 7 +++
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 3 +++
 src/lib/ecore_wl2/ecore_wl2_private.h | 1 +
 3 files changed, 11 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 2308a9a..ff53140 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -129,11 +129,18 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send
int fd;
 } Ecore_Wl2_Event_Data_Source_Send;
 
+typedef enum
+{
+   ECORE_WL2_SELECTION_CNP,
+   ECORE_WL2_SELECTION_DND
+} Ecore_Wl2_Selection_Type;
+
 typedef struct _Ecore_Wl2_Event_Selection_Data_Ready
 {
char *data;
int len;
Eina_Bool done;
+   Ecore_Wl2_Selection_Type sel_type;
 } Ecore_Wl2_Event_Selection_Data_Ready;
 
 typedef enum
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c 
b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 2e4765c..e9feb12 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -232,6 +232,7 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh)
event = calloc(1, sizeof(Ecore_Wl2_Event_Selection_Data_Ready));
if (!event) return ECORE_CALLBACK_CANCEL;
 
+   event->sel_type = source->sel_type;
if (len <= 0)
  {
 if (source->input->drag.source)
@@ -530,6 +531,7 @@ ecore_wl2_dnd_drag_get(Ecore_Wl2_Input *input, const char 
*type)
 
if (!*t) return EINA_FALSE;
 
+   input->drag.source->sel_type = ECORE_WL2_SELECTION_DND;
_selection_data_receive(input->drag.source, type);
 
return EINA_TRUE;
@@ -639,6 +641,7 @@ ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input, const 
char *type)
 
if (!*t) return EINA_FALSE;
 
+   input->selection.source->sel_type = ECORE_WL2_SELECTION_CNP;
_selection_data_receive(input->selection.source, type);
 
return EINA_TRUE;
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index f1bd494..6913edc 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -188,6 +188,7 @@ typedef struct _Ecore_Wl2_Dnd_Source
struct wl_array types;
uint32_t dnd_action;
uint32_t source_actions;
+   Ecore_Wl2_Selection_Type sel_type;
 } Ecore_Wl2_Dnd_Source;
 
 

-- 




[EGIT] [core/efl] master 01/08: elm dnd/wl: add type converters

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 1bc9483a82bf18be386e2dde891be20926b5d8bb
Author: Thiep Ha 
Date:   Tue May 3 09:07:48 2016 +

elm dnd/wl: add type converters

we support different types for DnD, but there is no converters.
This patch adds converters for types, so that we can send
different data for different types.
---
 src/lib/elementary/elm_cnp.c | 218 +--
 1 file changed, 212 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 848febe..8288b5e 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -8,7 +8,7 @@
 # include 
 #endif
 
-//#define DEBUGON 1
+#define DEBUGON 1
 #ifdef DEBUGON
 # define cnp_debug(fmt, args...) fprintf(stderr, __FILE__":%s/%d : " fmt , 
__FUNCTION__, __LINE__, ##args)
 #else
@@ -250,6 +250,15 @@ static Eina_Bool _x11_elm_selection_selection_has_owner  
(Evas_Object *obj EINA_
 
 #endif
 
+#ifdef HAVE_ELEMENTARY_WL2
+typedef struct _Wl_Cnp_Selection Wl_Cnp_Selection;
+
+typedef Eina_Bool (*Wl_Converter_Fn_Cb) (char *target, Wl_Cnp_Selection 
*sel, void *data, int size, void **data_ret, int *size_ret);
+static Eina_Bool _wl_targets_converter(char *target, Wl_Cnp_Selection *sel, 
void *data, int size, void **data_ret, int *size_ret);
+static Eina_Bool _wl_general_converter(char *target, Wl_Cnp_Selection *sel, 
void *data, int size, void **data_ret, int *size_ret);
+static Eina_Bool _wl_text_converter(char *target, Wl_Cnp_Selection *sel, void 
*data, int size, void **data_ret, int *size_ret);
+#endif
+
 struct _Cnp_Atom
 {
const char  *name;
@@ -261,6 +270,10 @@ struct _Cnp_Atom
/* Atom */
Ecore_X_Atom x_atom;
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+   Wl_Converter_Fn_Cb   wl_converter;
+#endif
+
void*_term;
 };
 
@@ -438,6 +451,10 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .formats = ELM_SEL_FORMAT_TARGETS,
 #ifdef HAVE_ELEMENTARY_X
 .x_converter = _x11_targets_converter,
+
+#endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_targets_converter,
 #endif
},
ARRAYINIT(CNP_ATOM_ATOM) {
@@ -446,6 +463,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 #ifdef HAVE_ELEMENTARY_X
 .x_converter = _x11_targets_converter,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_targets_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_XELM)  {
 .name = "application/x-elementary-markup",
@@ -454,6 +474,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_general_converter,
 .x_data_preparer = _x11_data_preparer_markup,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_general_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_text_urilist) {
 .name = "text/uri-list",
@@ -462,6 +485,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_general_converter,
 .x_data_preparer = _x11_data_preparer_uri,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_general_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_text_x_vcard) {
 .name = "text/x-vcard",
@@ -551,6 +577,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
   .x_converter = _x11_general_converter,
   .x_notify = _x11_notify_handler_html,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_general_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_text_html) {
   .name = "text/html",
@@ -559,6 +588,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
   .x_converter = _x11_general_converter,
   .x_notify = _x11_notify_handler_html,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_general_converter,
+#endif
},
  */
ARRAYINIT(CNP_ATOM_UTF8STRING) {
@@ -568,6 +600,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_text_converter,
 .x_data_preparer = _x11_data_preparer_text,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_text_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_STRING) {
 .name = "STRING",
@@ -576,6 +611,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_text_converter,
 .x_data_preparer = _x11_data_preparer_text,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_text_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_COMPOUND_TEXT) {
 .name = "COMPOUND_TEXT",
@@ -584,6 +622,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_text_converter,
 .x_data_preparer = _x11_data_preparer_text,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_converter = _wl_text_converter,
+#endif
},
ARRAYINIT(CNP_ATOM_TEXT) {
 .name = "TEXT",
@@ -592,6 +633,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_conv

[EGIT] [core/efl] master 02/08: elm dnd/wl: add types' notify handler

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
Author: Thiep Ha 
Date:   Tue May 3 09:30:39 2016 +

elm dnd/wl: add types' notify handler

This patch adds notify handlers for types.
It provides different ways to handle different data types.
---
 src/lib/elementary/elm_cnp.c | 388 ++-
 1 file changed, 347 insertions(+), 41 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 8288b5e..61dac7d 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -257,6 +257,13 @@ typedef Eina_Bool (*Wl_Converter_Fn_Cb) (char *target, 
Wl_Cnp_Selection *sel
 static Eina_Bool _wl_targets_converter(char *target, Wl_Cnp_Selection *sel, 
void *data, int size, void **data_ret, int *size_ret);
 static Eina_Bool _wl_general_converter(char *target, Wl_Cnp_Selection *sel, 
void *data, int size, void **data_ret, int *size_ret);
 static Eina_Bool _wl_text_converter(char *target, Wl_Cnp_Selection *sel, void 
*data, int size, void **data_ret, int *size_ret);
+
+typedef Eina_Bool   (*Wl_Data_Preparer_Cb)   (Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
+static Eina_Bool _wl_data_preparer_markup(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
+static Eina_Bool _wl_data_preparer_uri(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
+static Eina_Bool _wl_data_preparer_vcard(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
+static Eina_Bool _wl_data_preparer_image(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
+static Eina_Bool _wl_data_preparer_text(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev, Tmp_Info 
**tmp_info);
 #endif
 
 struct _Cnp_Atom
@@ -272,6 +279,7 @@ struct _Cnp_Atom
 #endif
 #ifdef HAVE_ELEMENTARY_WL2
Wl_Converter_Fn_Cb   wl_converter;
+   Wl_Data_Preparer_Cb  wl_data_preparer;
 #endif
 
void*_term;
@@ -476,6 +484,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 #endif
 #ifdef HAVE_ELEMENTARY_WL2
 .wl_converter = _wl_general_converter,
+.wl_data_preparer = _wl_data_preparer_markup,
 #endif
},
ARRAYINIT(CNP_ATOM_text_urilist) {
@@ -487,6 +496,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 #endif
 #ifdef HAVE_ELEMENTARY_WL2
 .wl_converter = _wl_general_converter,
+.wl_data_preparer = _wl_data_preparer_uri,
 #endif
},
ARRAYINIT(CNP_ATOM_text_x_vcard) {
@@ -496,6 +506,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_vcard_send,
 .x_data_preparer = _x11_data_preparer_vcard,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_vcard,
+#endif
},
ARRAYINIT(CNP_ATOM_image_png) {
 .name = "image/png",
@@ -504,6 +517,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_image_converter,
 .x_data_preparer = _x11_data_preparer_image,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_image,
+#endif
},
ARRAYINIT(CNP_ATOM_image_jpeg) {
 .name = "image/jpeg",
@@ -512,6 +528,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_image_converter,
 .x_data_preparer = _x11_data_preparer_image,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_image,
+#endif
},
ARRAYINIT(CNP_ATOM_image_bmp) {
 .name = "image/x-ms-bmp",
@@ -520,6 +539,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_image_converter,
 .x_data_preparer = _x11_data_preparer_image,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_image,
+#endif
},
ARRAYINIT(CNP_ATOM_image_gif) {
 .name = "image/gif",
@@ -528,6 +550,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_image_converter,
 .x_data_preparer = _x11_data_preparer_image,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_image,
+#endif
},
ARRAYINIT(CNP_ATOM_image_tiff) {
 .name = "image/tiff",
@@ -536,6 +561,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
 .x_converter = _x11_image_converter,
 .x_data_preparer = _x11_data_preparer_image,
 #endif
+#ifdef HAVE_ELEMENTARY_WL2
+.wl_data_preparer = _wl_data_preparer_image,
+#endif
},
ARRAYINIT(CNP_ATOM_image_svg) {
 .name = "image/svg+xml",
@@ -544,6 +572,9

[EGIT] [core/efl] master 05/08: elm cnp/wl: add uri data type checking

2016-05-03 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit bcba96656afc534a8ad70da772a95aba592878fc
Author: Thiep Ha 
Date:   Tue May 3 10:41:00 2016 +

elm cnp/wl: add uri data type checking

When selection owner provides uri type (uri/text-list),
it should check if data is in correct format.
---
 src/lib/elementary/elm_cnp.c | 28 +---
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index ab0951e..9808f45 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2495,16 +2495,26 @@ _wl_targets_converter(char *target, Wl_Cnp_Selection 
*sel EINA_UNUSED, void *dat
int len = 0;
int i = 0;
Elm_Sel_Format formats = ELM_SEL_FORMAT_NONE;
-   Cnp_Atom *atom = NULL;
+   Eina_Bool is_uri = EINA_FALSE;
 
-   atom = eina_hash_find(_types_hash, target);
-   if (atom)
- formats = atom->formats;
+   if (sel->format)
+ {
+formats = sel->format;
+is_uri = _wl_is_uri_type_data(sel->selbuf, sel->buflen);
+ }
+   else
+ {
+Cnp_Atom *atom = eina_hash_find(_types_hash, target);
+if (atom)
+  formats = atom->formats;
+ }
for (i = 0; i < CNP_N_ATOMS; i++)
  {
 if (formats & _atoms[i].formats)
   {
- len += strlen(_atoms[i].name) + strlen(sep);
+ if ((is_uri) || ((!is_uri) &&
+  strcmp(_atoms[i].name, "text/uri-list")))
+   len += strlen(_atoms[i].name) + strlen(sep);
   }
  }
aret = calloc(1, len * sizeof(char));
@@ -2513,8 +2523,12 @@ _wl_targets_converter(char *target, Wl_Cnp_Selection 
*sel EINA_UNUSED, void *dat
  {
 if (formats & _atoms[i].formats)
   {
- aret = strcat(aret, _atoms[i].name);
- aret = strcat(aret, sep);
+ if ((is_uri) || ((!is_uri) &&
+  strcmp(_atoms[i].name, "text/uri-list")))
+   {
+  aret = strcat(aret, _atoms[i].name);
+  aret = strcat(aret, sep);
+   }
   }
  }
*data_ret = aret;

-- 




[EGIT] [core/efl] master 01/01: ecore_evas_cocoa: correct focus handlers

2016-03-14 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 9c204eb36970c72d254c5f42818dbe24f9a47451
Author: Thiep Ha 
Date:   Tue Mar 15 08:15:05 2016 +0900

ecore_evas_cocoa: correct focus handlers

Focus handlers are set incorrectly.
It causes windows process focus when they are acttually unfocused.
This patch corrects it.

Signed-off-by: Thiep Ha 
---
 src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c 
b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index 2fc1914..7c70599 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -289,10 +289,10 @@ _ecore_evas_cocoa_init(void)
 
ecore_evas_event_handlers[0] =
   ecore_event_handler_add(ECORE_COCOA_EVENT_WINDOW_UNFOCUSED,
-  _ecore_evas_cocoa_event_got_focus, NULL);
+  _ecore_evas_cocoa_event_lost_focus, NULL);
ecore_evas_event_handlers[1] =
   ecore_event_handler_add(ECORE_COCOA_EVENT_WINDOW_FOCUSED,
-  _ecore_evas_cocoa_event_lost_focus, NULL);
+  _ecore_evas_cocoa_event_got_focus, NULL);
ecore_evas_event_handlers[2] =
   ecore_event_handler_add(ECORE_COCOA_EVENT_WINDOW_RESIZE_REQUEST,
   _ecore_evas_cocoa_event_window_resize, NULL);

-- 




[EGIT] [core/elementary] master 01/01: entry: remove unnecessary variables

2016-02-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit bea9540099c836af0d7f1b354d4422fe826b1215
Author: Thiep Ha 
Date:   Fri Feb 5 15:43:06 2016 +0900

entry: remove unnecessary variables

remove unnecessary dw, dh variables
---
 src/lib/elm_entry.c | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index f8a1d20..b6df9c8 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1701,7 +1701,6 @@ _magnifier_move(void *data)
Evas_Coord diffx = 0;
Evas_Object *top;
double fx, fy, fw, fh;
-   double dw, dh;
double scale = _elm_config->magnifier_scale;
 
edje_object_part_text_cursor_geometry_get(sd->entry_edje, "elm.text",
@@ -1757,14 +1756,10 @@ _magnifier_move(void *data)
evas_object_geometry_get(data, &x, &y, &w, &h);
evas_object_geometry_get(sd->mgf_proxy, &px, &py, &pw, &ph);
 
-   dw = w;
-   dh = h;
-
fx = -((cx - x) * scale) + (pw * 0.5) + diffx;
fy = -((cy - y) * scale) + (ph * 0.5) - (ch * 0.5 * scale);
-
-   fw = dw * scale;
-   fh = dh * scale;
+   fw = w * scale;
+   fh = h * scale;
evas_object_image_fill_set(sd->mgf_proxy, fx, fy, fw, fh);
 
//Update Clipper Area

-- 




[EGIT] [core/elementary] elementary-1.16 01/01: wayland cnp: check selection owner before calling losscb

2015-12-17 Thread Thiep Ha
thiep pushed a commit to branch elementary-1.16.

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

commit a470e464afca3f2d9568d6c5318b86158f83ae47
Author: Thiep Ha 
Date:   Thu Dec 17 18:13:17 2015 +

wayland cnp: check selection owner before calling losscb

The selection is cleared by losscb when we set it.
As result, selection is not done.
To avoid it, we should check if the new selection owner
is current selection owner or not and only call losscb
if the new selection owner is not the current one.

Test Plan:
In wayland, select text in entry (e.g double click, ctrl-a).
---
 src/lib/elm_cnp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0701057..d5c7289 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2410,7 +2410,8 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type 
selection, Elm_Sel_Form
 
win = elm_win_wl_window_get(obj);
 
-   if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection);
+   if ((sel->widget != obj) && sel->loss_cb)
+ sel->loss_cb(sel->loss_data, selection);
 
if (sel->widget)
  evas_object_event_callback_del_full(sel->widget,

-- 




[EGIT] [core/elementary] master 01/01: wayland cnp: check selection owner before calling losscb

2015-12-17 Thread Thiep Ha
thiep pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6c13b8db9a7dbbd417caf06d9f855986d815d075

commit 6c13b8db9a7dbbd417caf06d9f855986d815d075
Author: Thiep Ha 
Date:   Thu Dec 17 18:13:17 2015 +

wayland cnp: check selection owner before calling losscb

The selection is cleared by losscb when we set it.
As result, selection is not done.
To avoid it, we should check if the new selection owner
is current selection owner or not and only call losscb
if the new selection owner is not the current one.

Test Plan:
In wayland, select text in entry (e.g double click, ctrl-a).
---
 src/lib/elm_cnp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index f1d0fb7..411a645 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2410,7 +2410,8 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type 
selection, Elm_Sel_Form
 
win = _wl_elm_widget_window_get(obj);
 
-   if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection);
+   if ((sel->widget != obj) && sel->loss_cb)
+ sel->loss_cb(sel->loss_data, selection);
 
if (sel->widget)
  evas_object_event_callback_del_full(sel->widget,

-- 




[EGIT] [core/efl] master 01/01: edje entry: return correct selection

2015-11-26 Thread Thiep Ha
herdsman pushed a commit to branch master.

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

commit 76939252278e4622067f9481251d03439a98761f
Author: Thiep Ha 
Date:   Thu Nov 26 09:52:48 2015 +0200

edje entry: return correct selection

Summary:
In entry, when selection_get function is called, selection is not
always returned the current selection.

Scenario:
- In select mode, entry has selection (e.g, by double click).
- When selection handler is moved, set the cursor the current coordinate
  with edje_object_part_text_cursor_pos_set() API.
- Edje emits "selection,changed" signal.
- Elementary gets current selection and stores it.
- Elementary does not get selection as visual selection (e.g, text is
   highlighted with "entry test", but the selection returned
   from edje is "entry").
- If we copy and then paste to the entry, the pasted text is not same as
   selected text.

Reason:
- In _edje_entry_cursor_coord_set function, if entry has selection, we only
  emit "selection,changed" signal without freeing en->selection.
- When _edje_entry_selection_get is called, we check the en->selection,
  since it is existed, we just return it which is not updated one.

This patch clears en->selection, so that it is updated at _selection_get,
and the updated selection is returned to caller.

@fix

Test Plan:
In mobile profile, open entry
- Right click, choose select, double click -> selection handlers are shown.
- Drag selection handlers to change selection.
- Right click, do copy.
- Right click, do paste.
- See the pasted text is not same as selection.

Reviewers: raster, tasn, herdsman

Subscribers: seoz, JackDanielZ, cedric

Differential Revision: https://phab.enlightenment.org/D2746
---
 src/lib/edje/edje_entry.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 92c40a6..c9b424c 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -3856,7 +3856,14 @@ _edje_entry_cursor_coord_set(Edje_Real_Part *rp, 
Edje_Cursor cur,
(cur == EDJE_CURSOR_SELECTION_END))
  {
 if (en->have_selection)
-  _edje_emit(en->ed, "selection,changed", rp->part->name);
+  {
+ if (en->selection)
+   {
+  free(en->selection);
+  en->selection = NULL;
+   }
+ _edje_emit(en->ed, "selection,changed", rp->part->name);
+  }
  }
return evas_textblock_cursor_char_coord_set(c, x, y);
 }

-- 




[EGIT] [apps/terminology] master 01/01: po: add Vietnamese translations

2015-10-06 Thread Thiep Ha
jpeg pushed a commit to branch master.

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

commit fd0aadf7b9fca726234b29bac58f5a180f3b
Author: Thiep Ha 
Date:   Tue Oct 6 17:52:56 2015 +0900

po: add Vietnamese translations

Summary: Add translations for Vietnamese language.

Reviewers: billiob

Subscribers: Hermet, jpeg, seoz

Differential Revision: https://phab.enlightenment.org/D3130
---
 po/LINGUAS |   2 +-
 po/vi.po   | 881 +
 2 files changed, 882 insertions(+), 1 deletion(-)

diff --git a/po/LINGUAS b/po/LINGUAS
index bfcbe1c..33e375f 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1 @@
-ca de el eo es fi fr hi it ko ms sr tr
+ca de el eo es fi fr hi it ko ms sr tr vi
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 000..a5c6916
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,881 @@
+# Vietnamese translations for terminology package.
+# Copyright (C) 2015 Terminology development team
+# This file is distributed under the same license as the terminology package.
+# Thiep Ha , 2015.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: terminology 0.8.99\n"
+"Report-Msgid-Bugs-To: enlightenment-de...@lists.sourceforge.net\n"
+"POT-Creation-Date: 2015-10-05 02:19+0900\n"
+"PO-Revision-Date: 2015-10-05 02:10+0900\n"
+"Last-Translator: Thiep Ha \n"
+"Language-Team: \n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: src/bin/controls.c:247
+msgid "Controls"
+msgstr "Điều Khiển"
+
+#: src/bin/controls.c:263
+msgid "New"
+msgstr "Tạo Mới"
+
+#: src/bin/controls.c:269
+msgid "Split V"
+msgstr "Chia Dọc"
+
+#: src/bin/controls.c:271
+msgid "Split H"
+msgstr "Chia Ngang"
+
+#: src/bin/controls.c:277
+msgid "Miniview"
+msgstr "Miniview"
+
+#: src/bin/controls.c:287 src/bin/termio.c:950 src/bin/termio.c:4093
+msgid "Copy"
+msgstr "Sao Chép"
+
+#: src/bin/controls.c:293
+msgid "Paste"
+msgstr "Dán"
+
+#: src/bin/controls.c:299
+msgid "Settings"
+msgstr "Thiết Lập"
+
+#: src/bin/controls.c:305
+msgid "About"
+msgstr "Về"
+
+#: src/bin/controls.c:315
+msgid "Close Terminal"
+msgstr "Đóng Terminal"
+
+#: src/bin/about.c:56
+#, c-format
+msgid ""
+"Terminology %sWhy should terminals be boring?This "
+"terminal was written for Enlightenment, to use EFL and otherwise push the "
+"boundaries of what a modern terminal emulator should be. We hope you enjoy "
+"it.Copyright © 2012-%d by:%sDistributed under the 2-"
+"clause BSD license detailed below:%s"
+msgstr ""
+"Terminology %sTại sao các terminal lại nhàm chán?Terminal "
+"này được viết choEnlightenment, để dùng EFL và mặt khác là để thể hiện cái "
+"mà các bộ mô phỏng terminal nên là. Chúng tôi hy vọng bạn thích nó."
+"Bản quyền © 2012-%d bởi:%sPhân phối theo giấy phép 2-"
+"clause BSD license với thông tin cụ thể bên dưới:%s"
+
+#: src/bin/keyin.c:569
+msgid "Scrolling"
+msgstr "Cuộn"
+
+#: src/bin/keyin.c:570
+msgid "Scroll one page up"
+msgstr "Cuộn lên trên một trang"
+
+#: src/bin/keyin.c:571
+msgid "Scroll one page down"
+msgstr "Cuộn xuống dưới một trang"
+
+#: src/bin/keyin.c:572
+msgid "Scroll one line up"
+msgstr "Cuộn lên trên một dòng"
+
+#: src/bin/keyin.c:573
+msgid "Scroll one line down"
+msgstr "Cuộn xuống dưới một dòng"
+
+#: src/bin/keyin.c:575
+msgid "Copy/Paste"
+msgstr "Sao Chép/Dán"
+
+#: src/bin/keyin.c:576
+msgid "Copy selection to Primary buffer"
+msgstr "Sao chép phần được chọn đến bộ đệm Chính"
+
+#: src/bin/keyin.c:577
+msgid "Copy selection to Clipboard buffer"
+msgstr "Sao chép phần được chọn đến bộ đệm Clipboard"
+
+#: src/bin/keyin.c:578
+msgid "Paste Primary buffer (highlight)"
+msgstr "Dán từ bộ đệm Chính (phần nổi bật)"
+
+#: src/bin/keyin.c:579
+msgid "Paste Clipboard buffer (ctrl+c/v)"
+msgstr "Dán từ bộ đệm Clipboard (ctrl+c/v)"
+
+#: src/bin/keyin.c:581
+msgid "Splits/Tabs"
+msgstr "Chia/Thẻ"
+
+#: src/bin/keyin.c:582
+msgid "Focus to the previous terminal"
+msgstr "Tập trung vào terminal phía trước"
+
+#: src/bin/keyin.c:583
+msgid "Focus to the next terminal"
+msgstr "Tập trung vào

[EGIT] [core/efl] efl-1.15 01/01: doc/eldbus: fix parameter in document

2015-10-01 Thread Thiep Ha
hermet pushed a commit to branch efl-1.15.

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

commit b1eed95d381dd43a616d6d03e004626d8c98
Author: Thiep Ha 
Date:   Thu Oct 1 19:29:23 2015 +0900

doc/eldbus: fix parameter in document

Summary:
The allow_initial_call apprears two times in
eldbus_name_owner_changed_callback_add api.

@fix

Reviewers: seoz, Hermet

Reviewed By: Hermet

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3110
---
 src/lib/eldbus/eldbus_freedesktop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eldbus/eldbus_freedesktop.h 
b/src/lib/eldbus/eldbus_freedesktop.h
index 1b2901c..b629379 100644
--- a/src/lib/eldbus/eldbus_freedesktop.h
+++ b/src/lib/eldbus/eldbus_freedesktop.h
@@ -125,7 +125,7 @@ typedef void (*Eldbus_Name_Owner_Changed_Cb)(void *data, 
const char *bus, const
  *
  * This function implicitly calls eldbus_name_owner_get() in order to be able 
to
  * monitor the name. If the only interest is to receive notifications when the
- * name in fact changes, pass EINA_FALSE to @param allow_initial_call so your
+ * name in fact changes, pass EINA_FALSE to \p allow_initial_call so your
  * callback will not be called on first retrieval of name owner. If the
  * initial state is important, pass EINA_TRUE to this parameter.
  *

-- 




[EGIT] [core/efl] master 01/01: doc/eldbus: fix parameter in document

2015-10-01 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit bb9fdad7c20d273d382ffe096aa3630534a54647
Author: Thiep Ha 
Date:   Thu Oct 1 19:29:23 2015 +0900

doc/eldbus: fix parameter in document

Summary:
The allow_initial_call apprears two times in
eldbus_name_owner_changed_callback_add api.

@fix

Reviewers: seoz, Hermet

Reviewed By: Hermet

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3110
---
 src/lib/eldbus/eldbus_freedesktop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eldbus/eldbus_freedesktop.h 
b/src/lib/eldbus/eldbus_freedesktop.h
index 1b2901c..b629379 100644
--- a/src/lib/eldbus/eldbus_freedesktop.h
+++ b/src/lib/eldbus/eldbus_freedesktop.h
@@ -125,7 +125,7 @@ typedef void (*Eldbus_Name_Owner_Changed_Cb)(void *data, 
const char *bus, const
  *
  * This function implicitly calls eldbus_name_owner_get() in order to be able 
to
  * monitor the name. If the only interest is to receive notifications when the
- * name in fact changes, pass EINA_FALSE to @param allow_initial_call so your
+ * name in fact changes, pass EINA_FALSE to \p allow_initial_call so your
  * callback will not be called on first retrieval of name owner. If the
  * initial state is important, pass EINA_TRUE to this parameter.
  *

-- 




[EGIT] [core/elementary] master 01/01: test/entry: add editable set

2015-10-01 Thread Thiep Ha
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=8fd5c708203ca59775b8aeffae59370176edaaf1

commit 8fd5c708203ca59775b8aeffae59370176edaaf1
Author: Thiep Ha 
Date:   Thu Oct 1 19:12:34 2015 +0900

test/entry: add editable set

Summary:
There is no good entry test for changing editable mode.
This patch adds a test for changing editable in entry.

Reviewers: Hermet, tasn, herdsman

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3112
---
 src/bin/test_entry.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index faa2f5d..5da3f67 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -75,6 +75,13 @@ my_entry_bt_6(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UN
elm_entry_line_wrap_set(en, wr);
 }
 
+static void
+my_entry_bt_7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *en = data;
+   elm_entry_editable_set(en, !elm_entry_editable_get(en));
+}
+
 void
 test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
@@ -194,6 +201,16 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
elm_object_focus_allow_set(bt, EINA_FALSE);
evas_object_show(bt);
 
+   bt = elm_button_add(win);
+   elm_object_text_set(bt, "Edit");
+   evas_object_smart_callback_add(bt, "clicked", my_entry_bt_7, en);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   evas_object_propagate_events_set(bt, EINA_FALSE);
+   elm_object_focus_allow_set(bt, EINA_FALSE);
+   evas_object_show(bt);
+
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
 

-- 




[EGIT] [core/elementary] master 01/01: po: Add Vietnamese translation

2015-09-29 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit 2ed769b662b9a675f5c3adba35c0fb1ed5e14c33
Author: Thiep Ha 
Date:   Wed Sep 30 14:10:56 2015 +0900

po: Add Vietnamese translation

Summary: Add translation for Vietnamese.

Reviewers: seoz, stefan_schmidt, Hermet

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3116
---
 po/LINGUAS |   2 +-
 po/vi.po   | 325 +
 2 files changed, 326 insertions(+), 1 deletion(-)

diff --git a/po/LINGUAS b/po/LINGUAS
index 6f7a77b..7913ad3 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1 @@
-ar az_IR ca cs de el eo es fa fi fr gl he hu ko_KR it lt nl pl ps pt ru sr ur 
yi tr zh_CN
+ar az_IR ca cs de el eo es fa fi fr gl he hu ko_KR it lt nl pl ps pt ru sr ur 
vi yi tr zh_CN
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 000..9b18cd3
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,325 @@
+# Vietnamese translation for Elementary.
+# This file is distributed under the same license as the Elementary package.
+# Thiep Ha , 2015.
+#
+#: src/lib/elm_config.c:3267
+msgid ""
+msgstr ""
+"Project-Id-Version: elementary\n"
+"Report-Msgid-Bugs-To: enlightenment-de...@lists.sourceforge.net\n"
+"POT-Creation-Date: 2015-09-29 18:06+0900\n"
+"PO-Revision-Date: 2015-09-29 18:06+0900\n"
+"Last-Translator: Thiep Ha \n"
+"Language-Team: General\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+
+#: src/lib/elc_fileselector.c:1505
+msgid "Up"
+msgstr "Trên"
+
+#: src/lib/elc_fileselector.c:1521
+msgid "Home"
+msgstr "Trang Chủ"
+
+#: src/lib/elc_fileselector.c:1588
+msgid "Search"
+msgstr "Tìm Kiếm"
+
+#: src/lib/elc_fileselector.c:1757 src/lib/elm_entry.c:1588
+#: src/lib/elm_entry.c:1613
+msgid "Cancel"
+msgstr "Hủy"
+
+#: src/lib/elc_fileselector.c:1767
+msgid "OK"
+msgstr "Đồng Ý"
+
+#: src/lib/elc_multibuttonentry.c:667
+msgid "multi button entry label"
+msgstr "Nhãn Của Bộ Nhập Nhiều Nút"
+
+#: src/lib/elc_multibuttonentry.c:689
+msgid "multi button entry item"
+msgstr "Mục Của Bộ Nhập Nhiều Nút"
+
+#: src/lib/elc_multibuttonentry.c:1569
+msgid "multi button entry"
+msgstr "Bộ Nhập Nhiều Nút"
+
+#: src/lib/elc_naviframe.c:434
+msgid "Title"
+msgstr "Đề Mục"
+
+#: src/lib/elc_naviframe.c:980 src/lib/elc_naviframe.c:1181
+msgid "Back"
+msgstr "Quay Lại"
+
+#: src/lib/elc_naviframe.c:1277
+msgid "Next"
+msgstr "Tiếp"
+
+#: src/lib/elc_popup.c:275 src/lib/elc_popup.c:941
+msgid "Popup Title"
+msgstr "Tiêu Đề Hộp Thoại"
+
+#: src/lib/elc_popup.c:285 src/lib/elc_popup.c:1017
+msgid "Popup Body Text"
+msgstr "Văn Bản Thân Hộp Thoại"
+
+#: src/lib/elm_bubble.c:194
+msgid "Bubble"
+msgstr "Bubble"
+
+#: src/lib/elm_button.c:66
+msgid "Clicked"
+msgstr "Đã Nhấp"
+
+#: src/lib/elm_button.c:275 src/lib/elm_check.c:244 src/lib/elm_gengrid.c:1252
+#: src/lib/elm_genlist.c:1653 src/lib/elm_list.c:2189 src/lib/elm_radio.c:268
+#: src/lib/elm_segment_control.c:524 src/lib/elm_spinner.c:905
+#: src/lib/elm_toolbar.c:2245
+msgid "State: Disabled"
+msgstr "Trạng Thái: Không Khả Dụng"
+
+#: src/lib/elm_button.c:300
+msgid "Button"
+msgstr "Nút"
+
+#: src/lib/elm_calendar.c:175
+msgid "%B %Y"
+msgstr "%B %Y"
+
+#: src/lib/elm_calendar.c:181
+msgid "%B"
+msgstr "%B"
+
+#: src/lib/elm_calendar.c:187
+msgid "%Y"
+msgstr "%Y"
+
+#: src/lib/elm_calendar.c:301
+msgid "calendar item"
+msgstr "Mục Của Lịch"
+
+#: src/lib/elm_calendar.c:327
+msgid "calendar decrement month button"
+msgstr "Nút Giảm Tháng"
+
+#: src/lib/elm_calendar.c:332
+msgid "calendar decrement year button"
+msgstr "Nút Giảm Năm"
+
+#: src/lib/elm_calendar.c:337
+msgid "calendar increment month button"
+msgstr "Nút Tăng Tháng"
+
+#: src/lib/elm_calendar.c:342
+msgid "calendar increment year button"
+msgstr "Nút Tăng Năm"
+
+#: src/lib/elm_calendar.c:347
+msgid "calendar month"
+msgstr "Lịch Tháng"
+
+#: src/lib/elm_calendar.c:352
+msgid "calendar year"
+msgstr "Lịch Năm"
+
+#: src/lib/elm_check.c:67 src/lib/elm_check.c:257 src/lib/elm_radio.c:125
+#: src/lib/elm_rad

[EGIT] [core/efl] master 01/01: po: Add Vietnamese translation

2015-09-29 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit 844fde5a8735221a170b9fb7dedd86043b3782b9
Author: Thiep Ha 
Date:   Wed Sep 30 11:57:16 2015 +0900

po: Add Vietnamese translation

Summary: Add translation for Vietnamese.

Reviewers: seoz, stefan_schmidt, Hermet

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3117
---
 po/LINGUAS |   2 +-
 po/vi.po   | 239 +
 2 files changed, 240 insertions(+), 1 deletion(-)

diff --git a/po/LINGUAS b/po/LINGUAS
index 2d14c44..8ed075e 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
-ca cs de el eo es fi fr gl hu it ja ko lt nl pl pt ru sl sr tr zh_CN
+ca cs de el eo es fi fr gl hu it ja ko lt nl pl pt ru sl sr tr vi zh_CN
 
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 000..66e0ce8
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,239 @@
+# Vietnamese translation for Efl.
+# Copyright (C) 2012 Enlightenment development team
+# This file is put in the public domain.
+# Thiep Ha , 2015.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: efl 1.15.99.31544\n"
+"Report-Msgid-Bugs-To: enlightenment-de...@lists.sourceforge.net\n"
+"POT-Creation-Date: 2015-09-29 19:49+0900\n"
+"PO-Revision-Date: 2015-09-29 19:38+0900\n"
+"Last-Translator: Thiep Ha \n"
+"Language-Team: \n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: src/lib/ecore/ecore_getopt.c:89
+msgid "Version:"
+msgstr "Phiên Bản:"
+
+#: src/lib/ecore/ecore_getopt.c:98
+msgid "Usage:"
+msgstr "Sử Dụng:"
+
+#: src/lib/ecore/ecore_getopt.c:105
+#, c-format
+msgid "%s [options]"
+msgstr "%s [Lựa Chọn]"
+
+#: src/lib/ecore/ecore_getopt.c:305
+msgid "Copyright:"
+msgstr "Bản Quyền:"
+
+#: src/lib/ecore/ecore_getopt.c:317
+msgid "License:"
+msgstr "Giấy Phép:"
+
+#: src/lib/ecore/ecore_getopt.c:503
+msgid "Type: "
+msgstr "Kiểu:"
+
+#: src/lib/ecore/ecore_getopt.c:579
+msgid "Default: "
+msgstr "Mặc Định:"
+
+#: src/lib/ecore/ecore_getopt.c:606
+msgid "Choices: "
+msgstr "Lựa Chọn:"
+
+#: src/lib/ecore/ecore_getopt.c:644 src/lib/ecore/ecore_getopt.c:645
+msgid "No categories available."
+msgstr "Không có loại nào có sẵn."
+
+#: src/lib/ecore/ecore_getopt.c:649
+msgid "Categories: "
+msgstr "Loại:"
+
+#: src/lib/ecore/ecore_getopt.c:771
+msgid "Options:\n"
+msgstr "Tùy Chọn:\n"
+
+#: src/lib/ecore/ecore_getopt.c:780
+msgid "Positional arguments:\n"
+msgstr "Tham số vị trí:\n"
+
+#: src/lib/ecore/ecore_getopt.c:847
+#, c-format
+msgid "ERROR: unknown category '%s'.\n"
+msgstr "LỖI: không rõ phân loại '%s'.\n"
+
+#: src/lib/ecore/ecore_getopt.c:951
+#, c-format
+msgid "ERROR: unknown option --%s.\n"
+msgstr "LỖI: không rõ tùy chọn --%s.\n"
+
+#: src/lib/ecore/ecore_getopt.c:953
+#, c-format
+msgid "ERROR: unknown option -%c.\n"
+msgstr "LỖI: không rõ tùy chọn -%c.\n"
+
+#: src/lib/ecore/ecore_getopt.c:1016
+msgid "ERROR: "
+msgstr "LỖI:"
+
+#: src/lib/ecore/ecore_getopt.c:1112 src/lib/ecore/ecore_getopt.c:1249
+#: src/lib/ecore/ecore_getopt.c:1265 src/lib/ecore/ecore_getopt.c:1280
+#: src/lib/ecore/ecore_getopt.c:1300 src/lib/ecore/ecore_getopt.c:1347
+#: src/lib/ecore/ecore_getopt.c:1467 src/lib/ecore/ecore_getopt.c:1508
+msgid "value has no pointer set.\n"
+msgstr "giá trị không có trong tập con trỏ.\n"
+
+#: src/lib/ecore/ecore_getopt.c:1144 src/lib/ecore/ecore_getopt.c:1367
+#, c-format
+msgid "unknown boolean value %s.\n"
+msgstr "không biết giá trị kiểu luận lý %s.\n"
+
+#: src/lib/ecore/ecore_getopt.c:1195 src/lib/ecore/ecore_getopt.c:1455
+#, c-format
+msgid "invalid number format %s\n"
+msgstr "định dạng kiểu số không hợp lệ %s\n"
+
+#: src/lib/ecore/ecore_getopt.c:1313
+#, c-format
+msgid "invalid choice \"%s\". Valid values are: "
+msgstr "lựa chọn không hợp lệ \"%s\". Các giá trị hợp lệ là: "
+
+#: src/lib/ecore/ecore_getopt.c:1341
+msgid "missing parameter to append.\n"
+msgstr "thiếu tham số để thêm vào.\n"
+
+#: src/lib/ecore/ecore_getopt.c:1445
+msgid "could not parse value.\n"
+msgstr "không thể phân tích giá trị.\n"
+
+#: src/lib/ecore/ecore_getopt.c:1502
+msgid "missing parameter.\n"
+msgstr "thiếu tham s

[EGIT] [core/efl] efl-1.15 01/01: eldbus: add dbus_pending NULL check

2015-09-22 Thread Thiep Ha
hermet pushed a commit to branch efl-1.15.

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

commit 6a604f15490832bcec18757db64fa597cbd2c6b4
Author: Thiep Ha 
Date:   Wed Sep 23 09:19:59 2015 +0900

eldbus: add dbus_pending NULL check

Summary:
When we call dbus_connection_send_with_reply, the dbus_pending
can be NULL. In this case, the next call dbus_pending_call_set_notify
will cause application crash.
We should check if dbus_pending is NULL before calling dbus API.

@fix

Reviewers: cedric

Subscribers: englebass, cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3081
---
 src/lib/eldbus/eldbus_pending.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/eldbus/eldbus_pending.c b/src/lib/eldbus/eldbus_pending.c
index fa68d03..69ea322 100644
--- a/src/lib/eldbus/eldbus_pending.c
+++ b/src/lib/eldbus/eldbus_pending.c
@@ -157,6 +157,13 @@ _eldbus_connection_send(Eldbus_Connection *conn, 
Eldbus_Message *msg, Eldbus_Mes
 eldbus_pending_dispatch(pending, error_msg);
 return NULL;
  }
+   if (!pending->dbus_pending)
+ {
+error_msg = eldbus_message_error_new(msg, 
"org.enlightenment.DBus.Error",
+ "dbus_pending is NULL.");
+eldbus_pending_dispatch(pending, error_msg);
+return NULL;
+ }
if (dbus_pending_call_set_notify(pending->dbus_pending, cb_pending, 
pending, NULL))
  return pending;
 
@@ -238,7 +245,8 @@ eldbus_pending_dispatch(Eldbus_Pending *pending, 
Eldbus_Message *msg)
 
if (msg) eldbus_message_unref(msg);
eldbus_message_unref(pending->msg_sent);
-   dbus_pending_call_unref(pending->dbus_pending);
+   if (pending->dbus_pending)
+ dbus_pending_call_unref(pending->dbus_pending);
 
pending->cb = NULL;
pending->dbus_pending = NULL;

-- 




[EGIT] [core/efl] master 01/01: eldbus: add dbus_pending NULL check

2015-09-22 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit ffbda5add5a871fdc9f9e4d0078d814240cd59ff
Author: Thiep Ha 
Date:   Wed Sep 23 09:19:59 2015 +0900

eldbus: add dbus_pending NULL check

Summary:
When we call dbus_connection_send_with_reply, the dbus_pending
can be NULL. In this case, the next call dbus_pending_call_set_notify
will cause application crash.
We should check if dbus_pending is NULL before calling dbus API.

@fix

Reviewers: cedric

Subscribers: englebass, cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3081
---
 src/lib/eldbus/eldbus_pending.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/eldbus/eldbus_pending.c b/src/lib/eldbus/eldbus_pending.c
index fa68d03..69ea322 100644
--- a/src/lib/eldbus/eldbus_pending.c
+++ b/src/lib/eldbus/eldbus_pending.c
@@ -157,6 +157,13 @@ _eldbus_connection_send(Eldbus_Connection *conn, 
Eldbus_Message *msg, Eldbus_Mes
 eldbus_pending_dispatch(pending, error_msg);
 return NULL;
  }
+   if (!pending->dbus_pending)
+ {
+error_msg = eldbus_message_error_new(msg, 
"org.enlightenment.DBus.Error",
+ "dbus_pending is NULL.");
+eldbus_pending_dispatch(pending, error_msg);
+return NULL;
+ }
if (dbus_pending_call_set_notify(pending->dbus_pending, cb_pending, 
pending, NULL))
  return pending;
 
@@ -238,7 +245,8 @@ eldbus_pending_dispatch(Eldbus_Pending *pending, 
Eldbus_Message *msg)
 
if (msg) eldbus_message_unref(msg);
eldbus_message_unref(pending->msg_sent);
-   dbus_pending_call_unref(pending->dbus_pending);
+   if (pending->dbus_pending)
+ dbus_pending_call_unref(pending->dbus_pending);
 
pending->cb = NULL;
pending->dbus_pending = NULL;

-- 




[EGIT] [core/elementary] master 01/01: test_dnd: transfer text without markup when drag label

2015-09-18 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

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

commit cb46964852650697d3f345606ab79e6fe6c7c8f8
Author: Thiep Ha 
Date:   Fri Sep 18 11:38:39 2015 +0300

test_dnd: transfer text without markup when drag label

Summary:
In Types Dnd test, if we drag from label to entry, the text is inserted
with "". The reason is that we drag with type ELM_SEL_FORMAT_TEXT
but the transferred data is markup.
This patch fixes it by changing the transferred data to text.

@fix

Reviewers: JackDanielZ

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3072
---
 src/bin/test_dnd.c | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index dd24585..40c2c61 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -1250,14 +1250,26 @@ _label_create_icon(void *data, Evas_Object *parent, 
Evas_Coord *xoff, Evas_Coord
 }
 
 static void
+_label_drag_done_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+   free(data);
+}
+
+static void
 _label_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
 {
Evas_Object *lb = data;
-   const char *text = elm_object_text_get(lb);
+   const char *mkup = elm_object_text_get(lb);
+   char *text = evas_textblock_text_markup_to_utf8(NULL, mkup);
 
+   if (!text)
+ {
+printf("Cannot convert text\n");
+ }
elm_drag_start(lb, ELM_SEL_FORMAT_TEXT, text, ELM_XDND_ACTION_COPY,
   _label_create_icon, lb,
-  NULL, NULL, NULL, NULL, NULL, NULL);
+  NULL, NULL, NULL, NULL,
+  _label_drag_done_cb, text);
 }
 
 static Evas_Object *

-- 




[EGIT] [core/elementary] master 01/01: dnd/x11: correct coordinates in pos callback

2015-09-18 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=0363553dfced5eb0a8000c3493bf2fb53407f589

commit 0363553dfced5eb0a8000c3493bf2fb53407f589
Author: Thiep Ha 
Date:   Fri Sep 18 11:30:23 2015 +0300

dnd/x11: correct coordinates in pos callback

Summary:
The x, y coordinates in pos callback should be relative to
the top-left of the object.
This patch corrects the x,y coordinates and adds poscb to elementary test
to clearly show the bug case.

Test:
  Run Genlist Dnd Dflt Anim with the change in this patch.
  Drag an item to other genlist and see the printed out item, x, y.

@fix

Reviewers: JackDanielZ

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3063
---
 src/bin/test_dnd.c | 30 ++
 src/lib/elm_cnp.c  | 11 +--
 2 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index 4b6124a..dd24585 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -217,6 +217,14 @@ _strndup(const char *str, size_t len)
return ret;
 }
 
+static void
+_gl_poscb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, 
Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action 
EINA_UNUSED)
+{
+   printf("<%s> <%d> obj: %p, item: %p <%s>, x y: %d %d, posret: %d %d\n",
+  __func__, __LINE__, obj, it, elm_object_item_text_get(it),
+  x, y, xposret, yposret);
+}
+
 static Eina_Bool
 _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, 
Elm_Selection_Data *ev, int xposret EINA_UNUSED, int yposret)
 {  /* This function is called when data is dropped on the genlist */
@@ -761,18 +769,32 @@ void
 test_dnd_genlist_default_anim(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
 {
char buf[PATH_MAX];
-   Evas_Object *win, *gl, *bxx;
+   Evas_Object *win, *gl, *bxx, *bx2, *lb;
int i, j;
 
win = elm_win_util_standard_add("dnd-genlist-default-anim", 
"DnD-Genlist-Default-Anim");
elm_win_autodel_set(win, EINA_TRUE);
 
bxx = elm_box_add(win);
-   elm_box_horizontal_set(bxx, EINA_TRUE);
+   elm_box_horizontal_set(bxx, EINA_FALSE);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bxx);
evas_object_show(bxx);
 
+   lb = elm_label_add(win);
+   elm_object_text_set(lb, "Drag and drop between genlists with default 
anim.");
+   evas_object_size_hint_min_set(lb, 0, 50);
+   evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
+   evas_object_show(lb);
+   elm_box_pack_end(bxx, lb);
+
+   bx2 = elm_box_add(win);
+   elm_box_horizontal_set(bx2, EINA_TRUE);
+   evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bx2);
+   elm_box_pack_end(bxx, bx2);
+
itc1 = elm_genlist_item_class_new();
itc1->item_style = "default";
itc1->func.text_get = gl_text_get;
@@ -791,7 +813,7 @@ test_dnd_genlist_default_anim(void *data EINA_UNUSED, 
Evas_Object *obj EINA_UNUS
   _gl_item_getcb,
   NULL, NULL,
   NULL, NULL,
-  NULL, NULL,
+  _gl_poscb, NULL,
   _gl_dropcb, NULL);
 
 elm_drag_item_container_add(gl, ANIM_TIME, DRAG_TIMEOUT,
@@ -802,7 +824,7 @@ test_dnd_genlist_default_anim(void *data EINA_UNUSED, 
Evas_Object *obj EINA_UNUS
 //elm_genlist_mode_set(gl, ELM_LIST_LIMIT);
 evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
 evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
-elm_box_pack_end(bxx, gl);
+elm_box_pack_end(bx2, gl);
 evas_object_show(gl);
 
 for (i = 0; i < 20; i++)
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index d9e6c51..00d5aa5 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1331,10 +1331,13 @@ _x11_dnd_dropable_handle(Dropable *dropable, Evas_Coord 
x, Evas_Coord y, Elm_Xdn
  {
 if (last_dropable == dropable) // same
   {
+ Evas_Coord ox, oy;
+
  cnp_debug("same obj dropable %p\n", dropable->obj);
+ evas_object_geometry_get(dropable->obj, &ox, &oy, NULL, NULL);
  EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
 if ((cbs->types & dropable->last.format) && cbs->poscb)
-  cbs->poscb(cbs->posdata, dropable->obj, x, y, action);
+  cbs->poscb(cbs->posdata, dropable->obj, x - ox, y - oy, 
action);
   }
 else
   {
@@ -1367,7 +1370,10 @@ _x11_dnd_dropable_handle(Dropable *dropable, Evas_Coord 
x, Evas_Coord

[EGIT] [core/efl] master 06/09: ecore_ipc: remove redundant code

2015-07-27 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit 88b2bfe4354fdbd975d11096108d6e486918f0c6
Author: Thiep Ha 
Date:   Tue Jul 28 01:08:11 2015 +0200

ecore_ipc: remove redundant code

Summary:
buf is always NULL (already freed and set to NULL).
We don't need to add NULL checking and free it.

Reviewers: raster, cedric, Hermet

Subscribers: seoz, cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_ipc/ecore_ipc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 78f725a..4588199 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1506,12 +1506,11 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, 
int ev_type EINA_UNUSED, vo
 }
   svr->prev.i = msg;
   offset += (s + msg.size);
-  if ((svr->buf_size == offset) && ((svr->buf) || (buf)))
+  if ((svr->buf_size == offset) && (svr->buf))
 {
if (svr->buf) free(svr->buf);
svr->buf = NULL;
svr->buf_size = 0;
-   if (buf) free(buf);
return ECORE_CALLBACK_CANCEL;
 }
   goto redo;

-- 




[EGIT] [core/elementary] master 01/01: cnp: change drag win type to ELM_WIN_DND

2015-07-06 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=259a98431ce293df56794668998a80efc80035dc

commit 259a98431ce293df56794668998a80efc80035dc
Author: Thiep Ha 
Date:   Mon Jul 6 22:46:48 2015 +0300

cnp: change drag win type to ELM_WIN_DND

Summary:
Drag win should use ELM_WIN_DND.
The drag win in _drag_start function was added when ELM_WIN_DND
was not supported. Now we have ELM_WIN_DND, drag win needs to
change to ELM_WIN_DND.

@fix

Reviewers: JackDanielZ, cedric, Hermet

Subscribers: seoz

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

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 886f2a6..08c02be 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2175,7 +2175,7 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 (void *)(long)xwin);
handler_status = ecore_event_handler_add(ECORE_X_EVENT_XDND_STATUS,
 _x11_dnd_status, NULL);
-   dragwin = elm_win_add(NULL, "Elm-Drag", ELM_WIN_UTILITY);
+   dragwin = elm_win_add(NULL, "Elm-Drag", ELM_WIN_DND);
elm_win_alpha_set(dragwin, EINA_TRUE);
elm_win_override_set(dragwin, EINA_TRUE);
xdragwin = _x11_elm_widget_xwin_get(dragwin);
@@ -4244,7 +4244,7 @@ _drag_anim_start(void *data)
st->icons = _anim_icons_make(st->user_info.icons);
if (st->user_info.createicon)
  {
-Evas_Object *temp_win = elm_win_add(NULL, "Temp", ELM_WIN_UTILITY);
+Evas_Object *temp_win = elm_win_add(NULL, "Temp", ELM_WIN_DND);
 Evas_Object *final_icon = 
st->user_info.createicon(st->user_info.createdata, temp_win, NULL, NULL);
 evas_object_geometry_get(final_icon, NULL, NULL, &st->final_icon_w, 
&st->final_icon_h);
 evas_object_del(final_icon);

-- 




[EGIT] [core/elementary] master 01/01: cnp: remove redundant code

2015-07-02 Thread Thiep Ha
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4477973f488e75fe1c87adc5c3c275cb6ebff78c

commit 4477973f488e75fe1c87adc5c3c275cb6ebff78c
Author: Thiep Ha 
Date:   Thu Jul 2 19:58:15 2015 +0900

cnp: remove redundant code

Summary: Remove redundant NULL assign code

Reviewers: cedric, Hermet, JackDanielZ

Reviewed By: JackDanielZ

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D2782
---
 src/lib/elm_cnp.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0424e31..886f2a6 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1862,8 +1862,6 @@ _x11_elm_cnp_selection_set(Ecore_X_Window xwin, 
Evas_Object *obj, Elm_Sel_Type s
if (sel->widget)
  evas_object_event_callback_del_full(sel->widget, EVAS_CALLBACK_DEL,
  _x11_sel_obj_del, sel);
-   sel->widget = NULL;
-
sel->active = EINA_TRUE;
sel->widget = obj;
sel->xwin = xwin;
@@ -1952,8 +1950,6 @@ _x11_elm_cnp_selection_get(Ecore_X_Window xwin, const 
Evas_Object *obj, Elm_Sel_
if (sel->requestwidget)
  evas_object_event_callback_del_full(sel->requestwidget, EVAS_CALLBACK_DEL,
  _x11_sel_obj_del2, sel);
-   sel->requestwidget = NULL;
-
sel->requestformat = format;
sel->requestwidget = (Evas_Object *)obj;
sel->xwin = xwin;
@@ -2390,8 +2386,6 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type 
selection, Elm_Sel_Form
  evas_object_event_callback_del_full(sel->widget,
  EVAS_CALLBACK_DEL,
  _wl_sel_obj_del, &wl_cnp_selection);
-   sel->widget = NULL;
-
sel->active = EINA_TRUE;
sel->seltype = selection;
sel->widget = obj;
@@ -2470,8 +2464,6 @@ _wl_elm_cnp_selection_get(const Evas_Object *obj, 
Elm_Sel_Type selection, Elm_Se
  evas_object_event_callback_del_full(sel->requestwidget,
  EVAS_CALLBACK_DEL,
  _wl_sel_obj_del2, &wl_cnp_selection);
-   sel->requestwidget = NULL;
-
sel->requestformat = format;
sel->requestwidget = (Evas_Object *) obj;
sel->win = win;

-- 




[EGIT] [core/elementary] master 01/01: cnp: remove loss callback when object is deleted

2015-06-24 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

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

commit f25823aa4be7e2f3ddbddba006a90bdd68b3f173
Author: Thiep Ha 
Date:   Thu Jun 25 08:54:36 2015 +0300

cnp: remove loss callback when object is deleted

Summary:
SEG_FAULT happens when the object which has selection is deleted,
and new selection is done at another object.
Reason: loss_cb is not removed when the object which has selection is 
deleted.
When new selection is set for new object, the loss_cb is called for deleted
object. As result, SEG_FAULT happens.

Test Plan:
Run elementary test, open Entry, do selection,
close Entry window, open Entry one more time, do selection.

Reviewers: JackDanielZ

Differential Revision: https://phab.enlightenment.org/D2763
---
 src/lib/elm_cnp.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0bee00a..301994d 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -669,7 +669,12 @@ static void
 _x11_sel_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void 
*event_info EINA_UNUSED)
 {
X11_Cnp_Selection *sel = data;
-   if (sel->widget == obj) sel->widget = NULL;
+   if (sel->widget == obj)
+ {
+sel->loss_cb = NULL;
+sel->loss_data = NULL;
+sel->widget = NULL;
+ }
if (dragwidget == obj) dragwidget = NULL;
 }
 

-- 




[EGIT] [core/elementary] master 01/01: entry: emit changed, user signal when text is pasted or dropped

2015-06-16 Thread Thiep Ha
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=23c1cc758ea1b6dde2a66e1f44856af9204820ea

commit 23c1cc758ea1b6dde2a66e1f44856af9204820ea
Author: Thiep Ha 
Date:   Tue Jun 16 14:41:55 2015 +0100

entry: emit changed,user signal when text is pasted or dropped

Summary:
When text is pasted or dropped into entry, the "changed,user" signal
should be emitted, not "changed" signal.
Currently, the "changed" signal is emitted.
This patch fixes this issue.

@fix

Reviewers: herdsman, tasn

Subscribers: tasn

Differential Revision: https://phab.enlightenment.org/D2710
---
 src/lib/elm_entry.c | 20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 3eb4c11..6b8002b 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -631,6 +631,17 @@ _elm_entry_theme_group_get(Evas_Object *obj)
  }
 }
 
+static void
+_edje_entry_user_insert(Evas_Object *obj, const char *data)
+{
+   if (!data) return;
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   sd->changed = EINA_TRUE;
+   edje_object_part_text_user_insert(sd->entry_edje, "elm.text", data);
+   elm_layout_sizing_eval(obj);
+}
+
 static Eina_Bool
 _selection_data_cb(void *data EINA_UNUSED,
Evas_Object *obj,
@@ -661,14 +672,14 @@ _selection_data_cb(void *data EINA_UNUSED,
 len = strlen(tag_string) + strlen(buf);
 entry_tag = alloca(len + 1);
 snprintf(entry_tag, len + 1, tag_string, buf);
-elm_entry_entry_insert(obj, entry_tag);
+_edje_entry_user_insert(obj, entry_tag);
  }
else
  {
 char *txt = _elm_util_text_to_mkup(buf);
 if (txt)
   {
- elm_entry_entry_insert(obj, txt);
+ _edje_entry_user_insert(obj, txt);
  free(txt);
   }
 else
@@ -1373,7 +1384,7 @@ _elm_entry_entry_paste(Evas_Object *obj,
  str = strdup(entry);
if (!str) str = (char *)entry;
 
-   edje_object_part_text_user_insert(sd->entry_edje, "elm.text", str);
+   _edje_entry_user_insert(obj, str);
 
if (str != entry) free(str);
 }
@@ -1436,8 +1447,7 @@ _cut_cb(void *data,
  elm_widget_scroll_hold_pop(data);
 
_selection_store(ELM_SEL_TYPE_CLIPBOARD, data);
-   edje_object_part_text_user_insert(sd->entry_edje, "elm.text", "");
-   elm_layout_sizing_eval(data);
+   _edje_entry_user_insert(data, "");
 }
 
 static void

-- 




[EGIT] [core/elementary] master 02/04: Cnp/X11: move entry-only code in elm_cnp to entry

2015-06-12 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=5e468afa0d5b26cb6628460d3392b4d7aefa12c6

commit 5e468afa0d5b26cb6628460d3392b4d7aefa12c6
Author: Thiep Ha 
Date:   Tue Jun 9 17:04:48 2015 +0900

Cnp/X11: move entry-only code in elm_cnp to entry

There is code in elm_cnp.c which is used to paste data to entry widget only.
This can cause error if widget is not entry.
This patch removes that code in elm_cnp.c and adds datacb to entry
to insert content to entry.

@fix
---
 src/lib/elm_cnp.c   | 67 ++---
 src/lib/elm_entry.c | 54 --
 2 files changed, 64 insertions(+), 57 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 8ccbe09..c38dbf5 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -200,7 +200,6 @@ static  Eina_Bool _local_elm_drop_target_del(Evas_Object 
*obj, Elm_Sel_Format fo
 static Ecore_X_Window _x11_elm_widget_xwin_get(const Evas_Object *obj);
 static Tmp_Info  *_tempfile_new  (int size);
 static int_tmpinfo_free  (Tmp_Info *tmp);
-static Eina_Bool  _pasteimage_append (char *file, Evas_Object *entry);
 
 typedef struct _X11_Cnp_Selection X11_Cnp_Selection;
 
@@ -985,31 +984,8 @@ _x11_notify_handler_text(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
 ddata.action = sel->action;
 sel->datacb(sel->udata, sel->widget, &ddata);
  }
-   else
- {
-char *stripstr, *mkupstr;
-
-stripstr = malloc(data->length + 1);
-if (!stripstr) goto end;
-strncpy(stripstr, (char *)data->data, data->length);
-stripstr[data->length] = '\0';
-cnp_debug("Notify handler text %d %d %p\n", data->format,
-  data->length, data->data);
-mkupstr = _elm_util_text_to_mkup((const char *)stripstr);
-
-if (!mkupstr)
-  {
- ERR("Failed to convert text to markup text!");
- free(stripstr);
- goto end;
-  }
+   else cnp_debug("Paste request\n");
 
-cnp_debug("String is %s (from %s)\n", stripstr, data->data);
-/* TODO BUG: should never NEVER assume it's an elm_entry! */
-_elm_entry_entry_paste(sel->requestwidget, mkupstr);
-free(stripstr);
-free(mkupstr);
- }
 end:
if (sel == (_x11_selections + ELM_SEL_TYPE_XDND))
  ecore_x_dnd_send_finished();
@@ -1167,10 +1143,17 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify *
cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
}
   }
-else
+else if (sel->datacb)
   {
- _pasteimage_append(p, sel->requestwidget);
+ Elm_Selection_Data ddata;
+ ddata.x = ddata.y = 0;
+ ddata.format = ELM_SEL_FORMAT_IMAGE;
+ ddata.data = stripstr;
+ ddata.len = strlen(stripstr);
+ sel->datacb(sel->udata, sel->requestwidget, &ddata);
   }
+else cnp_debug("Paste request\n");
+
 savedtypes.imgfile = NULL;
 free(stripstr);
  }
@@ -1237,7 +1220,6 @@ static int
 _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify *notify)
 {
Ecore_X_Selection_Data *data;
-   Tmp_Info *tmp;
 
cnp_debug("got a image file!\n");
data = notify->data;
@@ -1245,6 +1227,7 @@ _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
cnp_debug("Size if %d\n", data->length);
if (sel == (_x11_selections + ELM_SEL_TYPE_XDND))
  {
+Tmp_Info *tmp;
 Eina_List *l;
 Dropable *dropable;
 
@@ -1279,7 +1262,6 @@ _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
   }
 _tmpinfo_free(tmp);
 ecore_x_dnd_send_finished();
-return 0;
  }
else if (sel->datacb)
  {
@@ -1291,16 +1273,8 @@ _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
 ddata.len = data->length;
 ddata.action = sel->action;
 sel->datacb(sel->udata, sel->widget, &ddata);
-return 0;
  }
-   /* generate tmp name */
-   tmp = _tempfile_new(data->length);
-   if (!tmp) return 0;
-   memcpy(tmp->map, data->data, data->length);
-   munmap(tmp->map, data->length);
-   /* FIXME: Add to paste image data to clean up */
-   _pasteimage_append(tmp->filename, sel->requestwidget);
-   _tmpinfo_free(tmp);
+   else cnp_debug("Paste request\n");
return 0;
 }
 
@@ -4005,23 +3979,6 @@ _tmpinfo_free(Tmp_Info *info)
return 0;
 }
 
-static Eina_Bool
-_pasteimage_append(char *file, Evas_Object *entry)
-{
-

[EGIT] [core/elementary] master 03/04: Cnp/X11: correct object parameter in datacb

2015-06-12 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=855ef0dbd4cc7ca53580594df36b50131122bb02

commit 855ef0dbd4cc7ca53580594df36b50131122bb02
Author: Thiep Ha 
Date:   Tue Jun 9 17:06:45 2015 +0900

Cnp/X11: correct object parameter in datacb

The object parameter in datacb must be the selection request object,
not the selection owner object.
This patch corrects that.

Test case: open two windows with entry, copy text from one entry in
first window, paste to entry in other window.

@fix
---
 src/lib/elm_cnp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index c38dbf5..88cdffc 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -982,7 +982,7 @@ _x11_notify_handler_text(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
 ddata.data = data->data;
 ddata.len = data->length;
 ddata.action = sel->action;
-sel->datacb(sel->udata, sel->widget, &ddata);
+sel->datacb(sel->udata, sel->requestwidget, &ddata);
  }
else cnp_debug("Paste request\n");
 
@@ -1210,7 +1210,7 @@ _x11_vcard_receive(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify *notif
 ddata.data = data->data;
 ddata.len = data->length;
 ddata.action = sel->action;
-sel->datacb(sel->udata, sel->widget, &ddata);
+sel->datacb(sel->udata, sel->requestwidget, &ddata);
  }
else cnp_debug("Paste request\n");
return 0;
@@ -1272,7 +1272,7 @@ _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
 ddata.data = data->data;
 ddata.len = data->length;
 ddata.action = sel->action;
-sel->datacb(sel->udata, sel->widget, &ddata);
+sel->datacb(sel->udata, sel->requestwidget, &ddata);
  }
else cnp_debug("Paste request\n");
return 0;

-- 




[EGIT] [core/elementary] master 04/04: entry: add dnd image handling

2015-06-12 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

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

commit a17116e74a0106515c181eaa931f99fc6fccf0bb
Author: Thiep Ha 
Date:   Tue Jun 9 17:09:47 2015 +0900

entry: add dnd image handling

When image is dropped into entry, we should insert image to it.
This patch adds image inserting in dropping.

@fix
---
 src/lib/elm_entry.c | 15 +++
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 0401604..3eb4c11 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -687,7 +687,6 @@ _drag_drop_cb(void *data EINA_UNUSED,
   Elm_Selection_Data *drop)
 {
Eina_Bool rv;
-   char *buf;
 
ELM_ENTRY_DATA_GET(obj, sd);
 
@@ -698,20 +697,12 @@ _drag_drop_cb(void *data EINA_UNUSED,
 
if (!rv) WRN("Warning: Failed to position cursor: paste anyway");
 
-   buf = malloc(drop->len + 1);
-   if (!buf)
- {
-ERR("Failed to allocate memory for dropped text %p", obj);
-return EINA_FALSE;
- }
-   memcpy(buf, drop->data, drop->len);
-   buf[drop->len] = '\0';
-   elm_entry_entry_insert(obj, buf);
-   free(buf);
+   rv = _selection_data_cb(NULL, obj, drop);
+
edje_object_part_text_cursor_copy
  (sd->entry_edje, "elm.text", EDJE_CURSOR_USER, /*->*/ EDJE_CURSOR_MAIN);
 
-   return EINA_TRUE;
+   return rv;
 }
 
 static Elm_Sel_Format

-- 




[EGIT] [core/elementary] master 01/04: Dnd/X11: add dnd support for image, uri types

2015-06-12 Thread Thiep Ha
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=562a334fc0e52538df37155d33b354d1c582dd12

commit 562a334fc0e52538df37155d33b354d1c582dd12
Author: Thiep Ha 
Date:   Tue Jun 9 16:51:13 2015 +0900

Dnd/X11: add dnd support for image, uri types

There is no dnd callbacks for image, uri types.
This patch adds dnd callbacks for those types.

@fix
---
 src/lib/elm_cnp.c | 73 +--
 1 file changed, 71 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 31f7d14..8ccbe09 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1139,8 +1139,39 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify *
  }
else
  {
+if (sel == (_x11_selections + ELM_SEL_TYPE_XDND))
+  {
+ Dropable *dropable;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(drops, l, dropable)
+   {
+  if (dropable->obj == sel->requestwidget) break;
+  dropable = NULL;
+   }
+ if (dropable)
+   {
+  Dropable_Cbs *cbs;
+  Eina_Inlist *itr;
+  Elm_Selection_Data ddata;
+
+  dropable = eina_list_data_get(l);
+  ddata.x = savedtypes.x;
+  ddata.y = savedtypes.y;
+  ddata.format = ELM_SEL_FORMAT_IMAGE;
+  ddata.data = stripstr;
+  ddata.len = strlen(stripstr);
+  ddata.action = sel->action;
+  EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
+ if ((cbs->types & dropable->last.format) && cbs->dropcb)
+   cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
+   }
+  }
+else
+  {
+ _pasteimage_append(p, sel->requestwidget);
+  }
 savedtypes.imgfile = NULL;
-_pasteimage_append(p, sel->requestwidget);
 free(stripstr);
  }
return 0;
@@ -1212,7 +1243,45 @@ _x11_notify_handler_image(X11_Cnp_Selection *sel, 
Ecore_X_Event_Selection_Notify
data = notify->data;
 
cnp_debug("Size if %d\n", data->length);
-   if (sel->datacb)
+   if (sel == (_x11_selections + ELM_SEL_TYPE_XDND))
+ {
+Eina_List *l;
+Dropable *dropable;
+
+tmp = _tempfile_new(data->length);
+if (!tmp)
+  {
+ ecore_x_dnd_send_finished();
+ return 0;
+  }
+memcpy(tmp->map, data->data, data->length);
+munmap(tmp->map, data->length);
+EINA_LIST_FOREACH(drops, l, dropable)
+  {
+ if (dropable->obj == sel->requestwidget) break;
+ dropable = NULL;
+  }
+if (dropable)
+  {
+ Dropable_Cbs *cbs;
+ Eina_Inlist *itr;
+ Elm_Selection_Data ddata;
+
+ ddata.x = savedtypes.x;
+ ddata.y = savedtypes.y;
+ ddata.format = ELM_SEL_FORMAT_IMAGE;
+ ddata.data = tmp->filename;
+ ddata.len = strlen(tmp->filename);
+ ddata.action = sel->action;
+ EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
+if ((cbs->types & dropable->last.format) && cbs->dropcb)
+  cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
+  }
+_tmpinfo_free(tmp);
+ecore_x_dnd_send_finished();
+return 0;
+ }
+   else if (sel->datacb)
  {
 Elm_Selection_Data ddata;
 

-- 




[EGIT] [core/elementary] master 01/02: transit: add NULL check for memory allocation.

2015-06-11 Thread Thiep Ha
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=96d56fa9ec914d1de733ee9e3dce86ea4d2a7ced

commit 96d56fa9ec914d1de733ee9e3dce86ea4d2a7ced
Author: Thiep Ha 
Date:   Thu Jun 11 12:05:10 2015 +0200

transit: add NULL check for memory allocation.

Summary: Adding Null checking when allocate memory.

Reviewers: Hermet, seoz

Subscribers: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/elm_transit.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c
index f1f0eb2..ade9390 100644
--- a/src/lib/elm_transit.c
+++ b/src/lib/elm_transit.c
@@ -117,6 +117,11 @@ _transit_obj_data_save(Evas_Object *obj)
  }
 
obj_data = ELM_NEW(Elm_Transit_Obj_Data);
+   if (!obj_data)
+ {
+ERR("Failed to allocate memory");
+return;
+ }
 
evas_object_geometry_get(obj, &obj_data->state.x, &obj_data->state.y,
 &obj_data->state.w, &obj_data->state.h);
@@ -1119,7 +1124,7 @@ _transit_effect_zoom_op(Elm_Transit_Effect *effect, 
Elm_Transit *transit , doubl
EINA_LIST_FOREACH(transit->objs, elist, obj)
  {
 obj_data = evas_object_data_get(obj, _transit_key);
-if (obj_data->state.map_enabled)
+if (obj_data && obj_data->state.map_enabled)
   {
  base_map = obj_data->state.map;
  if (!base_map) return;
@@ -2341,7 +2346,7 @@ _transit_effect_rotation_op(Elm_Transit_Effect *effect, 
Elm_Transit *transit, do
EINA_LIST_FOREACH(transit->objs, elist, obj)
  {
 obj_data = evas_object_data_get(obj, _transit_key);
-if (obj_data->state.map_enabled)
+if (obj_data && obj_data->state.map_enabled)
   {
  base_map = obj_data->state.map;
  if (!base_map) return;

-- 




[EGIT] [core/elementary] master 02/02: widget: Add null check

2015-06-11 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit c5f40609db341ea75064eaf1d2b9fa324db6291d
Author: Thiep Ha 
Date:   Thu Jun 11 12:05:52 2015 +0200

widget: Add null check

Summary: Adding NULL checking when allocate memory.

Reviewers: Hermet, seoz, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/elm_widget.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 8ebb23f..09cd815 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -1645,6 +1645,11 @@ _elm_widget_event_callback_add(Eo *obj EINA_UNUSED, 
Elm_Widget_Smart_Data *sd, E
EINA_SAFETY_ON_NULL_RETURN(func);
 
Elm_Event_Cb_Data *ecb = ELM_NEW(Elm_Event_Cb_Data);
+   if (!ecb)
+ {
+ERR("Failed to allocate memory");
+return;
+ }
ecb->func = func;
ecb->data = data;
sd->event_cb = eina_list_append(sd->event_cb, ecb);
@@ -5229,6 +5234,11 @@ _elm_widget_item_part_text_custom_set(Eo *eo_item 
EINA_UNUSED,
if (!label)
  {
 label = malloc(sizeof(Elm_Label_Data));
+if (!label)
+  {
+ ERR("Failed to allocate memory");
+ return;
+  }
 label->part = eina_stringshare_add(part);
 label->text = eina_stringshare_add(text);
 eina_hash_add(item->labels, part, label);

-- 




[EGIT] [core/efl] master 01/02: Eo: Add Null check

2015-06-11 Thread Thiep Ha
tasn pushed a commit to branch master.

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

commit ac09acd5080df05c4f3049b30bbc656c9dc21f39
Author: Thiep Ha 
Date:   Thu Jun 11 09:46:36 2015 +0100

Eo: Add Null check

Summary: Add Null checking when allocate memory.

Reviewers: cedric, tasn

Reviewed By: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2664
---
 src/lib/eo/Eo.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 02a5520..b9ef082 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -180,6 +180,8 @@ static inline Eo_Dbg_Info *
 EO_DBG_INFO_LIST_APPEND(Eo_Dbg_Info *list, const char *name)
 {
Eo_Dbg_Info *tmp = (Eo_Dbg_Info *)calloc(1, sizeof(*tmp));
+
+   if (!tmp) return NULL;
tmp->name = eina_stringshare_add(name);
eina_value_list_setup(&(tmp->value), EO_DBG_INFO_TYPE);
if (list)
@@ -203,6 +205,8 @@ do { \
if (List) \
  { \
 Eo_Dbg_Info *Tmp = calloc(1, sizeof(*Tmp)); \
+\
+if (!Tmp) break; \
 Tmp->name = eina_stringshare_add(NAME); \
 eina_value_setup(&(Tmp->value), TYPE); \
 eina_value_set(&(Tmp->value), VALUE); \

-- 




[EGIT] [core/elementary] master 01/01: fileselector button: correct window parent finding

2015-05-21 Thread Thiep Ha
seoz pushed a commit to branch master.

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

commit a91801a5c6c2b89e970d53817a9c8b42e2335518
Author: Thiep Ha 
Date:   Fri May 22 03:35:47 2015 +0900

fileselector button: correct window parent finding

Summary:
Fileselector button fails to run in inwin mode.
It is caused by incorrect window parent finding.
This patch corrects the window parent finding.

@fix

Test Plan:
run FileSelector Button, toggle Inwin mode option to on,
eo gives error and nothing is shown.

Reviewers: Hermet, seoz

Reviewed By: seoz

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

diff --git a/src/lib/elc_fileselector_button.c 
b/src/lib/elc_fileselector_button.c
index fb64c68..b62b684 100644
--- a/src/lib/elc_fileselector_button.c
+++ b/src/lib/elc_fileselector_button.c
@@ -103,7 +103,7 @@ _new_window_add(Elm_Fileselector_Button_Data *sd)
 static Evas_Object *
 _parent_win_get(Evas_Object *obj)
 {
-   while (eo_isa(obj, ELM_WIN_CLASS))
+   while (!eo_isa(obj, ELM_WIN_CLASS))
  obj = elm_object_parent_widget_get(obj);
 
return obj;

-- 




[EGIT] [core/elementary] elementary-1.14 01/01: entry: update selection handlers when entry is resized

2015-05-19 Thread Thiep Ha
hermet pushed a commit to branch elementary-1.14.

http://git.enlightenment.org/core/elementary.git/commit/?id=8e73bbf8ca0461915ad85eaadb54133eb9100b05

commit 8e73bbf8ca0461915ad85eaadb54133eb9100b05
Author: Thiep Ha 
Date:   Tue May 19 21:13:55 2015 +0900

entry: update selection handlers when entry is resized

Summary:
When entry is resized, selection handlers are not updated,
it causes selection handlers to be placed in wrong position.
This patch fixes it.

@fix

Reviewers: woohyun, seoz, herdsman, Hermet

Reviewed By: Hermet

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

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 9e2e743..d8eee9a 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -3649,7 +3649,8 @@ _elm_entry_evas_object_smart_resize(Eo *obj, 
Elm_Entry_Data *sd, Evas_Coord w, E
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
 
evas_object_resize(sd->hit_rect, w, h);
-
+   if (sd->have_selection)
+ _update_selection_handler(obj);
 }
 
 EOLIAN static void

-- 




[EGIT] [core/elementary] master 01/01: entry: update selection handlers when entry is resized

2015-05-19 Thread Thiep Ha
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4c35ee470ea3bd17b21d608d715733a0619bb95c

commit 4c35ee470ea3bd17b21d608d715733a0619bb95c
Author: Thiep Ha 
Date:   Tue May 19 21:13:55 2015 +0900

entry: update selection handlers when entry is resized

Summary:
When entry is resized, selection handlers are not updated,
it causes selection handlers to be placed in wrong position.
This patch fixes it.

@fix

Reviewers: woohyun, seoz, herdsman, Hermet

Reviewed By: Hermet

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

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index c39b212..23ce545 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -3647,7 +3647,8 @@ _elm_entry_evas_object_smart_resize(Eo *obj, 
Elm_Entry_Data *sd, Evas_Coord w, E
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
 
evas_object_resize(sd->hit_rect, w, h);
-
+   if (sd->have_selection)
+ _update_selection_handler(obj);
 }
 
 EOLIAN static void

-- 




[EGIT] [core/efl] master 06/08: ecore_file: add more tests for ecore_file.

2015-04-28 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit 5c4eea6fffd4aef3d98f713e4f1de9242d0e1a02
Author: Thiep Ha 
Date:   Tue Apr 28 11:19:15 2015 +0200

ecore_file: add more tests for ecore_file.

Summary:
This patch adds more tests for ecore_file.
It helps examine unchecked cases.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/tests/ecore/ecore_test_ecore_file.c | 89 +
 1 file changed, 89 insertions(+)

diff --git a/src/tests/ecore/ecore_test_ecore_file.c 
b/src/tests/ecore/ecore_test_ecore_file.c
index c7acd9f..d36131d 100644
--- a/src/tests/ecore/ecore_test_ecore_file.c
+++ b/src/tests/ecore/ecore_test_ecore_file.c
@@ -127,7 +127,9 @@ END_TEST
 START_TEST(ecore_test_ecore_file_operations)
 {
const char* dirs[] = {"b", "b/c", "b/c/d", "d", 0};
+   char *dirs2[] = {"a2", "b2", "c2", 0};
const char *src_dir, *src_file, *dest_file;
+   const char *not_exist_file;
const char *tmpdir = NULL;
char *dup_dir, *path;
char *random_text = "This is random test String";
@@ -137,6 +139,7 @@ START_TEST(ecore_test_ecore_file_operations)
char dir[MAXSIZE] = {'\0'};
unsigned int ret;
int fd;
+   int i;
Eina_Bool res;
Eina_List *list, *l;
 
@@ -295,6 +298,92 @@ START_TEST(ecore_test_ecore_file_operations)
ret = setenv("PATH", src_dir, 1);
fail_if(ret != 0);
 
+   src_dir = get_tmp_dir();
+   fail_if(!src_dir);
+   strcpy(dir, src_dir);
+   strcat(dir, "/");
+   strcat(dir, dirs[0]);
+   fail_if(ecore_file_mkdir(dir) != EINA_TRUE);
+
+   fail_if(ecore_file_mkdirs(NULL) != -1);
+   for (i = 0; i < 3; i++)
+ {
+char tmp[PATH_MAX];
+strcpy(tmp, src_dir);
+strcat(tmp, "/");
+strcat(tmp, dirs2[i]);
+dirs2[i] = strdup(tmp);
+ }
+   fail_if(ecore_file_mkdirs((const char **)dirs2) != 3);
+   for (i = 0; i < 3; i++)
+ free(dirs2[i]);
+
+   fail_if(ecore_file_mksubdirs(src_dir, NULL) != -1);
+   fail_if(ecore_file_mksubdirs(NULL, dirs) != -1);
+   fail_if(ecore_file_mksubdirs("", dirs) != -1);
+   fail_if(ecore_file_mksubdirs(src_file, dirs) != 0);
+
+   src_dir = get_tmp_dir();
+   fail_if(!src_dir);
+   fail_if(ecore_file_rmdir(src_dir) != EINA_TRUE);
+   fail_if(ecore_file_dir_is_empty(src_dir) != -1);
+   fail_if(ecore_file_ls(src_dir) != NULL);
+
+   not_exist_file = get_tmp_file();
+   fail_if(!not_exist_file);
+   fail_if(ecore_file_remove(not_exist_file) != EINA_TRUE);
+   fail_if(ecore_file_exists(not_exist_file) != EINA_FALSE);
+   fail_if(ecore_file_mod_time(not_exist_file) != 0);
+   fail_if(ecore_file_size(not_exist_file) != 0);
+
+   ck_assert_str_eq(ecore_file_realpath(NULL), "");
+   ck_assert_str_eq(ecore_file_realpath(not_exist_file), "");
+
+   src_file = get_tmp_file();
+   fail_if(!src_file);
+   fail_if(ecore_file_remove(src_file) != EINA_TRUE);
+   fd = open(src_file, O_RDWR|O_CREAT, 0400);
+   fail_if(fd < 0);
+   fail_if(close(fd) != 0);
+   fail_if(ecore_file_can_read(src_file) != EINA_TRUE);
+   fail_if(ecore_file_can_write(src_file) != EINA_FALSE);
+   fail_if(ecore_file_can_exec(src_file) != EINA_FALSE);
+   fail_if(ecore_file_cp(src_file, src_file) != EINA_FALSE);
+
+   src_file = get_tmp_file();
+   fail_if(!src_file);
+   fail_if(ecore_file_remove(src_file) != EINA_TRUE);
+   fd = open(src_file, O_RDWR|O_CREAT, 0200);
+   fail_if(fd < 0);
+   fail_if(close(fd) != 0);
+   fail_if(ecore_file_can_read(src_file) != EINA_FALSE);
+   fail_if(ecore_file_can_write(src_file) != EINA_TRUE);
+   fail_if(ecore_file_can_exec(src_file) != EINA_FALSE);
+
+   src_file = get_tmp_file();
+   fail_if(!src_file);
+   fail_if(ecore_file_remove(src_file) != EINA_TRUE);
+   fd = open(src_file, O_RDWR|O_CREAT, 0100);
+   fail_if(fd < 0);
+   fail_if(close(fd) != 0);
+   fail_if(ecore_file_can_read(src_file) != EINA_FALSE);
+   fail_if(ecore_file_can_write(src_file) != EINA_FALSE);
+   fail_if(ecore_file_can_exec(src_file) != EINA_TRUE);
+
+   fail_if(ecore_file_unlink(not_exist_file) != EINA_FALSE);
+   fail_if(ecore_file_remove(not_exist_file) != EINA_FALSE);
+   fail_if(ecore_file_cp(not_exist_file, "test_file") != EINA_FALSE);
+   fail_if(ecore_file_mv(not_exist_file, "test_file") != EINA_FALSE);
+
+   fail_if(ecore_file_mkpath(src_dir) != EINA_TRUE);
+   fail_if(ecore_file_mkpath(NULL) != EINA_FALSE);
+   fail_if(ecore_file_mkpaths(dirs) != 4);
+   fail_if(ecore_file_mkpaths(NULL) != -1);
+
+   fail_if(ecore_file_dir_get(NULL) != NULL);
+   fail_if(ecore_file_strip_ext(NULL) != NULL);
+   fail_if(ecore_file_escape_name(NULL) != NULL);
+
ret = ecore_file_shutdown();
fail_if(ret != 0);
 

-- 




[EGIT] [core/efl] master 01/01: ecore_evas: move docs from .c to .h and make it consistence

2015-04-26 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit 47f5d668ccea383305989760181ad7b35c10a9f3
Author: Thiep Ha 
Date:   Sun Apr 26 09:20:11 2015 +0200

ecore_evas: move docs from .c to .h and make it consistence

Summary:
There are some documents in .c file. This patch moves them to .h
file. This also uses primitive verbs in brief section to make document
more consistence.

Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_evas/Ecore_Evas.h | 220 +---
 src/lib/ecore_evas/ecore_evas.c | 122 --
 2 files changed, 160 insertions(+), 182 deletions(-)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index d65e11b..9fb5923 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -178,7 +178,7 @@ EAPI voidecore_evas_app_comp_sync_set(Eina_Bool 
do_sync);
 EAPI Eina_Bool   ecore_evas_app_comp_sync_get(void);
 
 /**
- * @brief Returns a list of supported engines names.
+ * @brief Return a list of supported engines names.
  *
  * @return Newly allocated list with engines names. Engines names
  * strings are internal and should be considered constants, do not
@@ -192,7 +192,7 @@ EAPI Eina_List  *ecore_evas_engines_get(void);
  */
 EAPI voidecore_evas_engines_free(Eina_List *engines);
 /**
- * @brief Creates a new Ecore_Evas based on engine name and common parameters.
+ * @brief Create a new Ecore_Evas based on engine name and common parameters.
  *
  * @param engine_name engine name as returned by
  *ecore_evas_engines_get() or @c NULL to use environment variable
@@ -566,7 +566,7 @@ EAPI Eina_Bool   ecore_evas_focus_skip_get(const Ecore_Evas 
*ee);
  */
 EAPI voidecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool 
ignore);
 /**
- * @brief Returns the ignore state of an Ecore_Evas' window.
+ * @brief Return the ignore state of an Ecore_Evas' window.
  *
  * @param ee The Ecore_Evas whose window's ignore events state is returned.
  * @return The Ecore_Evas window's ignore state.
@@ -874,7 +874,7 @@ EAPI void ecore_evas_msg_parent_send(Ecore_Evas *ee, int 
msg_domain, int msg_id,
  */
 EAPI void ecore_evas_msg_send(Ecore_Evas *ee, int msg_domain, int msg_id, void 
*data, int size);
 /**
- * Set a callback for parent Ecore_Evas message.
+ * @brief Set a callback for parent Ecore_Evas message.
  *
  * @param ee The Ecore_Evas to set callbacks on
  * @param func_parent_handle The handle to be called when message arive.
@@ -888,7 +888,7 @@ EAPI void ecore_evas_msg_send(Ecore_Evas *ee, int 
msg_domain, int msg_id, void *
  */
 EAPI void ecore_evas_callback_msg_parent_handle_set(Ecore_Evas *ee, void 
(*func_parent_handle)(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, 
int size));
 /**
- * Set a callback for child Ecore_Evas message.
+ * @brief Set a callback for child Ecore_Evas message.
  *
  * @param ee The Ecore_Evas to set callbacks on
  * @param func_handle  The handle to be called when message arive
@@ -1065,7 +1065,7 @@ EAPI voidecore_evas_name_class_set(Ecore_Evas 
*ee, const char *n, const
  */
 EAPI voidecore_evas_name_class_get(const Ecore_Evas *ee, const char 
**n, const char **c);
 /**
- * @brief Returns a pointer to the underlying window.
+ * @brief Return a pointer to the underlying window.
  *
  * @param ee The Ecore_Evas whose window is desired.
  * @return A pointer to the underlying window.
@@ -1075,10 +1075,52 @@ EAPI voidecore_evas_name_class_get(const 
Ecore_Evas *ee, const char **n,
 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee);
 
 /* engine/target specific init calls */
+
+/**
+ * @brief Create Ecore_Evas using software x11.
+ * @note If ecore is not compiled with support to x11 then nothing is done and 
NULL is returned.
+ * @param disp_name The name of the Ecore_Evas to be created.
+ * @param parent The parent of the Ecore_Evas to be created.
+ * @param x The X coordinate to be used.
+ * @param y The Y coordinate to be used.
+ * @param w The width of the Ecore_Evas to be created.
+ * @param h The height of the Ecore_Evas to be created.
+ * @return A handle to the created Ecore_Evas.
+ */
 EAPI Ecore_Evas *ecore_evas_software_x11_new(const char *disp_name, 
Ecore_X_Window parent, int x, int y, int w, int h);
+
+/**
+ * @brief Get the window from Ecore_Evas using software x11.
+ * @note If ecore is not compiled with support for x11 or if @p ee was not
+ * created with ecore_evas_software_x11_new() then nothing is done and
+ * 0 is returned.
+ * @param ee The Ecore_Evas from which to get the window.
+ * @return The window of type Ecore_X_Window.
+ */
 EAPI Ecore_X_Window  ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
+

[EGIT] [core/efl] master 01/04: eina: correct document for eina_hash_list_prepend/remove.

2015-04-25 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit 5c997ea4a34d5cfc8e3f5bb49b11a0ec60c03993
Author: Thiep Ha 
Date:   Sat Apr 25 19:34:16 2015 +0200

eina: correct document for eina_hash_list_prepend/remove.

Summary:
The eina_hash_list_preprend/remove API have wrong description.
This patch fixes it.

@fix

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/eina/eina_hash.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/eina/eina_hash.h b/src/lib/eina/eina_hash.h
index c19afa2..460af00 100644
--- a/src/lib/eina/eina_hash.h
+++ b/src/lib/eina/eina_hash.h
@@ -1067,26 +1067,26 @@ EAPI void   eina_hash_foreach(const Eina_Hash  
*hash,
  */
 EAPI void eina_hash_list_append(Eina_Hash *hash, const void *key, const void 
*data) EINA_ARG_NONNULL(1, 2, 3);
 /**
- * @brief Append data to an #Eina_List inside a hash
+ * @brief Prepend data to an #Eina_List inside a hash
  *
  * This function is identical to the sequence of calling
- * eina_hash_find(), eina_list_append(), eina_hash_set(),
+ * eina_hash_find(), eina_list_prepend(), eina_hash_set(),
  * but with one fewer required hash lookup.
  * @param hash The hash table
  * @param key The key associated with the data
- * @param data The data to append to the list
+ * @param data The data to prepend to the list
  * @since 1.10
  */
 EAPI void eina_hash_list_prepend(Eina_Hash *hash, const void *key, const void 
*data) EINA_ARG_NONNULL(1, 2, 3);
 /**
- * @brief Append data to an #Eina_List inside a hash
+ * @brief Remove data from an #Eina_List inside a hash
  *
  * This function is identical to the sequence of calling
- * eina_hash_find(), eina_list_append(), eina_hash_set(),
+ * eina_hash_find(), eina_list_remove(), eina_hash_set(),
  * but with one fewer required hash lookup.
  * @param hash The hash table
  * @param key The key associated with the data
- * @param data The data to append to the list
+ * @param data The data to remove from the list
  * @since 1.10
  */
 EAPI void eina_hash_list_remove(Eina_Hash *hash, const void *key, const void 
*data) EINA_ARG_NONNULL(1, 2, 3);

-- 




[EGIT] [core/efl] master 02/04: ecore_con: fix typos and improve document consistence.

2015-04-25 Thread Thiep Ha
cedric pushed a commit to branch master.

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

commit 663bdcaf07a5d8550e6fe09d07a7089b1bb7a91c
Author: Thiep Ha 
Date:   Sat Apr 25 19:35:23 2015 +0200

ecore_con: fix typos and improve document consistence.

Summary:
This patch fixes typos and uses primitive verb in brief section
to improve document consistence for ecore_con.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_con/Ecore_Con.h | 180 +-
 1 file changed, 90 insertions(+), 90 deletions(-)

diff --git a/src/lib/ecore_con/Ecore_Con.h b/src/lib/ecore_con/Ecore_Con.h
index 2c99079..0544858 100644
--- a/src/lib/ecore_con/Ecore_Con.h
+++ b/src/lib/ecore_con/Ecore_Con.h
@@ -81,7 +81,7 @@
  * retrieval of the client's ip with @ref ecore_con_client_ip_get and
  * associating data with the client using ecore_con_client_data_set.
  * @li ECORE_CON_EVENT_CLIENT_DEL: Whenever a client connection to an
- * @c Ecore_Con_Server, an event of this type is emitted.  The contents of
+ * @c Ecore_Con_Server is destroyed, an event of this type is emitted.  The 
contents of
  * the data with this event are variable, but if the client object in the data
  * is non-null, it must be freed with @ref ecore_con_client_del.
  * @li ECORE_CON_EVENT_CLIENT_DATA: Whenever a server object receives
@@ -668,7 +668,7 @@ EAPI extern int ECORE_CON_EVENT_URL_PROGRESS;
  */
 
 /**
- * Initialises the Ecore_Con library.
+ * @brief Initialise the Ecore_Con library.
  * @return  Number of times the library has been initialised without being
  *  shut down.
  *
@@ -678,7 +678,7 @@ EAPI extern int ECORE_CON_EVENT_URL_PROGRESS;
 EAPI int   ecore_con_init(void);
 
 /**
- * Shuts down the Ecore_Con library.
+ * @brief Shut down the Ecore_Con library.
  * @return  Number of times the library has been initialised without being
  *  shut down.
  * @note This function already calls ecore_shutdown() internally, so you don't
@@ -700,7 +700,7 @@ EAPI int   ecore_con_shutdown(void);
  */
 
 /**
- * Returns if SSL support is available
+ * @brief Return if SSL support is available
  * @return 1 if SSL is available and provided by gnutls,
  * 2 if SSL is available and provided by openssl,
  * 0 if it is not available.
@@ -844,7 +844,7 @@ EAPI Eina_Bool 
ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_
  */
 
 /**
- * Add a SOCKS v4 proxy to the proxy list
+ * @brief Add a SOCKS v4 proxy to the proxy list
  *
  * Use this to create (or return, if previously added) a SOCKS proxy
  * object which can be used by any ecore_con servers.
@@ -858,7 +858,7 @@ EAPI Eina_Bool 
ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_
 EAPI Ecore_Con_Socks *ecore_con_socks4_remote_add(const char *ip, int port, 
const char *username);
 
 /**
- * Find a SOCKS v4 proxy in the proxy list
+ * @brief Find a SOCKS v4 proxy in the proxy list
  *
  * Use this to determine if a SOCKS proxy was previously added by checking
  * the proxy list against the parameters given.
@@ -873,7 +873,7 @@ EAPI Ecore_Con_Socks *ecore_con_socks4_remote_add(const 
char *ip, int port, cons
 EAPI Eina_Boolecore_con_socks4_remote_exists(const char *ip, int port, 
const char *username);
 
 /**
- * Remove a SOCKS v4 proxy from the proxy list and delete it
+ * @brief Remove a SOCKS v4 proxy from the proxy list and delete it
  *
  * Use this to remove a SOCKS proxy from the proxy list by checking
  * the list against the parameters given. The proxy will then be deleted.
@@ -887,7 +887,7 @@ EAPI Eina_Boolecore_con_socks4_remote_exists(const 
char *ip, int port, c
 EAPI void ecore_con_socks4_remote_del(const char *ip, int port, 
const char *username);
 
 /**
- * Add a SOCKS v5 proxy to the proxy list
+ * @brief Add a SOCKS v5 proxy to the proxy list
  *
  * Use this to create (or return, if previously added) a SOCKS proxy
  * object which can be used by any ecore_con servers.
@@ -902,7 +902,7 @@ EAPI void ecore_con_socks4_remote_del(const 
char *ip, int port, cons
 EAPI Ecore_Con_Socks *ecore_con_socks5_remote_add(const char *ip, int port, 
const char *username, const char *password);
 
 /**
- * Find a SOCKS v5 proxy in the proxy list
+ * @brief Find a SOCKS v5 proxy in the proxy list
  *
  * Use this to determine if a SOCKS proxy was previously added by checking
  * the proxy list against the parameters given.
@@ -918,7 +918,7 @@ EAPI Ecore_Con_Socks *ecore_con_socks5_remote_add(const 
char *ip, int port, cons
 EAPI Eina_Boolecore_con_socks5_remote_exists(const char *ip, int port, 
const char *username, const char *password);
 
 /**
- * Remove a SOCKS v5 proxy from the proxy list and delete it
+ * @br