[EGIT] [core/efl] master 01/01: elementary: stabilize Efl.Ui.Relative_Container

2019-11-29 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit 3ba366498cd73ef4c10caf591e18b6387bcc2a7c
Author: Yeongjong Lee 
Date:   Fri Nov 29 10:43:23 2019 +0100

elementary: stabilize Efl.Ui.Relative_Container

Summary: ref T8380

Reviewers: segfaultxavi, woohyun, zmike, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8380

Differential Revision: https://phab.enlightenment.org/D10641
---
 src/lib/elementary/efl_ui_relative_container.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_relative_container.eo 
b/src/lib/elementary/efl_ui_relative_container.eo
index 9d7a6cbdc6..e4eb219d4f 100644
--- a/src/lib/elementary/efl_ui_relative_container.eo
+++ b/src/lib/elementary/efl_ui_relative_container.eo
@@ -1,5 +1,5 @@
 import efl_gfx_types;
-class @beta Efl.Ui.Relative_Container extends Efl.Ui.Widget implements 
Efl.Pack_Layout, Efl.Pack
+class Efl.Ui.Relative_Container extends Efl.Ui.Widget implements 
Efl.Pack_Layout, Efl.Pack
 {
[[The relative container class.
 

-- 




[EGIT] [core/efl] master 02/02: eo: add missing move tag

2019-11-26 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit a21f615a197e7a1c46a122c0c0d6cf21178f19a1
Author: Yeongjong Lee 
Date:   Fri Nov 22 07:29:27 2019 +

eo: add missing move tag

`efl_access_action_actions_get`
the list is created by `eina_list_append`

`efl_ui_format_values_set`
the accessor is freed in that function.
`efl_ui_format_values_get`
The accessor is created by `eina_inarray_accessor_new`

`efl_core_command_line_command_access`
The accessor is created by `eina_array_accessor_new`

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D10720
---
 src/lib/ecore/efl_core_command_line.eo  | 2 +-
 src/lib/elementary/efl_access_action.eo | 2 +-
 src/lib/elementary/efl_ui_format.eo | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/efl_core_command_line.eo 
b/src/lib/ecore/efl_core_command_line.eo
index 6eec372954..24849be70d 100644
--- a/src/lib/ecore/efl_core_command_line.eo
+++ b/src/lib/ecore/efl_core_command_line.eo
@@ -50,7 +50,7 @@ mixin @beta Efl.Core.Command_Line requires Efl.Object {
 }
 command_access {
   [[ Get the accessor which enables access to each argument that got 
passed to this object. ]]
-  return : accessor;
+  return : accessor @move;
 }
 @property command_array {
   [[ Use an array to fill this object
diff --git a/src/lib/elementary/efl_access_action.eo 
b/src/lib/elementary/efl_access_action.eo
index acaad80188..8f70f0efb1 100644
--- a/src/lib/elementary/efl_access_action.eo
+++ b/src/lib/elementary/efl_access_action.eo
@@ -47,7 +47,7 @@ mixin @beta Efl.Access.Action
  get @pure_virtual {
  }
  values {
-actions: list;
+actions: list @move;
[[Contains statically allocated strings.]]
  }
   }
diff --git a/src/lib/elementary/efl_ui_format.eo 
b/src/lib/elementary/efl_ui_format.eo
index a05cc0b071..3e2bd287bb 100644
--- a/src/lib/elementary/efl_ui_format.eo
+++ b/src/lib/elementary/efl_ui_format.eo
@@ -81,7 +81,7 @@ mixin Efl.Ui.Format requires Efl.Object
performance reasons.
  ]]
  values {
-values: accessor; [[Accessor over a list of 
value-text pairs.
+values: accessor @move; [[Accessor over a 
list of value-text pairs.
  The method will dispose 
of the accessor, but not of
  its contents.
  For convenience, Eina 
offers a range of helper

-- 




[EGIT] [core/efl] master 01/02: eo: add move tag to iterator

2019-11-26 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit fba098df3824c287819b4ae6a9f980b99786c58c
Author: Yeongjong Lee 
Date:   Fri Nov 22 06:13:25 2019 +

eo: add move tag to iterator

It is impossible to reuse iterator after 
`EINA_ITERATOR_FOREACH`(`eina_iterator_next`).

E.g.
```
eina_init();

eina_file_dir_list("/home/", EINA_FALSE, _print_cb, NULL);

it = eina_file_ls("/home/");
EINA_ITERATOR_FOREACH(it, f_name)
  {
 printf("%s\n", f_name);
 eina_stringshare_del(f_name);
  }
EINA_ITERATOR_FOREACH(it, f_name)
  {
 printf("Again %s\n", f_name);
 eina_stringshare_del(f_name);
  }
eina_iterator_free(it);
```
`Agian ...` is never printed.

Therefore, iterator always need `@move` tag to avoid unexpected behavior 
without
any error message.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D10719
---
 src/lib/ecore/efl_boolean_model.eo| 2 +-
 src/lib/ecore/efl_core_env.eo | 2 +-
 src/lib/efl/interfaces/efl_gfx_image.eo   | 4 ++--
 src/lib/efl/interfaces/efl_ui_view_factory.eo | 2 +-
 src/lib/elementary/efl_access_object.eo   | 2 +-
 src/lib/elementary/efl_ui_focus_manager.eo| 4 ++--
 src/lib/elementary/efl_ui_view_model.c| 1 +
 src/lib/elementary/efl_ui_view_model.eo   | 4 ++--
 src/lib/elementary/efl_ui_win.eo  | 2 +-
 9 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/lib/ecore/efl_boolean_model.eo 
b/src/lib/ecore/efl_boolean_model.eo
index f8ee356713..fa5b1405c0 100644
--- a/src/lib/ecore/efl_boolean_model.eo
+++ b/src/lib/ecore/efl_boolean_model.eo
@@ -25,7 +25,7 @@ class @beta Efl.Boolean_Model extends Efl.Composite_Model
 @in name: string; [[The name of the property to examine.]]
 @in request: bool; [[The value to look for.]]
  }
- return: iterator; [[The iterator that is valid until any 
change is made on the model.]]
+ return: iterator @move; [[The iterator that is valid 
until any change is made on the model.]]
   }
}
implements {
diff --git a/src/lib/ecore/efl_core_env.eo b/src/lib/ecore/efl_core_env.eo
index 593a3a3cf5..c17e0a1440 100644
--- a/src/lib/ecore/efl_core_env.eo
+++ b/src/lib/ecore/efl_core_env.eo
@@ -47,7 +47,7 @@ class @beta Efl.Core.Env extends Efl.Object implements 
Efl.Duplicate {
 
 }
 values {
-  iter : iterator;
+  iter : iterator @move;
 }
   }
}
diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo 
b/src/lib/efl/interfaces/efl_gfx_image.eo
index 40ee6ed76f..b9d962b9ab 100644
--- a/src/lib/efl/interfaces/efl_gfx_image.eo
+++ b/src/lib/efl/interfaces/efl_gfx_image.eo
@@ -217,9 +217,9 @@ interface Efl.Gfx.Image
  }
  get {}
  values {
-horizontal: iterator(null); 
[[Representation of areas that are
+horizontal: iterator(null) @move; 
[[Representation of areas that are
 stretchable in the image horizontal space.]]
-vertical: iterator(null); 
[[Representation of areas that are
+vertical: iterator(null) @move; 
[[Representation of areas that are
 stretchable in the image vertical space.]]
  }
   }
diff --git a/src/lib/efl/interfaces/efl_ui_view_factory.eo 
b/src/lib/efl/interfaces/efl_ui_view_factory.eo
index 728c25907c..f4774300a5 100644
--- a/src/lib/efl/interfaces/efl_ui_view_factory.eo
+++ b/src/lib/efl/interfaces/efl_ui_view_factory.eo
@@ -10,7 +10,7 @@ class @beta Efl.Ui.View_Factory
  params {
 factory: Efl.Ui.Factory; [[The factory to use for requesting the 
new object from and generating the created
  event onto.]]
-models: iterator; [[Efl iterator providing the model to 
be associated to the new item. It should
+models: iterator @move; [[Efl iterator providing the 
model to be associated to the new item. It should
  remain valid until the end of the 
function call.]]
  }
  return: future; [[Created UI object]]
diff --git a/src/lib/elementary/efl_access_object.eo 
b/src/lib/elementary/efl_access_object.eo
index d7392f275e..fc16ea2194 100644
--- a/src/lib/elementary/efl_access_object.eo
+++ b/src/lib/elementary/efl_access_object.eo
@@ -263,7 +263,7 @@ mixin @beta Efl.Access.Object requires Efl.Object
   }
   relations_get @protected @beta @const {
  [[Gets an all relations between accessible object and other 
accessible objects.]]
- return: iterator; [[Accessible relation 
set]]
+ return: iterator @move; [[Accessible 
relation set]]
   }
   @property role @beta {
  [[The role of the object in acce

[EGIT] [core/efl] master 01/01: eolian_mono: change OnXXXEvent access modifier from public to protected virtual

2019-11-12 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 790fa0e04b9760ee99ce33839191936159430df5
Author: Yeongjong Lee 
Date:   Wed Nov 13 03:58:39 2019 -0300

eolian_mono: change OnXXXEvent access modifier from public to protected 
virtual

Summary:
OnXXXEvent is event invocation wrapper method to allow derived classes to
override the event invocation behavior.

Test Plan: meson with `-Dbindings=mono,cxx`

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10655
---
 src/bin/eolian_mono/eolian/mono/events.hh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/events.hh 
b/src/bin/eolian_mono/eolian/mono/events.hh
index e6a78577bb..abd5368ccd 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -474,6 +474,7 @@ struct event_definition_generator
{
   auto library_name = 
context_find_tag(context).actual_library_name(klass.filename);
   std::string upper_c_name = utils::to_uppercase(evt.c_name);
+  bool is_concrete = 
context_find_tag(context).current_wrapper_kind == 
class_context::concrete;
 
   if (!as_generator(
 scope_tab << "/// Method to raise event "<< event_name << 
".\n"
@@ -510,7 +511,7 @@ struct event_definition_generator
   if (!as_generator(
 scope_tab << "/// \n"
 << scope_tab << "/// Event to raise.\n"
-<< scope_tab << "public void On" << event_name << "(" << 
event_args_type << " e)\n"
+<< scope_tab << (is_concrete ? "public" : "protected virtual") << 
" void On" << event_name << "(" << event_args_type << " e)\n"
 << scope_tab << "{\n"
 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << 
"\";\n"
 << scope_tab << scope_tab << "IntPtr desc = 
Efl.EventDescription.GetNative(" << library_name << ", key);\n"

-- 




[EGIT] [core/efl] master 01/01: efl_ui_relative_container: rename relative_layout

2019-11-12 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit 246485ca928d26144ca3188d895bb7b44a73d3ad
Author: Yeongjong Lee 
Date:   Tue Nov 12 13:46:20 2019 +0100

efl_ui_relative_container: rename relative_layout

Summary:
Also,
Rename parameter name `target` to `base`.
Rename parameter name `relative` to `relative_position`.

ref T8380

Depends On D10639

Test Plan: ninja test

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8380

Differential Revision: https://phab.enlightenment.org/D10640
---
 src/bin/elementary/meson.build |   2 +-
 src/bin/elementary/test.c  |   4 +-
 ...ative_layout.c => test_ui_relative_container.c} |  50 +++---
 src/examples/elementary/.gitignore |   4 +-
 ...01.c => efl_ui_relative_container_example_01.c} |  18 +-
 ...02.c => efl_ui_relative_container_example_02.c} |  14 +-
 src/lib/elementary/Efl_Ui.h|   2 +-
 ...lative_layout.c => efl_ui_relative_container.c} | 198 ++---
 src/lib/elementary/efl_ui_relative_container.eo|  94 ++
 ...ivate.h => efl_ui_relative_container_private.h} |  68 +++
 src/lib/elementary/efl_ui_relative_layout.eo   |  74 
 src/lib/elementary/meson.build |   6 +-
 src/tests/elementary/efl_ui_suite.c|   2 +-
 src/tests/elementary/efl_ui_suite.h|   2 +-
 ...e_layout.c => efl_ui_test_relative_container.c} |  58 +++---
 src/tests/elementary/meson.build   |   2 +-
 src/tests/elementary/spec/efl_test_basics.c|   2 +-
 src/tests/elementary/spec/efl_test_pack.c  |   2 +-
 18 files changed, 311 insertions(+), 291 deletions(-)

diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 502573c49e..342e184fb1 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -155,7 +155,7 @@ elementary_test_src = [
   'test_win_indicator.c',
   'test_gesture_framework.c',
   'test_ui_tab_pager.c',
-  'test_ui_relative_layout.c',
+  'test_ui_relative_container.c',
   'test_ui_collection.c',
   'test_ui_collection_view.c',
   'test_ui_items.c',
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 8259ed8b0c..a78850aa31 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -397,7 +397,7 @@ void test_ui_spotlight_stack(void *data, Evas_Object *obj, 
void *event_info);
 void test_ui_spotlight_plain(void *data, Evas_Object *obj, void *event_info);
 void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
 
-void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info);
+void test_ui_relative_container(void *data, Evas_Object *obj, void 
*event_info);
 void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
 void test_efl_ui_collection_list(void *data, Evas_Object *obj, void 
*event_info);
 void test_efl_ui_collection_grid(void *data, Evas_Object *obj, void 
*event_info);
@@ -908,7 +908,7 @@ add_tests:
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", 
test_ui_table_linear);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", 
test_ui_table_static);
-   ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Layout", 
test_ui_relative_layout);
+   ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Container", 
test_ui_relative_container);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection List", 
test_efl_ui_collection_list);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection Grid", 
test_efl_ui_collection_grid);
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection_View", 
test_efl_ui_collection_view);
diff --git a/src/bin/elementary/test_ui_relative_layout.c 
b/src/bin/elementary/test_ui_relative_container.c
similarity index 83%
rename from src/bin/elementary/test_ui_relative_layout.c
rename to src/bin/elementary/test_ui_relative_container.c
index 40d9891725..40e2c1a05f 100644
--- a/src/bin/elementary/test_ui_relative_layout.c
+++ b/src/bin/elementary/test_ui_relative_container.c
@@ -57,20 +57,20 @@ _btn_clicked_to_cb(void *data, const Efl_Event *event)
switch (opt)
  {
   case LEFT:
-efl_ui_relative_layout_relation_left_get(layout, btn, NULL, );
-efl_ui_relative_layout_relation_left_set(layout, btn, to, relative);
+efl_ui_relative_container_relation_left_get(layout, btn, NULL, 
);
+efl_ui_relative_container_relation_left_set(layout, btn, to, relative);
   

[EGIT] [core/efl] master 02/03: mono: reduce duplicated event code

2019-11-12 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 77c1777ca2a9594e04b9b2bac1fc241fdff68445
Author: Yeongjong Lee 
Date:   Mon Nov 11 11:33:03 2019 -0300

mono: reduce duplicated event code

Summary: Introduction GetInternalEventCallback function to reduce 
duplicated event code.

Test Plan: ninja test

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10638
---
 src/bin/eolian_mono/eolian/mono/events.hh | 37 +-
 src/bindings/mono/eo_mono/EoWrapper.cs| 38 +++
 2 files changed, 49 insertions(+), 26 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/events.hh 
b/src/bin/eolian_mono/eolian/mono/events.hh
index 8ca0c76a2a..e6a78577bb 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -37,7 +37,7 @@ struct unpack_event_args_visitor
typedef bool result_type;
bool operator()(grammar::attributes::regular_type_def const& regular) const
{
-  std::string const& arg = "evt.Info";
+  std::string const& arg = "info";
   std::string arg_type = name_helpers::type_full_managed_name(regular);
 
   if (regular.is_struct())
@@ -45,7 +45,7 @@ struct unpack_event_args_visitor
// Structs are usually passed by pointer to events, like having a 
ptr<> modifier
// Uses implicit conversion from IntPtr
return as_generator(
-" evt.Info"
+" info"
   ).generate(sink, attributes::unused, *context);
 }
   else if (type.is_ptr)
@@ -121,17 +121,17 @@ struct unpack_event_args_visitor
// Type defined in Eo is passed here. (e.g. enum type defined in Eo)
// Uses conversion from IntPtr with type casting to the given type.
return as_generator(
-" (" << arg_type << ")evt.Info"
+" (" << arg_type << ")info"
   ).generate(sink, attributes::unused, *context);
 }
}
bool operator()(grammar::attributes::klass_name const& cls) const
{
-  return as_generator("(Efl.Eo.Globals.CreateWrapperFor(evt.Info) as " + 
name_helpers::klass_full_concrete_name(cls) + ")").generate(sink, 
attributes::unused, *context);
+  return as_generator("(Efl.Eo.Globals.CreateWrapperFor(info) as " + 
name_helpers::klass_full_concrete_name(cls) + ")").generate(sink, 
attributes::unused, *context);
}
bool operator()(attributes::complex_type_def const&) const
{
-  return as_generator("new " << eolian_mono::type << "(evt.Info, false, 
false)").generate(sink, type, *context);
+  return as_generator("new " << eolian_mono::type << "(info, false, 
false)").generate(sink, type, *context);
}
 };
 
@@ -411,8 +411,8 @@ struct event_definition_generator
 
auto sub_context = change_indentation(indent.inc().inc(), context);
 
-   if (!as_generator(wrapper_args_type << " args = new " << 
wrapper_args_type << "();\n"
- << scope_tab(6) << "args.arg = 
").generate(arg_initializer_sink, attributes::unused, context))
+   if (!as_generator(", info => new " << wrapper_args_type << "{ "
+ << "arg = ").generate(arg_initializer_sink, 
attributes::unused, context))
  return false;
if 
(!(*etype).original_type.visit(unpack_event_args_visitor{arg_initializer_sink, _context, *etype}))
  return false;
@@ -420,7 +420,7 @@ struct event_definition_generator
if 
(!(*etype).original_type.visit(pack_event_info_and_call_visitor{event_call_site_sink, _context, *etype}))
  return false;
 
-   arg_initializer += ";\n";
+   arg_initializer += " }";
 
event_args = arg_initializer;
 }
@@ -540,24 +540,9 @@ struct event_definition_generator
   return as_generator(
scope_tab << "{\n"
<< scope_tab << scope_tab << "add\n"
-   << scope_tab << scope_tab << "{\n"
-   << scope_tab << scope_tab << scope_tab << "Efl.EventCb callerCb = 
(IntPtr data, ref Efl.Event.NativeStruct evt) =>\n"
-   << scope_tab << scope_tab << scope_tab << "{\n"
-   << scope_tab <<

[EGIT] [core/efl] master 03/03: eolian_mono: avoid keyword as a variable name

2019-11-12 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit a5daa2b72fa725c6a8129f990351f18b694ef357
Author: Yeongjong Lee 
Date:   Tue Nov 12 10:14:03 2019 -0300

eolian_mono: avoid keyword as a variable name

Summary:
```
private static void relation_left_get(System.IntPtr obj, 
System.IntPtr pd, Efl.Gfx.IEntity child, out Efl.Gfx.IEntity kw_base, out 
Efl.Gfx.Align relative_position)
{
Eina.Log.Debug("function 
efl_ui_relative_container_relation_left_get was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
base = default(Efl.Gfx.IEntity);relative_position = 
default(Efl.Gfx.Align);
```
Parameter name is replaced with `kw_base` but `base` is not changed in 
assignment expression (`base = default(Efl.Gfx.IEntity...`).
This patch will fix following compiler error.
```
src/bindings/mono/efl_ui_relative_container.eo.cs(544,21): error CS1525: 
Unexpected symbol `=', expecting `.' or `['
```

Test Plan: ninja with D10640

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10639
---
 src/bin/eolian_mono/eolian/mono/parameter.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh 
b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 7c7b8f275d..deb9a9e5a8 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -909,7 +909,7 @@ struct native_convert_out_variable_generator
// Assign a default value to the out variable in case we end up in 
the catch clause.
return as_generator(
string << " = default(" << type << ");"
-   ).generate(sink, std::make_tuple(param.param_name, param), 
context);
+   ).generate(sink, 
std::make_tuple(escape_keyword(param.param_name), param), context);
 }
   return true;
}

-- 




[EGIT] [core/efl] master 01/02: mono: blacklist efl_thread

2019-11-01 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit fa3358acce3cd25e79f306f3dd31b5d9ce6ebe1b
Author: Yeongjong Lee 
Date:   Fri Nov 1 17:03:56 2019 -0300

mono: blacklist efl_thread

Summary:
C# developers are already familar with C# Thread`System.Threading.Thread`, 
We
don't need to provide Wrapped `Efl.Thread` class.
Also, we can't ensure compatibility between C# Thread and EFL Thread.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10586
---
 src/bindings/mono/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index d253a8afe5..9545aa1cd2 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -83,6 +83,9 @@ blacklisted_files = [
   'elm_interface_scrollable.eo',
   'evas_canvas3d_types.eot',
   'elm_general.eot',
+  'efl_thread.eo',
+  'efl_threadio.eo',
+  'efl_appthread.eo'
 ]
 
 manual_inheritance_files = [

-- 




[EGIT] [core/efl] master 02/02: eo_mono: make Efl.EventDescription, Efl.Event, Efl.EventCb internal

2019-11-01 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit eb371c992d3c7f35cca09e2f693225aba86231c4
Author: Yeongjong Lee 
Date:   Fri Nov 1 17:13:57 2019 -0300

eo_mono: make Efl.EventDescription, Efl.Event, Efl.EventCb internal

Summary:
Hide struct and delegate related to `IntPtr`.

Depends on D10585
Depends on D10586

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10587
---
 src/bindings/mono/eo_mono/workaround.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bindings/mono/eo_mono/workaround.cs 
b/src/bindings/mono/eo_mono/workaround.cs
index 8e69777953..b946a06d44 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -64,7 +64,7 @@ namespace Efl
 
 ///This struct holds the description of a specific event (Since EFL 
1.22).
 [StructLayout(LayoutKind.Sequential)]
-public struct EventDescription
+internal struct EventDescription
 {
 ///Name of the event.
 public IntPtr Name;
@@ -119,7 +119,7 @@ public struct EventDescription
 /// 
 [StructLayout(LayoutKind.Sequential)]
 [Efl.Eo.BindingEntity]
-public struct Event
+internal struct Event
 {
 /// The object the callback was called on.
 /// (Since EFL 1.22)
@@ -194,7 +194,7 @@ public struct Event
 }
 }
 
-public delegate void EventCb(System.IntPtr data, ref Event.NativeStruct evt);
+internal delegate void EventCb(System.IntPtr data, ref Event.NativeStruct evt);
 internal delegate void FreeWrapperSupervisorCb(System.IntPtr obj);
 
 [StructLayout(LayoutKind.Sequential)]

-- 




[EGIT] [core/efl] master 01/01: mono: blacklist functions related to native event

2019-11-01 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit be4f8b253ba7cd274964ca4b9fd8d5b08414aa97
Author: Yeongjong Lee 
Date:   Fri Nov 1 16:01:49 2019 -0300

mono: blacklist functions related to native event

Summary:
`efl_event_callback_forwarder_priority_del`
=> It can be replaced with `obj.XXXEvent -= callback;`.
Furthermore, `efl_event_callback_forwarder_priority_add` is already in 
blacklist.

`efl_ui_widget_input_event_handler`
=> It can be replaced with `obj.DownEvent`, `obj.UpEvent` and 
`obj.PointerWhellEvent`.

`efl_access_object_event_handler_add`
`efl_access_object_event_handler_del`
`efl_access_object_event_emit`
=> They are functions to handle global event related to access(E.g. 
`elm_atspi_bridge`).
It should be generated to `static event` in C#.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10585
---
 src/bin/eolian_mono/eolian/mono/blacklist.hh | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh 
b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 060990c8c9..07c365fbf6 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -64,7 +64,12 @@ inline bool is_function_blacklisted(std::string const& 
c_name)
 || c_name == "efl_ui_list_model_size_get"
 || c_name == "efl_ui_list_relayout_layout_do"
 || c_name == "efl_event_callback_forwarder_priority_add" // Depends on 
constants support.
+|| c_name == "efl_event_callback_forwarder_del"
 || c_name == "efl_ui_text_context_menu_item_add"
+|| c_name == "efl_ui_widget_input_event_handler"
+|| c_name == "efl_access_object_event_handler_add"
+|| c_name == "efl_access_object_event_handler_del"
+|| c_name == "efl_access_object_event_emit"
 ;
 }
 

-- 




[EGIT] [core/efl] master 01/03: mono: remove duplicated EinaFreeCb delegate

2019-10-31 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 11fb54e4bc7daa3378649bd68d668b0cf614839b
Author: Yeongjong Lee 
Date:   Thu Oct 31 18:21:42 2019 -0300

mono: remove duplicated EinaFreeCb delegate

Summary: Use Eina.Claabacks.EinaFreeCb instead.

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10577
---
 src/bin/eolian_mono/eolian/mono/function_pointer.hh | 4 ++--
 src/bin/eolian_mono/eolian/mono/parameter.hh| 2 +-
 src/bindings/mono/eo_mono/iwrapper.cs   | 4 ++--
 src/bindings/mono/eo_mono/workaround.cs | 1 -
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh 
b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
index 0baab70e41..0e80659b48 100644
--- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
@@ -76,9 +76,9 @@ struct function_pointer {
   << "{\n\n"
   << scope_tab << "private " << f_name  << "Internal _cb;\n"
   << scope_tab << "private IntPtr _cb_data;\n"
-  << scope_tab << "private EinaFreeCb _cb_free_cb;\n\n"
+  << scope_tab << "private Eina.Callbacks.EinaFreeCb 
_cb_free_cb;\n\n"
 
-  << scope_tab << "internal " << f_name << "Wrapper (" << 
f_name << "Internal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)\n"
+  << scope_tab << "internal " << f_name << "Wrapper (" << 
f_name << "Internal _cb, IntPtr _cb_data, Eina.Callbacks.EinaFreeCb 
_cb_free_cb)\n"
   << scope_tab << "{\n"
   << scope_tab << scope_tab << "this._cb = _cb;\n"
   << scope_tab << scope_tab << "this._cb_data = _cb_data;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh 
b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 38afef8cb5..55e12544ad 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -494,7 +494,7 @@ struct marshall_parameter_generator
 ).generate(sink, std::make_tuple(param, param_name), context);
 
   return as_generator(
-   "IntPtr " << param_name << "_data, " << type << "Internal " << 
param_name << ", EinaFreeCb "
+   "IntPtr " << param_name << "_data, " << type << "Internal " << 
param_name << ", Eina.Callbacks.EinaFreeCb "
<< param_name << "_free_cb"
).generate(sink, param, context);
}
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index db4213d3ec..12a7b3262f 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -738,9 +738,9 @@ public static class Globals
 
efl_mono_wrapper_supervisor_callbacks_set(FreeWrapperSupervisorCallbackDelegate);
 }
 
-internal static void ThreadSafeFreeCbExec(EinaFreeCb cbFreeCb, IntPtr 
cbData)
+internal static void ThreadSafeFreeCbExec(Eina.Callbacks.EinaFreeCb 
cbFreeCb, IntPtr cbData)
 {
-EinaFreeCb cb = (IntPtr gcHandlePtr) => {
+Eina.Callbacks.EinaFreeCb cb = (IntPtr gcHandlePtr) => {
 cbFreeCb(cbData);
 GCHandle gcHandle = GCHandle.FromIntPtr(gcHandlePtr);
 gcHandle.Free();
diff --git a/src/bindings/mono/eo_mono/workaround.cs 
b/src/bindings/mono/eo_mono/workaround.cs
index 7730545092..66c3ec5879 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -232,5 +232,4 @@ public struct ActionData
 } // namespace Efl
 
 // Global delegates
-public delegate void EinaFreeCb(IntPtr data);
 public delegate void EvasSmartCb(IntPtr data, IntPtr obj, IntPtr event_info);

-- 




[EGIT] [core/efl] master 03/03: mono: blacklist elm_general.eot

2019-10-31 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 166b3e66e3e3a00aad8283b08070ce5d88c86760
Author: Yeongjong Lee 
Date:   Thu Oct 31 18:30:23 2019 -0300

mono: blacklist elm_general.eot

Summary:
Prevent generating legacy eot.cs
Depends on D10580

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10581
---
 src/bindings/mono/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index dbdacd88c8..d253a8afe5 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -82,6 +82,7 @@ blacklisted_files = [
   'elm_atspi_app_object.eo',
   'elm_interface_scrollable.eo',
   'evas_canvas3d_types.eot',
+  'elm_general.eot',
 ]
 
 manual_inheritance_files = [

-- 




[EGIT] [core/efl] master 02/03: mono: blacklist efl_ui_text_context_menu_item_add

2019-10-31 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 5c1f3975bb2faff2177e0ca03741e1c42d902005
Author: Yeongjong Lee 
Date:   Thu Oct 31 18:25:32 2019 -0300

mono: blacklist efl_ui_text_context_menu_item_add

Summary: Blacklist a method which has `IntPtr` parameters.

Reviewers: woohyun, segfaultxavi, YOhoho, felipealmeida

Reviewed By: felipealmeida

Subscribers: segfaultxavi, zmike, q66, bu5hm4n, cedric, #reviewers, 
#committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10579
---
 src/bin/eolian_mono/eolian/mono/blacklist.hh | 1 +
 src/bindings/mono/eo_mono/workaround.cs  | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh 
b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 08c706134e..060990c8c9 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -64,6 +64,7 @@ inline bool is_function_blacklisted(std::string const& c_name)
 || c_name == "efl_ui_list_model_size_get"
 || c_name == "efl_ui_list_relayout_layout_do"
 || c_name == "efl_event_callback_forwarder_priority_add" // Depends on 
constants support.
+|| c_name == "efl_ui_text_context_menu_item_add"
 ;
 }
 
diff --git a/src/bindings/mono/eo_mono/workaround.cs 
b/src/bindings/mono/eo_mono/workaround.cs
index 66c3ec5879..8e69777953 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -230,6 +230,3 @@ public struct ActionData
 } // namespace Access
 
 } // namespace Efl
-
-// Global delegates
-public delegate void EvasSmartCb(IntPtr data, IntPtr obj, IntPtr event_info);

-- 




[EGIT] [core/efl] master 01/01: efl_ui_text: remove elm_general.eot

2019-10-31 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit e2980cd9812113fc4a216749eb23d7611b02fd55
Author: Yeongjong Lee 
Date:   Thu Oct 31 13:38:08 2019 -0400

efl_ui_text: remove elm_general.eot

Summary: remove legacy dependency in eo file.

Test Plan: ninja

Reviewers: woohyun, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10580
---
 src/lib/elementary/Efl_Ui.h|   6 +-
 src/lib/elementary/efl_ui_text.c   |  41 +++---
 src/lib/elementary/efl_ui_text.eo  | 112 -
 src/lib/elementary/elm_general.eot |   1 -
 4 files changed, 120 insertions(+), 40 deletions(-)

diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 917ef5bf6d..5b1620d66a 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -224,13 +224,13 @@ EAPI Eina_Bool efl_ui_win_autodel_get(const Efl_Ui_Win 
*obj);
 # include 
 # include 
 
-/* FIXME: Efl.Ui.Text must not use elm_general.h
-# include 
+// FIXME - Text object must stop using Context_Item_Clicked_Cb!
+typedef void (*Context_Item_Clicked_Cb)(void *data, Eo *obj, void *event_info);
+
 # include 
 # include 
 # include 
 # include 
-*/
 
 # include 
 # include 
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index ec32ab3581..caf84c225d 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -15,7 +15,6 @@
 
 #include "elm_entry_common.h"
 #include "elm_widget_entry.h"
-#include "efl_ui_text.eo.h"
 #include "elm_hoversel_eo.h"
 #include "efl_ui_text_part.eo.h"
 #include "elm_part_helper.h"
@@ -73,11 +72,11 @@ struct _Efl_Ui_Text_Data
int   cursor_pos;
Elm_Scroller_Policy   policy_h, policy_v;
Elm_Wrap_Type line_wrap;
-   Elm_Input_Panel_Layoutinput_panel_layout;
-   Elm_Autocapital_Type  autocapital_type;
-   Elm_Input_Panel_Lang  input_panel_lang;
-   Elm_Input_Panel_Return_Key_Type   input_panel_return_key_type;
-   Elm_Input_Hints   input_hints;
+   Efl_Ui_Input_Panel_Layout input_panel_layout;
+   Efl_Ui_Autocapital_Type   autocapital_type;
+   Efl_Ui_Input_Panel_Language_Type  input_panel_lang;
+   Efl_Ui_Input_Panel_Return_Key_Typeinput_panel_return_key_type;
+   Efl_Ui_Input_Hintsinput_hints;
Efl_Text_Cursor_Cursor   *sel_handler_cursor;
void *input_panel_imdata;
int   input_panel_imdata_len;
@@ -390,7 +389,7 @@ _validate(Evas_Object *obj)
 {
EFL_UI_TEXT_DATA_GET(obj, sd);
Eina_Bool res;
-   Elm_Validate_Content vc;
+   Efl_Ui_Validate_Content_Info vc;
Eina_Strbuf *buf;
 
if (sd->validators == 0) return;
@@ -2496,7 +2495,7 @@ _efl_ui_text_context_menu_clear(Eo *obj EINA_UNUSED, 
Efl_Ui_Text_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char 
*label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, 
const void *data)
+_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char 
*label, const char *icon_file, Efl_Ui_Icon_Type icon_type, 
Context_Item_Clicked_Cb func, const void *data)
 {
Elm_Entry_Context_Menu_Item *it;
 
@@ -2507,7 +2506,7 @@ _efl_ui_text_context_menu_item_add(Eo *obj, 
Efl_Ui_Text_Data *sd, const char *la
it->obj = obj;
it->label = eina_stringshare_add(label);
it->icon_file = eina_stringshare_add(icon_file);
-   it->icon_type = icon_type;
+   it->icon_type = (Elm_Icon_Type)icon_type;
it->func = func;
it->data = (void *)data;
 }
@@ -2630,20 +2629,20 @@ _efl_ui_text_scrollable_get(const Eo *obj EINA_UNUSED, 
Efl_Ui_Text_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, 
Elm_Input_Panel_Layout layout)
+_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, 
Efl_Ui_Input_Panel_Layout layout)
 {
sd->input_panel_layout = layout;
 
edje_object_part_text_input_panel_layout_set
  (sd->entry_edje, "efl.text", (Edje_Input_Panel_Layout)layout);
 
-   if (layout == ELM_INPUT_PANEL_LAYOUT_PASSWORD)
+   if (layout == EFL_UI_INPUT_PANEL_LAYOUT_PASSWORD)
  efl_ui_text_input_hint_set(obj, ((sd->input_hints & 
~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
-   else if (layout == ELM_INPUT_PANEL_LAYOUT_TERMINAL)
+   else if (layout == EFL_UI_INPUT_PANEL_LAYOUT_TERMINAL)
  efl_ui_text_input_hint_set(obj, (sd

[EGIT] [core/efl] master 01/04: eina_mono: remove exceptions in unexpected locations

2019-10-28 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 91ae0ea12fc3dc46ac74a098b5bfe39091960aff
Author: Yeongjong Lee 
Date:   Mon Oct 28 20:33:47 2019 -0300

eina_mono: remove exceptions in unexpected locations

Summary:
Unexpected locations are listed in
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1065

fix CA1065
ref T8402

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8402

Differential Revision: https://phab.enlightenment.org/D10461
---
 src/bindings/mono/eina_mono/eina_strbuf.cs |   5 --
 src/bindings/mono/eina_mono/eina_value.cs  | 120 ++---
 2 files changed, 24 insertions(+), 101 deletions(-)

diff --git a/src/bindings/mono/eina_mono/eina_strbuf.cs 
b/src/bindings/mono/eina_mono/eina_strbuf.cs
index a3a89e5241..bdde9a911e 100644
--- a/src/bindings/mono/eina_mono/eina_strbuf.cs
+++ b/src/bindings/mono/eina_mono/eina_strbuf.cs
@@ -253,11 +253,6 @@ public class Strbuf : IDisposable
 /// A string with the contents of this buffer.
 public override string ToString()
 {
-if (Disposed)
-{
-throw new ObjectDisposedException(base.GetType().Name);
-}
-
 return eina_strbuf_string_get(this.Handle);
 }
 }
diff --git a/src/bindings/mono/eina_mono/eina_value.cs 
b/src/bindings/mono/eina_mono/eina_value.cs
index 35c85c83ac..a5f4a0e867 100644
--- a/src/bindings/mono/eina_mono/eina_value.cs
+++ b/src/bindings/mono/eina_mono/eina_value.cs
@@ -1584,10 +1584,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator Value(byte x)
 {
 var v = new Eina.Value(ValueType.Byte);
-if (!v.Set(x))
-{
-throw new InvalidOperationException("Couldn't set value.");
-}
+v.Set(x);
 
 return v;
 }
@@ -1598,10 +1595,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator byte(Value v)
 {
 byte b;
-if (!v.Get(out b))
-{
-throw new InvalidOperationException("Couldn't get value.");
-}
+v.Get(out b);
 
 return b;
 }
@@ -1612,10 +1606,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator Value(sbyte x)
 {
 var v = new Eina.Value(ValueType.SByte);
-if (!v.Set(x))
-{
-throw new InvalidOperationException("Couldn't set value.");
-}
+v.Set(x);
 
 return v;
 }
@@ -1626,10 +1617,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator sbyte(Value v)
 {
 sbyte b;
-if (!v.Get(out b))
-{
-throw new InvalidOperationException("Couldn't get value.");
-}
+v.Get(out b);
 
 return b;
 }
@@ -1640,10 +1628,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator Value(short x)
 {
 var v = new Eina.Value(ValueType.Short);
-if (!v.Set(x))
-{
-throw new InvalidOperationException("Couldn't set value.");
-}
+v.Set(x);
 
 return v;
 }
@@ -1654,10 +1639,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator short(Value v)
 {
 short b;
-if (!v.Get(out b))
-{
-throw new InvalidOperationException("Couldn't get value.");
-}
+v.Get(out b);
 
 return b;
 }
@@ -1668,10 +1650,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator Value(ushort x)
 {
 var v = new Eina.Value(ValueType.UShort);
-if (!v.Set(x))
-{
-throw new InvalidOperationException("Couldn't set value.");
-}
+v.Set(x);
 
 return v;
 }
@@ -1682,10 +1661,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator ushort(Value v)
 {
 ushort b;
-if (!v.Get(out b))
-{
-throw new InvalidOperationException("Couldn't get value.");
-}
+v.Get(out b);
 
 return b;
 }
@@ -1696,10 +1672,7 @@ public class Value : IDisposable, IComparable, 
IEquatable
 public static implicit operator Value(int x)
 {
 var v = new Eina.Value(ValueType.Int32);
-if (!v.Set(x))
-{
-throw new InvalidOperationException("Couldn't set value.");
-}
+v.Set(x);
 

[EGIT] [core/efl] master 01/06: mono: introduce friend assembly

2019-10-28 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit e6fafe4e614e1ebb72e44f006f8adba9edccedaf
Author: Yeongjong Lee 
Date:   Mon Oct 28 17:10:48 2019 -0300

mono: introduce friend assembly

Summary:
Friend assemblies can access efl_mono assembly's internal types and members.
If `build-tests` option is true, `efl-mono-suite.exe` and 
`efl_mono_test.dll`
will become friend assemblies.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: felipealmeida, cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10337
---
 meson_options.txt |  6 ++
 src/bindings/mono/efl_mono/AssemblyInfo.cs.in |  3 +++
 src/bindings/mono/efl_mono/meson.build| 19 +++
 3 files changed, 28 insertions(+)

diff --git a/meson_options.txt b/meson_options.txt
index 0a4702cad8..66ef0257f4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -366,3 +366,9 @@ option('install-eo-files',
   value: false,
   description : 'Install any eo file'
 )
+
+option('mono-friend-assemblies',
+  type : 'array',
+  value : [],
+  description : 'List of friend assemblies that can access efl_mono 
assembly\'s internal types and members.'
+)
diff --git a/src/bindings/mono/efl_mono/AssemblyInfo.cs.in 
b/src/bindings/mono/efl_mono/AssemblyInfo.cs.in
new file mode 100644
index 00..e22d0a4140
--- /dev/null
+++ b/src/bindings/mono/efl_mono/AssemblyInfo.cs.in
@@ -0,0 +1,3 @@
+using System.Runtime.CompilerServices;
+
+@MONO_FRIEND_ASSEMBLIES@
diff --git a/src/bindings/mono/efl_mono/meson.build 
b/src/bindings/mono/efl_mono/meson.build
index cfe53ee153..6542f5124a 100644
--- a/src/bindings/mono/efl_mono/meson.build
+++ b/src/bindings/mono/efl_mono/meson.build
@@ -34,6 +34,25 @@ efl_src = configure_file(
   configuration: efl_libs
 )
 
+friend_assemblies = ''
+mono_friend_assemblies = get_option('mono-friend-assemblies')
+if get_option('build-tests')
+   mono_friend_assemblies += 'efl-mono-suite'
+   mono_friend_assemblies += 'efl_mono_test'
+endif
+
+foreach f : mono_friend_assemblies
+   friend_assemblies += '[assembly: InternalsVisibleTo("@0@")]\n'.format(f)
+endforeach
+friend_assembly_data = configuration_data()
+friend_assembly_data.set('MONO_FRIEND_ASSEMBLIES', friend_assemblies)
+
+mono_files += configure_file(
+  input: 'AssemblyInfo.cs.in',
+  output: 'AssemblyInfo.cs',
+  configuration: friend_assembly_data
+)
+
 mono_eo_files = [
   'efl_mono_model_internal.eo',
   'efl_mono_model_internal_child.eo'

-- 




[EGIT] [core/efl] master 03/06: mono: encapsulate internal Add/RemoveNativeEventHandler

2019-10-28 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 7f2458b20d9a6ad4842e9a76f54fbcade25e5a77
Author: Yeongjong Lee 
Date:   Mon Oct 28 18:24:15 2019 -0300

mono: encapsulate internal Add/RemoveNativeEventHandler

Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10341
---
 src/bindings/mono/eo_mono/EoWrapper.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs 
b/src/bindings/mono/eo_mono/EoWrapper.cs
index 87a3743a3e..8f9011cefe 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -256,7 +256,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
 /// The name of the native event.
 /// Delegate to be called by native code on event 
raising.
 /// Managed delegate that will be called by 
evtCaller on event raising.
-protected void AddNativeEventHandler(string lib, string key, Efl.EventCb 
evtCaller, object evtDelegate)
+internal void AddNativeEventHandler(string lib, string key, Efl.EventCb 
evtCaller, object evtDelegate)
 {
 lock (eflBindingEventLock)
 {
@@ -294,7 +294,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
 /// The name of the native library definining the 
event.
 /// The name of the native event.
 /// The delegate to be removed.
-protected void RemoveNativeEventHandler(string lib, string key, object 
evtDelegate)
+internal void RemoveNativeEventHandler(string lib, string key, object 
evtDelegate)
 {
 lock (eflBindingEventLock)
 {

-- 




[EGIT] [core/efl] master 02/06: mono: encapsulate internal CustomMarshaler

2019-10-28 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 90280ffed67b6d5caf4d630440ed153f3beeb547
Author: Yeongjong Lee 
Date:   Mon Oct 28 18:08:01 2019 -0300

mono: encapsulate internal CustomMarshaler

Summary: Depends on D10337

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10344
---
 src/bindings/mono/eo_mono/iwrapper.cs | 38 +--
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index 8ba47b4aa8..3c4b8e0003 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -1026,22 +1026,22 @@ public static class ClassRegister
 private static readonly object klassAllocLock = new object();
 }
 
-public interface IOwnershipTag
+interface IOwnershipTag
 {
 }
 
-public class OwnTag : IOwnershipTag
+class OwnTag : IOwnershipTag
 {
 }
 
-public class NonOwnTag : IOwnershipTag
+class NonOwnTag : IOwnershipTag
 {
 }
 
-public class MarshalEo : ICustomMarshaler
+class MarshalEo : ICustomMarshaler
 where U : IOwnershipTag
 {
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 Eina.Log.Debug("MarshalEo.GetInstace cookie " + cookie);
 return new MarshalEo();
@@ -1091,9 +1091,9 @@ public class MarshalEo : ICustomMarshaler
 }
 
 ///Marshals between System.Type instances and Eo classes 
(IntPtrs).
-public class MarshalEflClass : ICustomMarshaler
+class MarshalEflClass : ICustomMarshaler
 {
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 Eina.Log.Debug("MarshalEflClass.GetInstance cookie " + cookie);
 return new MarshalEflClass();
@@ -1137,7 +1137,7 @@ public class MarshalEflClass : ICustomMarshaler
 }
 }
 
-public class StringPassOwnershipMarshaler : ICustomMarshaler
+class StringPassOwnershipMarshaler : ICustomMarshaler
 {
 public object MarshalNativeToManaged(IntPtr pNativeData)
 {
@@ -1165,7 +1165,7 @@ public class StringPassOwnershipMarshaler : 
ICustomMarshaler
 return -1;
 }
 
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 if (marshaler == null)
 {
@@ -1178,7 +1178,7 @@ public class StringPassOwnershipMarshaler : 
ICustomMarshaler
 static private StringPassOwnershipMarshaler marshaler;
 }
 
-public class StringKeepOwnershipMarshaler: ICustomMarshaler
+class StringKeepOwnershipMarshaler: ICustomMarshaler
 {
 public object MarshalNativeToManaged(IntPtr pNativeData)
 {
@@ -1204,7 +1204,7 @@ public class StringKeepOwnershipMarshaler: 
ICustomMarshaler
 return -1;
 }
 
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 if (marshaler == null)
 {
@@ -1217,7 +1217,7 @@ public class StringKeepOwnershipMarshaler: 
ICustomMarshaler
 static private StringKeepOwnershipMarshaler marshaler;
 }
 
-public class StringsharePassOwnershipMarshaler : ICustomMarshaler
+class StringsharePassOwnershipMarshaler : ICustomMarshaler
 {
 public object MarshalNativeToManaged(IntPtr pNativeData)
 {
@@ -1245,7 +1245,7 @@ public class StringsharePassOwnershipMarshaler : 
ICustomMarshaler
 return -1;
 }
 
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 if (marshaler == null)
 {
@@ -1258,7 +1258,7 @@ public class StringsharePassOwnershipMarshaler : 
ICustomMarshaler
 static private StringsharePassOwnershipMarshaler marshaler;
 }
 
-public class StringshareKeepOwnershipMarshaler : ICustomMarshaler
+class StringshareKeepOwnershipMarshaler : ICustomMarshaler
 {
 public object MarshalNativeToManaged(IntPtr pNativeData)
 {
@@ -1284,7 +1284,7 @@ public class StringshareKeepOwnershipMarshaler : 
ICustomMarshaler
 return -1;
 }
 
-public static ICustomMarshaler GetInstance(string cookie)
+internal static ICustomMarshaler GetInstance(string cookie)
 {
 if (marshaler == null)
 {
@@ -1297,7 +1297,7 @@ public class StringshareKeepOwnershipMarshaler : 
ICustomMarshaler
 static private StringshareKeepOwnershipMarshaler marshaler;
 }
 
-public class StrbufPassOwnershipMarshaler : ICustomMarshaler
+class StrbufPassOwnershipMarshaler : ICustomMarshaler
 {
 public object MarshalNa

[EGIT] [core/efl] master 01/01: eina_array: add paramName argument of ArgumentNullException

2019-10-25 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit eb676e47af4ad36fa9fac6f8358344c2e31c581d
Author: Yeongjong Lee 
Date:   Fri Oct 25 19:14:58 2019 -0300

eina_array: add paramName argument of ArgumentNullException

Summary:
ArgumentNullException constructor included `message` is
`public ArgumentNullException (string paramName, string message);`

Fix CA2208
ref T8428

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8428

Differential Revision: https://phab.enlightenment.org/D10464
---
 src/bindings/mono/eina_mono/eina_array.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bindings/mono/eina_mono/eina_array.cs 
b/src/bindings/mono/eina_mono/eina_array.cs
index 47d6962f71..7ebb7ed31e 100644
--- a/src/bindings/mono/eina_mono/eina_array.cs
+++ b/src/bindings/mono/eina_mono/eina_array.cs
@@ -149,7 +149,7 @@ public class Array : IEnumerable, IDisposable
 {
 if (handle == IntPtr.Zero)
 {
-throw new ArgumentNullException("Handle can't be null");
+throw new ArgumentNullException("handle", "Handle can't be null");
 }
 
 Handle = handle;
@@ -168,7 +168,7 @@ public class Array : IEnumerable, IDisposable
 {
 if (handle == IntPtr.Zero)
 {
-throw new ArgumentNullException("Handle can't be null");
+throw new ArgumentNullException("handle", "Handle can't be null");
 }
 
 Handle = handle;

-- 




[EGIT] [core/efl] master 01/01: mono: implement dispose method based on dispose pattern

2019-10-25 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 69261251a71f02111a046b97fbb2e520f8d1dc1e
Author: Yeongjong Lee 
Date:   Thu Oct 24 17:46:13 2019 -0300

mono: implement dispose method based on dispose pattern

Summary:
Fix CA1063, CA1816
ref T8400, T8419

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: felipealmeida, brunobelo, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8419, T8400

Differential Revision: https://phab.enlightenment.org/D10460
---
 src/bindings/mono/efl_mono/GenericModel.cs   |  2 +-
 src/bindings/mono/efl_mono/ItemFactory.cs|  2 +-
 src/bindings/mono/efl_mono/UserModel.cs  |  8 +--
 src/bindings/mono/eina_mono/eina_accessor.cs |  1 +
 src/bindings/mono/eo_mono/NativeModule.cs| 34 +---
 5 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/bindings/mono/efl_mono/GenericModel.cs 
b/src/bindings/mono/efl_mono/GenericModel.cs
index 1f92b8cd3e..8bfa8ce2f7 100644
--- a/src/bindings/mono/efl_mono/GenericModel.cs
+++ b/src/bindings/mono/efl_mono/GenericModel.cs
@@ -18,7 +18,7 @@ namespace Efl {
 /// 
 /// The type of the child model. It is the type used when 
adding/removing/getting items to this
 /// model.
-public class GenericModel : Efl.Object, Efl.IModel, IDisposable
+public class GenericModel : Efl.Object, Efl.IModel
 {
private Efl.IModel model;
 
diff --git a/src/bindings/mono/efl_mono/ItemFactory.cs 
b/src/bindings/mono/efl_mono/ItemFactory.cs
index 34791e1213..a97401c9aa 100644
--- a/src/bindings/mono/efl_mono/ItemFactory.cs
+++ b/src/bindings/mono/efl_mono/ItemFactory.cs
@@ -16,7 +16,7 @@ namespace Efl.Ui
 /// factory.Style().Bind("Name"); // The factory Style property is bound to 
the Name property for the given model.
 /// 
 /// 
-public class ItemFactory : Efl.Ui.LayoutFactory, IDisposable
+public class ItemFactory : Efl.Ui.LayoutFactory
 {
 /// Creates a new factory.
 /// 
diff --git a/src/bindings/mono/efl_mono/UserModel.cs 
b/src/bindings/mono/efl_mono/UserModel.cs
index 1116dfc561..a235a3a87f 100644
--- a/src/bindings/mono/efl_mono/UserModel.cs
+++ b/src/bindings/mono/efl_mono/UserModel.cs
@@ -67,7 +67,7 @@ internal class ModelHelper
 /// 
 /// The enclosed C# model class with the properties to be 
added to the native model.
 [Efl.Eo.BindingEntity]
-public class UserModel : Efl.MonoModelInternal, IDisposable
+public class UserModel : Efl.MonoModelInternal
 {
/// 
/// Creates a new root model.
@@ -85,12 +85,6 @@ public class UserModel : Efl.MonoModelInternal, 
IDisposable
  }
}
 
-   /// Disposes of this instance.
-   ~UserModel()
-   {
-   Dispose(false);
-   }
-
/// Adds a new child to the model wrapping the properties of 
o
///
/// Reflection is used to instantiate a new -based class for this child and
diff --git a/src/bindings/mono/eina_mono/eina_accessor.cs 
b/src/bindings/mono/eina_mono/eina_accessor.cs
index 6c939bcb52..64b4216a15 100644
--- a/src/bindings/mono/eina_mono/eina_accessor.cs
+++ b/src/bindings/mono/eina_mono/eina_accessor.cs
@@ -95,6 +95,7 @@ public class Accessor : IEnumerable, IDisposable
 public void Dispose()
 {
 Dispose(true);
+GC.SuppressFinalize(this);
 }
 
 /// Disposes of this wrapper, releasing the native accessor if
diff --git a/src/bindings/mono/eo_mono/NativeModule.cs 
b/src/bindings/mono/eo_mono/NativeModule.cs
index fd3b315561..ad9cc60214 100644
--- a/src/bindings/mono/eo_mono/NativeModule.cs
+++ b/src/bindings/mono/eo_mono/NativeModule.cs
@@ -22,6 +22,7 @@ namespace Efl.Eo
 public partial class NativeModule : IDisposable
 {
 private Lazy module;
+private bool disposed = false;
 
 ///Lazily tries to load the module with the given name.
 ///The name of the module to load.
@@ -43,12 +44,39 @@ public partial class NativeModule : IDisposable
 }
 }
 
-///Unload and released the handle to the wrapped module.
+/// Finalizer to be called from the Garbage Collector.
+~NativeModule()
+{
+Dispose(false);
+}
+
+/// Unload and released the handle to the wrapped 
module.
 public void Dispose()
 {
-UnloadLibrary(module.Value);
-module = null;
+Dispose(true);
+GC.SuppressFinalize(this);
 }
+
+/// Unload and released the handle to the wrapped 
module.
+protected virtual void Dispose(bool disposing)
+{
+if (disposed)
+{
+return;
+}
+
+if (disposing)
+{
+   module = null;
+}
+
+if (module.IsValueCreated)
+{
+   UnloadLibrary(module.Value);
+}
+
+disposed = true;
+   }
 }
 
 }

-- 




[EGIT] [core/efl] master 03/03: efl_ui_relative_layout: change child, target parameter type to Efl.Gfx.Entity

2019-10-24 Thread Yeongjong Lee
cedric pushed a commit to branch master.

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

commit 6231d5f2528ecc71a3f45636ea33eefb1e34678e
Author: Yeongjong Lee 
Date:   Tue Oct 15 06:21:16 2019 +

efl_ui_relative_layout: change child, target parameter type to 
Efl.Gfx.Entity

child, target should be graphical object.

Reviewed-by: Cedric BAIL 
Differential Revision: https://phab.enlightenment.org/D10401
---
 src/lib/elementary/efl_ui_relative_layout.eo | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lib/elementary/efl_ui_relative_layout.eo 
b/src/lib/elementary/efl_ui_relative_layout.eo
index 03b31831bb..13ac340158 100644
--- a/src/lib/elementary/efl_ui_relative_layout.eo
+++ b/src/lib/elementary/efl_ui_relative_layout.eo
@@ -9,10 +9,10 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget 
implements Efl.Pack_Lay
  [[Specifies the left side edge of the child relative to the target.
By default, target is parent and relative is 0.0.]]
  keys {
-child: Efl.Object; [[The child to specify relation.]]
+child: Efl.Gfx.Entity; [[The child to specify relation.]]
  }
  values {
-target: Efl.Object; [[The relative target.]]
+target: Efl.Gfx.Entity; [[The relative target.]]
 relative: double; [[The ratio between left and right of the target,
 ranging from 0.0 to 1.0.]]
  }
@@ -21,10 +21,10 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget 
implements Efl.Pack_Lay
  [[Specifies the right side edge of the child relative to the target.
By default, target is parent and relative is 1.0.]]
  keys {
-child: Efl.Object; [[The child to specify relation.]]
+child: Efl.Gfx.Entity; [[The child to specify relation.]]
  }
  values {
-target: Efl.Object; [[The relative target.]]
+target: Efl.Gfx.Entity; [[The relative target.]]
 relative: double; [[The ratio between left and right of the target,
 ranging from 0.0 to 1.0.]]
  }
@@ -33,10 +33,10 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget 
implements Efl.Pack_Lay
  [[Specifies the top side edge of the child relative to the target.
By default, target is parent and relative is 0.0.]]
  keys {
-child: Efl.Object; [[The child to specify relation.]]
+child: Efl.Gfx.Entity; [[The child to specify relation.]]
  }
  values {
-target: Efl.Object; [[The relative target.]]
+target: Efl.Gfx.Entity; [[The relative target.]]
 relative: double; [[The ratio between top and bottom of the target,
 ranging from 0.0 to 1.0.]]
  }
@@ -45,10 +45,10 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget 
implements Efl.Pack_Lay
  [[Specifies the bottom side edge of the child relative to the target.
By default, target is parent and relative is 1.0.]]
  keys {
-child: Efl.Object; [[The child to specify relation.]]
+child: Efl.Gfx.Entity; [[The child to specify relation.]]
  }
  values {
-target: Efl.Object; [[The relative target.]]
+target: Efl.Gfx.Entity; [[The relative target.]]
 relative: double; [[The ratio between top and bottom of the target,
 ranging from 0.0 to 1.0.]]
  }

-- 




[EGIT] [core/efl] master 02/02: eina_mono: re-throw exception to preserve stack details

2019-10-24 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit b8ba39f4cb228ef16677f0db9dd7173f309beee4
Author: Yeongjong Lee 
Date:   Thu Oct 24 18:21:39 2019 -0300

eina_mono: re-throw exception to preserve stack details

Summary:
fix CA2200
ref T8426

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8426

Differential Revision: https://phab.enlightenment.org/D10462
---
 src/bindings/mono/eina_mono/eina_common.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bindings/mono/eina_mono/eina_common.cs 
b/src/bindings/mono/eina_mono/eina_common.cs
index 7f59d73344..44d6c6cf4a 100644
--- a/src/bindings/mono/eina_mono/eina_common.cs
+++ b/src/bindings/mono/eina_mono/eina_common.cs
@@ -205,10 +205,10 @@ public static class StringConversion
 Marshal.WriteByte(native + strbuf.Length, 0); // write the 
terminating null
 return native;
 }
-catch(Exception e)
+catch(Exception)
 {
 MemoryNative.Free(native);
-throw e;
+throw;
 }
 }
 

-- 




[EGIT] [core/efl] master 01/02: eina_mono: Initialize UNHANDLED_EXCEPTION inline

2019-10-24 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 1158775084bfb5ae9a6382cb2e99b7bd3c5fafb7
Author: Yeongjong Lee 
Date:   Thu Oct 24 18:24:07 2019 -0300

eina_mono: Initialize UNHANDLED_EXCEPTION inline

Summary:
fix CA2207
ref T8427

Test Plan:
meson setup -Dbindings=mono,cxx -Dmono-beta=true
ninja test

Reviewers: lauromoura, felipealmeida, brunobelo

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8427

Differential Revision: https://phab.enlightenment.org/D10463
---
 src/bindings/mono/eina_mono/eina_error.cs | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/bindings/mono/eina_mono/eina_error.cs 
b/src/bindings/mono/eina_mono/eina_error.cs
index ea73ee54f7..5c4ac9345b 100644
--- a/src/bindings/mono/eina_mono/eina_error.cs
+++ b/src/bindings/mono/eina_mono/eina_error.cs
@@ -41,7 +41,7 @@ public struct Error : IComparable
 /// Unhandled Exception error identifier.
 /// Since EFL 1.23.
 /// 
-public static readonly Error UNHANDLED_EXCEPTION;
+public static readonly Error UNHANDLED_EXCEPTION = 
eina_error_msg_register("Unhandled C# exception occurred.");
 
 /// 
 /// No error identifier.
@@ -115,11 +115,6 @@ public struct Error : IComparable
 return "Eina.Error(" + code + ")";
 }
 
-static Error()
-{
-UNHANDLED_EXCEPTION = eina_error_msg_register("Unhandled C# exception 
occurred.");
-}
-
 [DllImport(efl.Libs.Eina)] static extern Error 
eina_error_msg_register(string msg);
 [DllImport(efl.Libs.Eina)] static extern Error eina_error_get();
 [DllImport(efl.Libs.Eina)] static extern void eina_error_set(Error error);

-- 




[EGIT] [core/efl] master 01/01: mono: encapsulate invoke method

2019-10-17 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit c25ba58007d385e9eb20a42453caf89b250afc89
Author: Yeongjong Lee 
Date:   Thu Oct 17 20:23:11 2019 -0300

mono: encapsulate invoke method

Summary: This patch will fix compiler warning CA1401.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10338
---
 src/bindings/mono/efl_mono/efl_all.cs   |  16 +--
 src/bindings/mono/efl_mono/efl_libs.cs.in   |  50 
 src/bindings/mono/eina_mono/eina_array.cs   |  28 ++---
 src/bindings/mono/eina_mono/eina_binbuf.cs  |  30 ++---
 src/bindings/mono/eina_mono/eina_hash.cs|  72 ++--
 src/bindings/mono/eina_mono/eina_inarray.cs |  52 
 src/bindings/mono/eina_mono/eina_inlist.cs  |  44 +++
 src/bindings/mono/eina_mono/eina_iterator.cs|  14 +--
 src/bindings/mono/eina_mono/eina_list.cs|  86 +++---
 src/bindings/mono/eina_mono/eina_stringshare.cs |  10 +-
 src/bindings/mono/eo_mono/iwrapper.cs   | 150 
 11 files changed, 276 insertions(+), 276 deletions(-)

diff --git a/src/bindings/mono/efl_mono/efl_all.cs 
b/src/bindings/mono/efl_mono/efl_all.cs
index 54385ca0cc..de917a3e68 100644
--- a/src/bindings/mono/efl_mono/efl_all.cs
+++ b/src/bindings/mono/efl_mono/efl_all.cs
@@ -12,9 +12,9 @@ namespace Efl
 static class UnsafeNativeMethods
 {
 private delegate void init_func_delegate();
-[DllImport(efl.Libs.Ecore)] public static extern void ecore_init();
-[DllImport(efl.Libs.Ecore)] public static extern void ecore_init_ex(int 
argc, IntPtr argv);
-[DllImport(efl.Libs.Ecore)] public static extern void ecore_shutdown();
+[DllImport(efl.Libs.Ecore)] internal static extern void ecore_init();
+[DllImport(efl.Libs.Ecore)] internal static extern void ecore_init_ex(int 
argc, IntPtr argv);
+[DllImport(efl.Libs.Ecore)] internal static extern void ecore_shutdown();
 // dotnet loads libraries from DllImport with RTLD_LOCAL. Due to the
 // way evas modules are built with meson, currently they do not link 
directly
 // with libevas, leading to symbol not found errors when trying to open 
them.
@@ -22,11 +22,11 @@ static class UnsafeNativeMethods
 // allowing the symbols to remain visible for the modules until the build
 // is sorted out.
 private static Efl.Eo.FunctionWrapper _evas_init;
-[DllImport(efl.Libs.Evas)] public static extern void evas_shutdown();
-[DllImport(efl.Libs.Elementary)] public static extern int elm_init(int 
argc, IntPtr argv);
-[DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown();
-[DllImport(efl.Libs.Elementary)] public static extern void elm_run();
-[DllImport(efl.Libs.Elementary)] public static extern void elm_exit();
+[DllImport(efl.Libs.Evas)] internal static extern void evas_shutdown();
+[DllImport(efl.Libs.Elementary)] internal static extern int elm_init(int 
argc, IntPtr argv);
+[DllImport(efl.Libs.Elementary)] internal static extern void 
elm_shutdown();
+[DllImport(efl.Libs.Elementary)] internal static extern void elm_run();
+[DllImport(efl.Libs.Elementary)] internal static extern void elm_exit();
 
 static UnsafeNativeMethods()
 {
diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in 
b/src/bindings/mono/efl_mono/efl_libs.cs.in
index 9626c06244..31e0455af9 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -5,34 +5,34 @@ namespace efl {
 /// 
 /// Define the name of the libraries to be passed to DllImport statements.
 /// 
-public static class Libs {
-public const string Efl = "@EFL_DL_MONO@";
-public const string Ecore = "@ECORE_DL_MONO@";
-public const string Eina = "@EINA_DL_MONO@";
-public const string Eo = "@EO_DL_MONO@";
-public const string Evas = "@EVAS_DL_MONO@";
-public const string Evil = "@EVIL_DL_MONO@";
-public const string Edje = "@EDJE_DL_MONO@";
-public const string Elementary = "@ELEMENTARY_DL_MONO@";
-public const string Eldbus = "@ELDBUS_DL_MONO@";
+internal class Libs {
+internal const string Efl = "@EFL_DL_MONO@";
+internal const string Ecore = "@ECORE_DL_MONO@";
+internal const string Eina = "@EINA_DL_MONO@";
+internal const string Eo = "@EO_DL_MONO@";
+internal const string Evas = "@EVAS_DL_MONO@";
+internal const string Evil = "@EVIL_DL_MONO@";
+internal const string Edje = "@EDJE_DL_MONO@";
+internal const string Eleme

[EGIT] [core/efl] master 02/02: mono: add static modifier to static holder types.

2019-10-17 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 0eb180b3aba4fa363ddf5797f67168a7f9865a04
Author: Yeongjong Lee 
Date:   Thu Oct 17 14:36:15 2019 -0300

mono: add static modifier to static holder types.

Summary: This patch will fix CA1052 compiler warnings.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10434
---
 src/bindings/mono/efl_mono/efl_libs.cs.in  |  2 +-
 src/bindings/mono/eina_mono/eina_config.cs |  2 +-
 src/bindings/mono/eina_mono/eina_log.cs|  4 +--
 src/bindings/mono/eldbus_mono/eldbus_common.cs | 34 +++---
 src/bindings/mono/eo_mono/FunctionWrapper.cs   |  2 +-
 src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs  |  2 +-
 .../mono/eo_mono/FunctionWrapper_Windows.cs|  2 +-
 src/bindings/mono/eo_mono/iwrapper.cs  |  2 +-
 8 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in 
b/src/bindings/mono/efl_mono/efl_libs.cs.in
index 87aee83a1e..9626c06244 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -5,7 +5,7 @@ namespace efl {
 /// 
 /// Define the name of the libraries to be passed to DllImport statements.
 /// 
-public class Libs {
+public static class Libs {
 public const string Efl = "@EFL_DL_MONO@";
 public const string Ecore = "@ECORE_DL_MONO@";
 public const string Eina = "@EINA_DL_MONO@";
diff --git a/src/bindings/mono/eina_mono/eina_config.cs 
b/src/bindings/mono/eina_mono/eina_config.cs
index 833b7d5da8..e9efea369f 100644
--- a/src/bindings/mono/eina_mono/eina_config.cs
+++ b/src/bindings/mono/eina_mono/eina_config.cs
@@ -11,7 +11,7 @@ namespace Eina
 /// Manage the initialization and cleanup for eina.
 /// Since EFL 1.23.
 /// 
-public class Config
+public static class Config
 {
 [DllImport(efl.Libs.Eina)] private static extern int eina_init();
 [DllImport(efl.Libs.Eina)] private static extern int eina_shutdown();
diff --git a/src/bindings/mono/eina_mono/eina_log.cs 
b/src/bindings/mono/eina_mono/eina_log.cs
index ca9ee12939..4d67bbbe04 100644
--- a/src/bindings/mono/eina_mono/eina_log.cs
+++ b/src/bindings/mono/eina_mono/eina_log.cs
@@ -12,7 +12,7 @@ namespace Eina
 /// EFL Logging facilities.
 /// Since EFL 1.23.
 /// 
-public class Log
+public static class Log
 {
 [DllImport(efl.Libs.Eina)] private static extern void eina_log_print(
 int domain,
@@ -64,7 +64,7 @@ public class Log
 /// The colors to be used by the logging system.
 /// Since EFL 1.23.
 /// 
-public class Color
+public static class Color
 {
 /// Light red
 /// Since EFL 1.23.
diff --git a/src/bindings/mono/eldbus_mono/eldbus_common.cs 
b/src/bindings/mono/eldbus_mono/eldbus_common.cs
index 99a7aef6e5..34f6482c9e 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_common.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_common.cs
@@ -163,7 +163,7 @@ public static class Argument
 /// The type of a byte.
 /// Since EFL 1.23.
 /// 
-public class ByteType
+public static class ByteType
 {
 /// 
 /// The code of the byte.
@@ -181,7 +181,7 @@ public static class Argument
 /// The type of a boolean
 /// Since EFL 1.23.
 /// 
-public class BooleanType
+public static class BooleanType
 {
 /// 
 /// The code of the boolean.
@@ -199,7 +199,7 @@ public static class Argument
 /// The type of a Int16.
 /// Since EFL 1.23.
 /// 
-public class Int16Type
+public static class Int16Type
 {
 /// 
 /// The code of the Int16.
@@ -217,7 +217,7 @@ public static class Argument
 /// The type of an unsigned Int16.
 /// Since EFL 1.23.
 /// 
-public class UInt16Type
+public static class UInt16Type
 {
 /// 
 /// The code of the unsigned Int16.
@@ -235,7 +235,7 @@ public static class Argument
 /// The type of a Int32.
 /// Since EFL 1.23.
 /// 
-public class Int32Type
+public static class Int32Type
 {
 /// 
 /// The code of the Int32.
@@ -253,7 +253,7 @@ public static class Argument
 /// The type of an unsigned Int32.
 /// Since EFL 1.23.
 /// 
-public class UInt32Type
+public static class UInt32Type
 {
 /// 
 /// The code of the unsigned Int32.
@@ -271,7 +271,7 @@ public static class Argument
 /// The type of a Int64.
 /// Since EFL 1.23.
 /// 
-public class Int64Type
+public static class Int64Type
 {
 /// 
 /// The code of the Int64.
@@ -289,7 +289,7 @

[EGIT] [core/efl] master 01/02: mono: merge namespaces

2019-10-17 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit cfa8baa152625a75eee6b288f111b0d9bc790e5a
Author: Yeongjong Lee 
Date:   Thu Oct 17 14:32:29 2019 -0300

mono: merge namespaces

Summary:
This patch merge namespaces to improve readablity.
Before
```
namespace Efl {
namespace Canvas {
```

After
```
namespace Efl.Canvas {
```

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10436
---
 src/bin/eolian_mono/eolian/mono/name_helpers.hh | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh 
b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 08b2bc997a..df1405d9d4 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -501,15 +501,18 @@ bool open_namespaces(OutputIterator sink, 
std::vector namespaces, C
 {
   std::transform(namespaces.begin(), namespaces.end(), namespaces.begin(), 
managed_namespace);
 
-  auto open_namespace = *("namespace " << string << " {\n\n");
-  return as_generator(open_namespace).generate(sink, namespaces, context);
+  std::string joined_namespace = join_namespaces(namespaces, '.');
+  if (joined_namespace.empty()) return true;
+  joined_namespace.pop_back();
+
+  return as_generator("namespace " << string << " {\n").generate(sink, 
joined_namespace, context);
 }
 
 template
 bool close_namespaces(OutputIterator sink, std::vector const& 
namespaces, Context const& context)
 {
- auto close_namespace = (lit("}") % "\n" ) << "\n\n";
- return as_generator(close_namespace).generate(sink, namespaces, context);
+ if (namespaces.empty()) return true;
+ return as_generator("}\n\n").generate(sink, attributes::unused, context);
 }
 
 std::string constructor_managed_name(std::string full_name)

-- 




[EGIT] [core/efl] master 01/01: mono: remove underscores of Efl_Op_Description, Efl_Object_Ops

2019-10-17 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 711823cb1d7c91d8ec2e97b713e8493162edc03d
Author: Yeongjong Lee 
Date:   Thu Oct 17 13:57:22 2019 -0300

mono: remove underscores of Efl_Op_Description, Efl_Object_Ops

Summary:
C# does not use underscore in type name.

ref T8333

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8333

Differential Revision: https://phab.enlightenment.org/D10422
---
 src/bin/eolian_mono/eolian/mono/function_registration.hh | 2 +-
 src/bin/eolian_mono/eolian/mono/klass.hh | 4 ++--
 src/bindings/mono/eo_mono/EoWrapper.cs   | 6 +++---
 src/bindings/mono/eo_mono/iwrapper.cs| 6 +++---
 src/bindings/mono/eo_mono/workaround.cs  | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh 
b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index e258ce7cff..cdcb9032c0 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -51,7 +51,7 @@ struct function_registration_generator
 if(!as_generator(
 indent << "if (methods.FirstOrDefault(m => m.Name == \"" << string << 
"\") != null)\n"
 << indent << "{\n"
-<< indent << scope_tab << "descs.Add(new Efl_Op_Description() {"
+<< indent << scope_tab << "descs.Add(new EflOpDescription() {"
 #ifdef _WIN32
 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
 #else
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh 
b/src/bin/eolian_mono/eolian/mono/klass.hh
index f33026444f..65645d33c2 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -424,9 +424,9 @@ struct klass
  if(!as_generator(
  indent << scope_tab << "/// Gets the list of Eo 
operations to override.\n"
  << indent << scope_tab << "/// The list of Eo operations 
to be overload.\n"
- << indent << scope_tab << "public override 
System.Collections.Generic.List GetEoOps(System.Type type, 
bool includeInherited)\n"
+ << indent << scope_tab << "public override 
System.Collections.Generic.List GetEoOps(System.Type type, 
bool includeInherited)\n"
  << indent << scope_tab << "{\n"
- << indent << scope_tab << scope_tab << "var descs = new 
System.Collections.Generic.List();\n"
+ << indent << scope_tab << scope_tab << "var descs = new 
System.Collections.Generic.List();\n"
 )
 .generate(sink, attributes::unused, inative_cxt))
return false;
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs 
b/src/bindings/mono/eo_mono/EoWrapper.cs
index eae4eea3b5..2f217783e5 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -363,11 +363,11 @@ public abstract class EoWrapper : IWrapper, IDisposable
 
 /// Gets the list of Eo operations to override.
 /// The list of Eo operations to be overload.
-public override System.Collections.Generic.List 
GetEoOps(Type type, bool includeInherited)
+public override System.Collections.Generic.List 
GetEoOps(Type type, bool includeInherited)
 {
-var descs = new 
System.Collections.Generic.List();
+var descs = new 
System.Collections.Generic.List();
 
-descs.Add(new Efl_Op_Description()
+descs.Add(new EflOpDescription()
 {
 api_func = 
Efl.Eo.FunctionInterop.LoadFunctionPointer(EoModule.Module, "efl_constructor"),
 func = 
Marshal.GetFunctionPointerForDelegate(csharpEflConstructorStaticDelegate)
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index cc9e47ed10..d1aa7be3f5 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -409,7 +409,7 @@ public class Globals
ptr = IntPtr.Add(ptr, Marshal.SizeOf(descs[0]));
 }
 
-Efl_Object_Ops ops;
+EflObjectOps ops;
 ops.descs = descs_ptr;
 ops.count = (UIntPtr)count;
 IntPtr ops_ptr = Marshal.AllocHGlobal(Marshal.S

[EGIT] [core/efl] master 02/02: mono: make public static field const or readonly

2019-10-16 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit ee33f93743b41c82543f8857e72e38e60a5cd67f
Author: Yeongjong Lee 
Date:   Wed Oct 16 10:39:52 2019 -0300

mono: make public static field const or readonly

Summary: This patch will fix CA2211 compiler warnings.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10423
---
 .../eolian_mono/eolian/mono/function_definition.hh |  2 +-
 src/bindings/mono/efl_mono/efl_libs.cs.in  | 24 +++---
 src/bindings/mono/eina_mono/eina_array.cs  |  2 +-
 src/bindings/mono/eina_mono/eina_error.cs  | 10 -
 src/bindings/mono/eina_mono/eina_inarray.cs|  2 +-
 src/bindings/mono/eina_mono/eina_log.cs| 24 +++---
 src/bindings/mono/eina_mono/eina_value.cs  |  2 +-
 src/bindings/mono/eldbus_mono/eldbus_common.cs |  2 +-
 src/bindings/mono/eo_mono/iwrapper.cs  |  8 
 9 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh 
b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 301f5417f3..d17ac564ea 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -76,7 +76,7 @@ struct native_function_definition_generator
 
 // Delegate holder (so it can't be collected).
 if(!as_generator
-   (indent << "public static Efl.Eo.FunctionWrapper<" << string << 
"_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
+   (indent << "public static readonly Efl.Eo.FunctionWrapper<" << string 
<< "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
   << string << "_api_delegate>(Module, \"" << string << "\");\n\n")
.generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name, 
f.c_name), context))
   return false;
diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in 
b/src/bindings/mono/efl_mono/efl_libs.cs.in
index 0aa56908ff..87aee83a1e 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -21,18 +21,18 @@ public class Libs {
 public const string Libdl = "libdl.so";
 public const string Kernel32 = "kernel32.dll";
 
-public static Efl.Eo.NativeModule EflModule = new Efl.Eo.NativeModule(Efl);
-public static Efl.Eo.NativeModule CoreModule = new 
Efl.Eo.NativeModule(Ecore);
-public static Efl.Eo.NativeModule EinaModule = new 
Efl.Eo.NativeModule(Eina);
-public static Efl.Eo.NativeModule EoModule = new Efl.Eo.NativeModule(Eo);
-public static Efl.Eo.NativeModule EvasModule = new 
Efl.Eo.NativeModule(Evas);
-public static Efl.Eo.NativeModule EvilModule = new 
Efl.Eo.NativeModule(Evil);
-public static Efl.Eo.NativeModule EdjeModule = new 
Efl.Eo.NativeModule(Edje);
-public static Efl.Eo.NativeModule ElementaryModule = new 
Efl.Eo.NativeModule(Elementary);
-public static Efl.Eo.NativeModule EldbusModule = new 
Efl.Eo.NativeModule(Eldbus);
-public static Efl.Eo.NativeModule CustomExportsModule = new 
Efl.Eo.NativeModule(CustomExports);
-public static Efl.Eo.NativeModule LibdlModule = new 
Efl.Eo.NativeModule(Libdl);
-public static Efl.Eo.NativeModule Kernel32Module = new 
Efl.Eo.NativeModule(Kernel32);
+public static readonly Efl.Eo.NativeModule EflModule = new 
Efl.Eo.NativeModule(Efl);
+public static readonly Efl.Eo.NativeModule CoreModule = new 
Efl.Eo.NativeModule(Ecore);
+public static readonly Efl.Eo.NativeModule EinaModule = new 
Efl.Eo.NativeModule(Eina);
+public static readonly Efl.Eo.NativeModule EoModule = new 
Efl.Eo.NativeModule(Eo);
+public static readonly Efl.Eo.NativeModule EvasModule = new 
Efl.Eo.NativeModule(Evas);
+public static readonly Efl.Eo.NativeModule EvilModule = new 
Efl.Eo.NativeModule(Evil);
+public static readonly Efl.Eo.NativeModule EdjeModule = new 
Efl.Eo.NativeModule(Edje);
+public static readonly Efl.Eo.NativeModule ElementaryModule = new 
Efl.Eo.NativeModule(Elementary);
+public static readonly Efl.Eo.NativeModule EldbusModule = new 
Efl.Eo.NativeModule(Eldbus);
+public static readonly Efl.Eo.NativeModule CustomExportsModule = new 
Efl.Eo.NativeModule(CustomExports);
+public static readonly Efl.Eo.NativeModule LibdlModule = new 
Efl.Eo.NativeModule(Libdl);
+public static readonly Efl.Eo.NativeModule Kernel32Module = new 
Efl.Eo.NativeModule(Kernel32);

[EGIT] [core/efl] master 01/01: mono: encapsulate internal efl_all members

2019-10-10 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit a3eb4670f1f0f89dd9c7f31b82467aaf2fb0ec48
Author: Yeongjong Lee 
Date:   Thu Oct 10 11:15:03 2019 -0300

mono: encapsulate internal efl_all members

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10347
---
 src/bindings/mono/efl_mono/efl_all.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bindings/mono/efl_mono/efl_all.cs 
b/src/bindings/mono/efl_mono/efl_all.cs
index e57da1b80e..1ea57df70d 100644
--- a/src/bindings/mono/efl_mono/efl_all.cs
+++ b/src/bindings/mono/efl_mono/efl_all.cs
@@ -33,7 +33,7 @@ static class UnsafeNativeMethods
 _evas_init = new 
Efl.Eo.FunctionWrapper(efl.Libs.Evas, "evas_init");
 }
 
-public static void evas_init()
+internal static void evas_init()
 {
 _evas_init.Value.Delegate();
 }
@@ -52,7 +52,7 @@ public static class All
 private set;
 }
 
-public static readonly object InitLock = new object();
+internal static readonly object InitLock = new object();
 
 public static void Init(Efl.Csharp.Components components = 
Efl.Csharp.Components.Basic)
 {

-- 




[EGIT] [core/efl] master 01/01: efl_gfx_arrangement: change content_padding param type and remove scalable

2019-10-02 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit fa908800556d8e4be7ce8785e7b88123df89e0a5
Author: Yeongjong Lee 
Date:   Wed Oct 2 12:04:12 2019 +0200

efl_gfx_arrangement: change content_padding param type and remove scalable

Summary:
This change `content_padding` parameter type to int from double for 
consistency
of size properties.

`scalable` should be handled in more common size API.

Co-authored-by: Mike Blumenkrantz 

ref T7864

Test Plan: ninja test

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7864

Differential Revision: https://phab.enlightenment.org/D10154
---
 src/bin/elementary/test_evas_snapshot.c|  2 +-
 src/bin/elementary/test_gfx_filters.c  |  2 +-
 src/bin/elementary/test_ui_box.c   | 10 
 src/bin/elementary/test_ui_pager.c | 10 
 src/bin/elementary/test_ui_pager_scroll.c  | 18 +++---
 src/bin/elementary/test_ui_relative_layout.c   | 14 +--
 src/bin/elementary/test_ui_spotlight.c | 10 
 src/bin/elementary/test_ui_tab_pager.c | 14 +--
 src/bin/elementary/test_ui_table.c | 10 
 src/examples/elementary/table_cxx_example_01.cc|  2 +-
 src/examples/elementary/table_cxx_example_02.cc|  2 +-
 src/lib/efl/interfaces/efl_gfx_arrangement.eo  |  5 ++--
 src/lib/elementary/efl_page_indicator_icon.c   |  2 +-
 src/lib/elementary/efl_ui_box.c| 10 +++-
 src/lib/elementary/efl_ui_box_private.h|  3 +--
 src/lib/elementary/efl_ui_container_layout.c   |  6 +
 src/lib/elementary/efl_ui_container_layout.h   |  3 +--
 .../elementary/efl_ui_spotlight_indicator_icon.c   |  2 +-
 src/lib/elementary/efl_ui_table.c  | 10 +++-
 src/lib/elementary/efl_ui_table_private.h  |  3 +--
 src/lib/elementary/efl_ui_tags.c   | 16 ++---
 src/tests/elementary/efl_ui_test_box.c | 26 +++-
 src/tests/elementary/efl_ui_test_table.c   | 28 --
 .../elementary/spec/efl_test_gfx_arrangement.c | 15 +---
 24 files changed, 94 insertions(+), 129 deletions(-)

diff --git a/src/bin/elementary/test_evas_snapshot.c 
b/src/bin/elementary/test_evas_snapshot.c
index f1395f2750..40513bb8c5 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -129,7 +129,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *e
  efl_ui_win_autodel_set(efl_added, 1));
 
table = efl_add(EFL_UI_TABLE_CLASS, win,
-  efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1));
+  efl_gfx_arrangement_content_padding_set(efl_added, 5, 5));
efl_content_set(win, table);
 
// Objects below the snapshot
diff --git a/src/bin/elementary/test_gfx_filters.c 
b/src/bin/elementary/test_gfx_filters.c
index 4cd521430f..35360b61b6 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -387,7 +387,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
  efl_ui_layout_orientation_set(efl_added, 
EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
  efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
  efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
- efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 
1),
+ efl_gfx_arrangement_content_padding_set(efl_added, 5, 5),
  efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
  efl_gfx_arrangement_content_align_set(efl_added, 0, 0.5));
   efl_pack(box, box2);
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 8b2e8ef2d8..57dc98bd6f 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -72,11 +72,11 @@ user_min_slider_cb(void *data EINA_UNUSED, const Efl_Event 
*event)
 static void
 padding_slider_cb(void *data, const Efl_Event *event)
 {
-   int val = elm_slider_value_get(event->object);
+   unsigned int val = lround(elm_slider_value_get(event->object));
Eo *win = data, *box;
 
box = efl_key_wref_get(win, "box");
-   efl_gfx_arrangement_content_padding_set(box, val, val, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(box, val, val);
 }
 
 static void
@@ -240,7 +240,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
 
vbox = efl_add(EFL_UI_BOX_CLASS, win,
   efl_ui_layout_orientation_set(efl_added, 
EFL_UI_LAYOUT_ORIE

[EGIT] [core/efl] master 01/01: eolian_mono: Respect beta for enum

2019-09-29 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit d1dd3c30b91fd1015a157690f5678fc0520bd23c
Author: Yeongjong Lee 
Date:   Mon Sep 30 13:52:45 2019 +0900

eolian_mono: Respect beta for enum

Summary: this prevent generating beta enum with `-Dmono-beta=false`.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=false

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10245
---
 src/bin/eolian_mono/eolian/mono/enum_definition.hh | 3 +++
 src/lib/eolian_cxx/grammar/klass_def.hpp   | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/src/bin/eolian_mono/eolian/mono/enum_definition.hh 
b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
index c5ab79ae66..56560afcf2 100644
--- a/src/bin/eolian_mono/eolian/mono/enum_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/enum_definition.hh
@@ -17,6 +17,9 @@ struct enum_definition_generator
   template 
   bool generate(OutputIterator sink, attributes::enum_def const& enum_, 
Context const& context) const
   {
+ if(enum_.is_beta)
+   return true;
+
  if(!name_helpers::open_namespaces(sink, enum_.namespaces, context))
return false;
 
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp 
b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 81f40d3ba5..d0de5db39b 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -1617,6 +1617,7 @@ struct enum_def
   std::vector namespaces;
   std::vector fields;
   documentation_def documentation;
+  bool is_beta;
 
   enum_def(Eolian_Typedecl const* enum_obj, Eolian_Unit const* unit)
   {
@@ -1634,6 +1635,7 @@ struct enum_def
   enum_value_def field_def(&*field_iterator, unit);
   this->fields.push_back(field_def);
}
+ is_beta = eolian_object_is_beta(EOLIAN_OBJECT(enum_obj));
 
  documentation = ::eolian_typedecl_documentation_get(enum_obj);
   }

-- 




[EGIT] [core/efl] master 01/01: efl_ui_layout: fix null pointer dereferences

2019-09-25 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 09b2ecec6d84c81e7f22eddb0daacd9412bfd69c
Author: Yeongjong Lee 
Date:   Wed Sep 25 06:44:56 2019 -0400

efl_ui_layout: fix null pointer dereferences

Summary: If theme doesn't have version data, `version` can be NULL.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10146
---
 src/lib/elementary/efl_ui_layout.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_layout.c 
b/src/lib/elementary/efl_ui_layout.c
index 8935e017d0..ec5e731dfd 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -547,13 +547,16 @@ _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, 
Efl_Ui_Layout_Data *sd)
 if (!version)
   ERR("Widget(%p) with type '%s' is not providing a version in its 
theme!", obj,
   efl_class_name_get(efl_class_get(obj)));
-errno = 0;
-sd->version = strtoul(version, NULL, 10);
-if (errno)
+else
   {
- ERR("Widget(%p) with type '%s' is not providing a valid version 
in its theme!", obj,
- efl_class_name_get(efl_class_get(obj)));
- sd->version = 0;
+ errno = 0;
+ sd->version = strtoul(version, NULL, 10);
+ if (errno)
+   {
+  ERR("Widget(%p) with type '%s' is not providing a valid 
version in its theme!", obj,
+  efl_class_name_get(efl_class_get(obj)));
+  sd->version = 0;
+   }
   }
  }
if (!version)

-- 




[EGIT] [core/efl] master 06/23: efl_ui_collection: fix null pointer dereferences

2019-09-19 Thread Yeongjong Lee
cedric pushed a commit to branch master.

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

commit e06e03f2200c1ed33a46369c01f3c6ca311f37e8
Author: Yeongjong Lee 
Date:   Tue Sep 17 09:15:05 2019 +

efl_ui_collection: fix null pointer dereferences

This will fix Coverity issue.

Reviewed-by: Mike Blumenkrantz 
Differential Revision: https://phab.enlightenment.org/D9986
---
 src/lib/elementary/efl_ui_collection.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_collection.c 
b/src/lib/elementary/efl_ui_collection.c
index 1763b65195..718f5b120e 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -960,6 +960,7 @@ 
_efl_ui_collection_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Efl
Eo *man = efl_add(EFL_UI_COLLECTION_FOCUS_MANAGER_CLASS, obj,
  efl_ui_focus_manager_root_set(efl_added, root));
Efl_Ui_Collection_Focus_Manager_Data *fm_pd = efl_data_scope_safe_get(man, 
EFL_UI_COLLECTION_FOCUS_MANAGER_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fm_pd, NULL);
fm_pd->collection = obj;
return man;
 }

-- 




[EGIT] [core/efl] master 01/02: efl_canvas_text: remove unused Text_Style eo struct

2019-09-16 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 471032d69dd53a68af33ebd53dd1c62047752e38
Author: Yeongjong Lee 
Date:   Fri Aug 23 14:03:57 2019 -0400

efl_canvas_text: remove unused Text_Style eo struct

Summary: `Efl.Canvas.Text_Style` is not used in eo world.

Reviewers: zmike, tasn

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9565
---
 src/lib/evas/canvas/efl_canvas_text.eo  | 2 --
 src/lib/evas/canvas/efl_canvas_text_eo.legacy.h | 6 --
 2 files changed, 8 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_text.eo 
b/src/lib/evas/canvas/efl_canvas_text.eo
index 8e334cefb5..f80b4d18e9 100644
--- a/src/lib/evas/canvas/efl_canvas_text.eo
+++ b/src/lib/evas/canvas/efl_canvas_text.eo
@@ -1,7 +1,5 @@
 import efl_text_types;
 
-struct @beta Efl.Canvas.Text_Style; [[EFL text style data structure]]
-
 class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
Efl.Canvas.Filter.Internal, Efl.Text_Font,
Efl.Text_Style, Efl.Text_Format, Efl.Text_Cursor,
diff --git a/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h 
b/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
index 5cdb55a34a..41ac844358 100644
--- a/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
@@ -11,12 +11,6 @@ typedef Eo Efl_Canvas_Text;
 #ifndef _EFL_CANVAS_TEXT_EO_TYPES
 #define _EFL_CANVAS_TEXT_EO_TYPES
 
-/** EFL text style data structure
- *
- * @ingroup Efl_Canvas
- */
-typedef struct _Efl_Canvas_Text_Style Efl_Canvas_Text_Style;
-
 
 #endif
 

-- 




[EGIT] [core/efl] master 08/10: efl_ui_table: remove inlist items in EINA_INLIST_FREE macro

2019-09-16 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit b60e949fb69983d0212c771e72bdc51d751fdb42
Author: Yeongjong Lee 
Date:   Fri Aug 23 13:22:33 2019 -0400

efl_ui_table: remove inlist items in EINA_INLIST_FREE macro

Summary:
Check the EINA_INLIST_FREE document
```
in eina_inlist.h

NOTE: it is the duty of the body loop to properly remove the item from the
inlist and free it. This function will turn into a infinite loop if you
don't remove all items from the list.
```

This will avoid infinite loop when Efl.Ui.Table is invalidated.

ref T8145

Test Plan: See the test file in T8145

Reviewers: brunobelo, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8145

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

diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index f2d90be60d..ca2b5c009d 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -244,6 +244,10 @@ _efl_ui_table_efl_object_invalidate(Eo *obj, 
Efl_Ui_Table_Data *pd)
EINA_INLIST_FREE(EINA_INLIST_GET(pd->items), gi)
  {
 efl_event_callback_array_del(gi->object, efl_ui_table_callbacks(), 
obj);
+
+pd->items = (Table_Item *)
+eina_inlist_remove(EINA_INLIST_GET(pd->items), 
EINA_INLIST_GET(gi));
+free(gi);
  }
 }
 

-- 




[EGIT] [core/efl] master 01/02: csharp: skip static members from interfaces

2019-09-16 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit 4bacfe155f9161d09b19a81bb38080d2d53cd5bd
Author: Yeongjong Lee 
Date:   Tue Sep 10 19:47:47 2019 -0300

csharp: skip static members from interfaces

Summary:
Static methods of eo-interface are generated in c# interface-concrete. 
there are
4 methods
`efl_access_object_access_root_get`, `efl_access_object_event_emit`,
`efl_access_object_event_handler_add`, `efl_access_object_event_handler_del`

If a class that inherits that interface, static method can't be called via
classname.

This commit changes eolian_mono by removing those static members from the C#
interface-concretes. If a generated class implements the interface, the 
static
member is generated as static member of the class directly.

Depends on D9800

Test Plan: Check that `Efl.Ui.Widget` has `public static Efl.Object 
AccessRoot` property.

Reviewers: lauromoura, felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9893
---
 src/bin/eolian_mono/eolian/mono/function_definition.hh | 14 +-
 src/bin/eolian_mono/eolian/mono/helpers.hh |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh 
b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 51da954d44..a0f28df305 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -85,6 +85,11 @@ struct native_function_definition_generator
 if (blacklist::is_non_public_interface_member(f, *klass))
   return true;
 
+// Do not generate static method in interface
+if (((klass->type == attributes::class_type::interface_) ||
+(klass->type == attributes::class_type::mixin)) && f.is_static)
+  return true;
+
 // Actual method implementation to be called from C.
 std::string return_type;
 
if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type),
 f.return_type, context))
@@ -171,9 +176,15 @@ struct function_definition_generator
   bool generate(OutputIterator sink, attributes::function_def const& f, 
Context const& context) const
   {
 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << 
"function_definition_generator: " << f.c_name << std::endl;
+
+bool is_concrete = 
context_find_tag(context).current_wrapper_kind == 
class_context::concrete;
 if(blacklist::is_function_blacklisted(f, context))
   return true;
 
+// Do not generate static function for concrete class
+if (is_concrete && f.is_static)
+  return true;
+
 std::string return_type;
 
if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type),
 f.return_type, context))
   return false;
@@ -310,9 +321,10 @@ struct property_wrapper_definition_generator
   bool is_interface = 
context_find_tag(context).current_wrapper_kind == 
class_context::interface;
   bool is_static = (property.getter.is_engaged() && 
property.getter->is_static)
|| (property.setter.is_engaged() && 
property.setter->is_static);
+  bool is_concrete = 
context_find_tag(context).current_wrapper_kind == 
class_context::concrete;
 
 
-  if (is_interface && is_static)
+  if ((is_concrete || is_interface) && is_static)
 return true;
 
   auto get_params = property.getter.is_engaged() ? 
property.getter->parameters.size() : 0;
diff --git a/src/bin/eolian_mono/eolian/mono/helpers.hh 
b/src/bin/eolian_mono/eolian/mono/helpers.hh
index 291e5234ff..5c1db6df24 100644
--- a/src/bin/eolian_mono/eolian/mono/helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/helpers.hh
@@ -258,6 +258,9 @@ std::vector 
get_all_registerable_methods(attributes::k
 if (cls == func.klass)
   return true;
 
+if (is_managed_interface(func.klass) && func.is_static)
+  return true;
+
 if (!is_managed_interface(func.klass) || func.scope != 
attributes::member_scope::scope_public)
   return true;
 return false;

-- 




[EGIT] [core/efl] master 01/01: efl_ui_animation_view: add document of Efl.Ui.Animation_View_State enum

2019-09-16 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit 78f5efbd6700deff590d19ed3c4a226d97f2a5bd
Author: Yeongjong Lee 
Date:   Wed Aug 21 19:00:30 2019 +0900

efl_ui_animation_view: add document of Efl.Ui.Animation_View_State enum

Summary:
This patch will fix mono compiler error.
```
src/bindings/mono/efl_ui_animation_view.eo.cs(2809,13): error CS1591: 
Warning as
Error: Missing XML comment for publicly visible type or member 
`Efl.Ui.AnimationViewState'
```

Test Plan: meson setup -Dbindings=mono,cxx

Reviewers: Jaehyun_Cho, SanghyeonLee

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9672
---
 src/lib/elementary/efl_ui_animation_view.eo | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_animation_view.eo 
b/src/lib/elementary/efl_ui_animation_view.eo
index 67321e7c97..de3dd261ab 100644
--- a/src/lib/elementary/efl_ui_animation_view.eo
+++ b/src/lib/elementary/efl_ui_animation_view.eo
@@ -1,6 +1,7 @@
 
 enum Efl.Ui.Animation_View_State
 {
+   [[State of animation view]]
not_ready, [[Animation is not ready to play. (Probably, it didn't file set 
yet or failed to read file.]]
play, [[Animation is on playing. see @Efl.Ui.Animation_View.play]]
play_back, [[Animation is on playing back (rewinding). see 
@Efl.Ui.Animation_View.play_back]]

-- 




[EGIT] [core/efl] master 01/01: efl_pack_table: rename table_position to cell_column, cell_row

2019-09-16 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit 9c52484cafbb52a293e1048362b877ec7e43a81f
Author: Yeongjong Lee 
Date:   Tue Aug 27 12:46:03 2019 +0200

efl_pack_table: rename table_position to cell_column, cell_row

Summary:
Rename ambiguous `table_position` property. it is actually related to child
column, row.

ref T7900

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7900

Differential Revision: https://phab.enlightenment.org/D9611
---
 src/bin/elementary/test_ui_table.c |  6 +-
 src/bin/elementary/test_ui_table_static.c  |  6 +-
 src/lib/edje/edje_part_invalid.c   |  5 +-
 src/lib/edje/edje_part_table.c | 40 +--
 src/lib/edje/efl_canvas_layout_part_invalid.eo |  3 +-
 src/lib/edje/efl_canvas_layout_part_table.eo   |  3 +-
 src/lib/efl/interfaces/efl_pack_table.eo   | 17 -
 src/lib/elementary/efl_ui_layout_pack.c| 49 --
 src/lib/elementary/efl_ui_layout_part_table.eo |  3 +-
 src/lib/elementary/efl_ui_table.c  | 92 --
 src/lib/elementary/efl_ui_table.eo |  3 +-
 src/tests/edje/edje_test_container.c   |  3 +-
 12 files changed, 202 insertions(+), 28 deletions(-)

diff --git a/src/bin/elementary/test_ui_table.c 
b/src/bin/elementary/test_ui_table.c
index 43b4c9cdb0..67f7067657 100644
--- a/src/bin/elementary/test_ui_table.c
+++ b/src/bin/elementary/test_ui_table.c
@@ -138,7 +138,8 @@ child_evt_cb(void *data, const Efl_Event *event)
int col, row, colspan, rowspan;
char buf[64];
 
-   efl_pack_table_position_get(event->object, it, , , , 
);
+   efl_pack_table_cell_column_get(event->object, it, , );
+   efl_pack_table_cell_row_get(event->object, it, , );
if (event->desc == EFL_CONTAINER_EVENT_CONTENT_ADDED)
  sprintf(buf, "pack %d,%d %dx%d", col, row, colspan, rowspan);
else
@@ -168,7 +169,8 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
it = efl_content_iterate(pack);
EINA_ITERATOR_FOREACH(it, item)
  {
-if (efl_pack_table_position_get(pack, item, , , , ))
+if (efl_pack_table_cell_column_get(pack, item, , ) &&
+efl_pack_table_cell_row_get(pack, item, , ))
   {
  Eina_Rect m;
 
diff --git a/src/bin/elementary/test_ui_table_static.c 
b/src/bin/elementary/test_ui_table_static.c
index 3e5ff789c4..7656bbc6a4 100644
--- a/src/bin/elementary/test_ui_table_static.c
+++ b/src/bin/elementary/test_ui_table_static.c
@@ -86,10 +86,8 @@ _ch_table(void *data, const Efl_Event *ev)
Eo *table = data;
int x, y, w, h;
 
-   // FIXME: old elm_table API doesn't need table object
-   //elm_grid_pack_get(obj, , , , );
-   //elm_grid_pack_set(obj, x - 1, y - 1, w + 2, h + 2);
-   efl_pack_table_position_get(table, ev->object, , , , );
+   efl_pack_table_cell_column_get(table, ev->object, , );
+   efl_pack_table_cell_row_get(table, ev->object, , );
efl_pack_table(table, ev->object, x - 1, y - 1, w + 2, h + 2);
 }
 
diff --git a/src/lib/edje/edje_part_invalid.c b/src/lib/edje/edje_part_invalid.c
index 6403109b1c..4c62204709 100644
--- a/src/lib/edje/edje_part_invalid.c
+++ b/src/lib/edje/edje_part_invalid.c
@@ -95,7 +95,10 @@ EDJE_PART_INVALID_CONST(Efl_Ui_Layout_Orientation, 0, 
efl_ui_layout_orientation_
 EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_table, 
_efl_canvas_layout_part_invalid_efl_pack_table_pack_table, Efl_Gfx_Entity 
*subobj, int col, int row, int colspan, int rowspan)
 EDJE_PART_INVALID(Efl_Gfx_Entity *, 0, efl_pack_table_content_get, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_content_get, int col, int 
row)
 EDJE_PART_INVALID(Eina_Iterator *, 0, efl_pack_table_contents_get, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_contents_get, int col, int 
row, Eina_Bool below)
-EDJE_PART_INVALID_CONST(Eina_Bool, 0, efl_pack_table_position_get, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_position_get, 
Efl_Gfx_Entity *subobj, int *col, int *row, int *colspan, int *rowspan)
+EDJE_PART_INVALID_CONST(Eina_Bool, 0, efl_pack_table_cell_column_get, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_cell_column_get, 
Efl_Gfx_Entity *subobj, int *col, int *colspan)
+EDJE_PART_INVALID_VOID(efl_pack_table_cell_column_set, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_cell_column_set, 
Efl_Gfx_Entity *subobj, int col, int colspan)
+EDJE_PART_INVALID_CONST(Eina_Bool, 0, efl_pack_table_cell_row_get, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_cell_row_get, 
Efl_Gfx_Entity *subobj, int *row, int *rowspan)
+EDJE_PART_INVALID_VOID(efl_pack_table_cell_row_set, 
_efl_canvas_layout_part_invalid_efl_pack_table_table_cell_row_set, 
Ef

[EGIT] [core/efl] master 01/01: eolian_mono: remove redundant code in NativeMethods

2019-09-15 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit f4d9188ca75b1961d1936abf47fb2685c35d5ee2
Author: Yeongjong Lee 
Date:   Sun Sep 8 22:13:40 2019 -0300

eolian_mono: remove redundant code in NativeMethods

Summary:
Duplicated interface's NativeMethods code will be removed. they are called 
in
`GetInterfaces`.

Size of efl_mono.dll
6,587,392 bytes(6.6MB) -> 4,112,384 bytes (4.1MB)

Test Plan: ninja test

Reviewers: felipealmeida, lauromoura, vitor.sousa

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9752
---
 src/bin/eolian_mono/eolian/mono/klass.hh | 20 +---
 src/bindings/mono/eo_mono/EoWrapper.cs   |  2 +-
 src/bindings/mono/eo_mono/iwrapper.cs| 24 +++-
 3 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh 
b/src/bin/eolian_mono/eolian/mono/klass.hh
index f1b89abc71..c10bfb3fda 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -398,7 +398,7 @@ struct klass
 context);
  auto native_inherit_name = 
name_helpers::klass_native_inherit_name(cls);
  auto inherit_name = name_helpers::klass_inherit_name(cls);
- auto implementable_methods = 
helpers::get_all_implementable_methods(cls, context);
+ auto implementable_methods = cls.functions;
  bool root = !helpers::has_regular_ancestor(cls);
  auto const& indent = current_indentation(inative_cxt);
 
@@ -430,7 +430,7 @@ struct klass
  if(!as_generator(
  indent << scope_tab << "/// Gets the list of Eo 
operations to override.\n"
  << indent << scope_tab << "/// The list of Eo operations 
to be overload.\n"
- << indent << scope_tab << "public override 
System.Collections.Generic.List GetEoOps(System.Type 
type)\n"
+ << indent << scope_tab << "public override 
System.Collections.Generic.List GetEoOps(System.Type type, 
bool includeInherited)\n"
  << indent << scope_tab << "{\n"
  << indent << scope_tab << scope_tab << "var descs = new 
System.Collections.Generic.List();\n"
 )
@@ -452,8 +452,22 @@ struct klass
 ).generate(sink,  attributes::unused, inative_cxt))
  return false;
 
+ if(!as_generator(
+ indent << scope_tab << scope_tab << "if (includeInherited)\n"
+ << indent << scope_tab(2) << "{\n"
+ << indent << scope_tab(3) << "var all_interfaces = 
type.GetInterfaces();\n"
+ << indent << scope_tab(3) << "foreach (var iface in 
all_interfaces)\n"
+ << indent << scope_tab(3) << "{\n"
+ << indent << scope_tab(4) <<  "var moredescs = 
((Efl.Eo.NativeClass)iface.GetCustomAttributes(false)?.FirstOrDefault(attr => 
attr is Efl.Eo.NativeClass))?.GetEoOps(type, false);\n"
+ << indent << scope_tab(4) <<  "if (moredescs != null)\n"
+ << indent << scope_tab(5) <<  "descs.AddRange(moredescs);\n"
+ << indent << scope_tab(3) << "}\n"
+ << indent << scope_tab(2) << "}\n"
+   ).generate(sink, attributes::unused, inative_cxt))
+ return false;
+
  if (!root || 
context_find_tag(context).current_wrapper_kind != 
class_context::concrete)
-   if(!as_generator(indent << scope_tab << scope_tab << 
"descs.AddRange(base.GetEoOps(type));\n").generate(sink, attributes::unused, 
inative_cxt))
+   if(!as_generator(indent << scope_tab << scope_tab << 
"descs.AddRange(base.GetEoOps(type, false));\n").generate(sink, 
attributes::unused, inative_cxt))
  return false;
 
  if(!as_generator(
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs 
b/src/bindings/mono/eo_mono/EoWrapper.cs
index 688de85cae..1805071175 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -357,7 +357,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
 
 /// Gets the list of Eo operations to override.
 /// The list of Eo operations to be overload.
-public override System.Collections.Generic.List 
GetEoOps(Type type)
+   

[EGIT] [core/efl] master 01/01: efl_ui_widget: fix dereference null return value issues

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit 5f4c9a4458a73837ca8b85139eac279b42f0
Author: Yeongjong Lee 
Date:   Wed Aug 21 07:43:55 2019 +

efl_ui_widget: fix dereference null return value issues

Dereference null return value issues is reported by Coverity.

If `sd` is NULL, it will return zero values.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D9668
---
 src/lib/elementary/efl_ui_widget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index abcbc9b3c1..7da9d5c030 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -5615,6 +5615,7 @@ static Efl_Canvas_Layout_Part_Type
 _efl_ui_widget_part_efl_canvas_layout_part_type_get(const Eo *obj EINA_UNUSED, 
Elm_Part_Data *pd)
 {
Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EFL_CANVAS_LAYOUT_PART_TYPE_NONE);
return efl_canvas_layout_part_type_get(efl_part(sd->resize_obj, pd->part));
 }
 
@@ -5622,6 +5623,7 @@ static Eina_Rect
 _efl_ui_widget_part_efl_gfx_entity_geometry_get(const Eo *obj EINA_UNUSED, 
Elm_Part_Data *pd)
 {
Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(pd->obj, MY_CLASS);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_RECT_EMPTY());
return efl_gfx_entity_geometry_get(efl_part(sd->resize_obj, pd->part));
 }
 

-- 




[EGIT] [core/efl] master 01/01: efl_ui_widget: ensure that tree_unfocusable is binary number in its getter

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit bb62f71fe21763a2a76e0e23f83659e1c8017571
Author: Yeongjong Lee 
Date:   Wed Aug 21 10:11:10 2019 +

efl_ui_widget: ensure that tree_unfocusable is binary number in its getter

since 2dd596084b3906cf85eeab5b010913839aa252e2, tree_unfocusable is changed 
from
Eina_Bool to int.
Double negation ensure binary return value of 
`elm_widget_tree_unfocusable_get`

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D9673
---
 src/lib/elementary/efl_ui_widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index 684c506e7c..fa6ba5a3ed 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -1776,7 +1776,7 @@ elm_widget_tree_unfocusable_get(const Eo *obj)
Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
if (!sd) return EINA_FALSE;
 
-   return sd->tree_unfocusable;
+   return !!sd->tree_unfocusable;
 }
 
 /**

-- 




[EGIT] [core/efl] master 01/03: efl_ui_widget: correct the comparison parameter in scroll_freeze_push

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit e7986cc6468b4f99b4c8abdb4a900992d9e525ad
Author: Yeongjong Lee 
Date:   Wed Aug 21 08:44:20 2019 +

efl_ui_widget: correct the comparison parameter in scroll_freeze_push

I guess it is copy/paste error.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D9669
---
 src/lib/elementary/efl_ui_widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index 7da9d5c030..b4e3c1edf6 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -2250,7 +2250,7 @@ _efl_ui_widget_scroll_freeze_push(Eo *obj, 
Elm_Widget_Smart_Data *sd)
{
   if (elm_widget_is(child) && _elm_scrollable_is(child))
 {
-   if (elm_widget_is_legacy(obj))
+   if (elm_widget_is_legacy(child))
  elm_interface_scrollable_freeze_set(child, EINA_TRUE);
else
  efl_ui_scrollable_scroll_freeze_set(child, EINA_TRUE);

-- 




[EGIT] [core/efl] master 01/01: csharp: add legacy eo in mono blacklist

2019-09-15 Thread Yeongjong Lee
felipealmeida pushed a commit to branch master.

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

commit 17b0a2634cd9c7e281288253e975a1d1eb147b5f
Author: Yeongjong Lee 
Date:   Fri Aug 23 14:29:04 2019 -0300

csharp: add legacy eo in mono blacklist

Summary: It is unnecessary to generate cs file of legacy class.

Test Plan: meson setup -Dbindings=mono,cxx

Reviewers: felipealmeida, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9638
---
 src/bindings/mono/meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index c0f04c3b37..dbdacd88c8 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -80,6 +80,8 @@ blacklisted_files = [
   'elm_multibuttonentry_part.eo',
   'elm_atspi_bridge.eo',
   'elm_atspi_app_object.eo',
+  'elm_interface_scrollable.eo',
+  'evas_canvas3d_types.eot',
 ]
 
 manual_inheritance_files = [

-- 




[EGIT] [core/efl] master 02/02: efl_ui_widget: correct the comparison parameter in scroll_freeze_pop

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit e8a32d72c6a139fd4efedf2f7c4ef12be15f9634
Author: Yeongjong Lee 
Date:   Thu Aug 22 07:17:03 2019 -0400

efl_ui_widget: correct the comparison parameter in scroll_freeze_pop

Summary:
It is copy/paste error.
See also, e7986cc6468b4f99b4c8abdb4a900992d9e525ad

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index a87712f87e..a549cab3d5 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -2282,7 +2282,7 @@ _efl_ui_widget_scroll_freeze_pop(Eo *obj, 
Elm_Widget_Smart_Data *sd)
{
   if (elm_widget_is(child) && _elm_scrollable_is(child))
 {
-   if (elm_widget_is_legacy(obj))
+   if (elm_widget_is_legacy(child))
  elm_interface_scrollable_freeze_set(child, 
EINA_FALSE);
else
  efl_ui_scrollable_scroll_freeze_set(child, 
EINA_FALSE);

-- 




[EGIT] [core/efl] master 01/01: csharp: remove unused delegate and struct

2019-09-15 Thread Yeongjong Lee
lauromoura pushed a commit to branch master.

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

commit d7006f6a09e60d4496488a24732bf4ad047e70d2
Author: Yeongjong Lee 
Date:   Tue Sep 10 23:41:42 2019 -0300

csharp: remove unused delegate and struct

Summary: cleanup workaround.cs

Test Plan: ninja test

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9895
---
 src/bindings/mono/eo_mono/workaround.cs | 104 
 1 file changed, 104 deletions(-)

diff --git a/src/bindings/mono/eo_mono/workaround.cs 
b/src/bindings/mono/eo_mono/workaround.cs
index 49a6e1ef58..a8079e4090 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -44,30 +44,6 @@ public struct Efl_Object_Ops
 public UIntPtr count;
 };
 
-#pragma warning disable 0169
-
-public struct EvasObjectBoxLayout
-{
-IntPtr o;
-IntPtr priv;
-IntPtr user_data;
-};
-
-[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
-public struct EvasObjectBoxData
-{
-}
-
-public struct EvasObjectBoxOption
-{
-IntPtr obj;
-[MarshalAsAttribute(UnmanagedType.U1)] bool max_reached;
-[MarshalAsAttribute(UnmanagedType.U1)] bool min_reached;
-Evas.Coord alloc_size;
-};
-
-#pragma warning restore 0169
-
 namespace Efl
 {
 
@@ -212,8 +188,6 @@ public struct TextAnnotateAnnotation
 [MarshalAsAttribute(UnmanagedType.U1)]bool is_item;
 }
 
-public delegate void SignalCb(IntPtr data, IntPtr obj, IntPtr emission, IntPtr 
source);
-
 namespace Access
 {
 
@@ -229,85 +203,7 @@ public struct ActionData
 
 } // namespace Efl
 
-namespace Evas
-{
-
-public struct Coord
-{
-int val;
-
-public Coord(int value)
-{
-val = value;
-}
-
-static public implicit operator Coord(int val)
-{
-return new Coord(val);
-}
-
-static public implicit operator int(Coord coord)
-{
-return coord.val;
-}
-}
-
-/* Copied from Evas_Legacy.h */
-public enum TextStyleType
-{
-/// plain, standard text.
-Plain = 0,
-/// text with shadow underneath.
-Shadow,
-/// text with an outline.
-Outline,
-/// text with a soft outline.
-SoftOutline,
-/// text with a glow effect.
-Glow,
-/// text with both outline and shadow effects.
-OutlineShadow,
-/// text with (far) shadow underneath.
-FarShadow,
-/// text with outline and soft shadow effects combined.
-OutlineSoftShadow,
-/// text with (soft) shadow underneath.
-SoftShadow,
-/// text with (far soft) shadow underneath.
-FarSoftShadow,
-
-// Shadow direction modifiers
-/// shadow growing to bottom right.
-ShadowDirectionBottomRight = 0 /* 0 >> 4 */,
-/// shadow growing to the bottom.
-ShadowDirectionBottom = 16 /* 1 >> 4 */,
-/// shadow growing to bottom left.
-ShadowDirectionBottomLeft = 32 /* 2 >> 4 */,
-/// shadow growing to the left.
-ShadowDirectionLeft = 48 /* 3 >> 4 */,
-/// shadow growing to top left.
-ShadowDirectionTopLeft = 64 /* 4 >> 4 */,
-/// shadow growing to the top.
-ShadowDirectionTop = 80 /* 5 >> 4 */,
-/// shadow growing to top right.
-ShadowDirectionTopRight = 96 /* 6 >> 4 */,
-/// shadow growing to the right.
-ShadowDirectionRight = 112 /* 7 >> 4 */
-};
-
-} // namespace Evas
-
 // Global delegates
 public delegate int Eina_Compare_Cb(IntPtr a, IntPtr b);
-public delegate void ElmInterfaceScrollableCb(IntPtr obj, IntPtr data);
-public delegate void ElmInterfaceScrollableMinLimitCb(IntPtr obj,
-  
[MarshalAsAttribute(UnmanagedType.U1)]bool w,
-  
[MarshalAsAttribute(UnmanagedType.U1)]bool h);
-public delegate void ElmInterfaceScrollableResizeCb(IntPtr obj, Evas.Coord w, 
Evas.Coord h);
-[return: MarshalAsAttribute(UnmanagedType.U1)]
-public delegate bool ElmMultibuttonentryItemFilterCb(IntPtr obj, IntPtr 
item_label, IntPtr item_data, IntPtr data);
-public delegate IntPtr ElmMultibuttonentryFormatCb(int count, IntPtr data);
 public delegate void EinaFreeCb(IntPtr data);
 public delegate void EvasSmartCb(IntPtr data, IntPtr obj, IntPtr event_info);
-public delegate void ElmObjectItemSignalCb(IntPtr data, IntPtr item, IntPtr 
emission, IntPtr source);
-public delegate void ElmTooltipItemContentCb(IntPtr data, IntPtr obj, IntPtr 
tooltip, IntPtr item);

-- 




[EGIT] [core/efl] master 01/01: efl_ui_table: update recalc boolean in child delete callback

2019-09-15 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit 0c801b0d120a5ee8e01c5c323a56a9e07503bf51
Author: Yeongjong Lee 
Date:   Fri Sep 6 09:20:13 2019 +0200

efl_ui_table: update recalc boolean in child delete callback

Test Plan:
1. elementary_test -to 'efl.ui.table (linear api)'
2. Click `Append` button 3 times.
3. Click `appended 6` button to delete
4. Click `Append` button.
5. Check that `appended 7` button position (1,1).

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9856
---
 src/lib/elementary/efl_ui_table.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index 7ed1635db4..2c24c73fb1 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -58,6 +58,14 @@ _on_child_del(void *data, const Efl_Event *event)
gi = _efl_ui_table_item_date_get(table, pd, event->object);
if (!gi) return;
 
+   if ((gi->col == pd->last_col) && (gi->row == pd->last_row))
+ pd->linear_recalc = EINA_TRUE;
+
+   if (gi->col + gi->col_span >= pd->cols)
+ pd->cols_recalc = EINA_TRUE;
+   if (gi->row + gi->row_span >= pd->rows)
+ pd->rows_recalc = EINA_TRUE;
+
pd->items = (Table_Item *)
  eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi));
free(gi);

-- 




[EGIT] [core/efl] master 01/01: efl_ui_layout: remove efl_gfx_hint_size_min_set in _sizing_eval

2019-09-15 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit c857955a4ece647b2039719bd750b080394b6eb5
Author: Yeongjong Lee 
Date:   Wed Aug 14 17:48:32 2019 +0900

efl_ui_layout: remove efl_gfx_hint_size_min_set in _sizing_eval

Summary:
`evas_object_size_hint_min_set` is replaced with 
`efl_gfx_hint_size_min_set` in
4d79efce6. it is able to have backward compatibility issue because
`evas_object_size_hint_min_set` call `efl_gfx_hint_size_restricted_min_set`
internally.
```
evas_object_main.c:2501
EAPI void
evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(w, h));
}
```

This patch remove unnecessary min_set call.

Test Plan: elementary_test

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9566
---
 src/lib/elementary/efl_ui_layout.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/elementary/efl_ui_layout.c 
b/src/lib/elementary/efl_ui_layout.c
index d1659aa19b..8dd0879dbc 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -210,10 +210,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd, 
Elm_Layout_Data *ld)
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
 
if (ld)
- {
-ld->restricted_calc_w = ld->restricted_calc_h = EINA_FALSE;
-efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(minw, minh));
- }
+ ld->restricted_calc_w = ld->restricted_calc_h = EINA_FALSE;
 }
 
 void

-- 




[EGIT] [core/efl] master 02/03: efl_ui_panel: remove dependency with elm_interface_scrollable

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit 1c1382e09bb4e58bfdfd752bdb58694a8c8c1042
Author: Yeongjong Lee 
Date:   Tue Aug 20 04:43:15 2019 +

efl_ui_panel: remove dependency with elm_interface_scrollable

`elm_interface_scrollable` is replaced with `efl_ui_scrollable_interative`.

Legacy code related to `SCROLL` event is removed because eo `SCROLL` event 
have
`void` event info.
```
in lib/efl/inferfaces/efl_ui_scrollable.eo

scroll: void; [[Called when scrolling]]

```
I think we need to add new `PANEL_SCROLL` event that have 
`Efl_Ui_Panel_Scroll_Info`

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D9637
---
 src/lib/elementary/efl_ui_panel.c | 210 +++---
 src/lib/elementary/efl_ui_panel.eo|   6 +-
 src/lib/elementary/efl_ui_panel_private.h |   3 +-
 3 files changed, 84 insertions(+), 135 deletions(-)

diff --git a/src/lib/elementary/efl_ui_panel.c 
b/src/lib/elementary/efl_ui_panel.c
index f714580f13..489569b35c 100644
--- a/src/lib/elementary/efl_ui_panel.c
+++ b/src/lib/elementary/efl_ui_panel.c
@@ -6,6 +6,7 @@
 #define EFL_ACCESS_WIDGET_ACTION_PROTECTED
 #define EFL_UI_FOCUS_LAYER_PROTECTED
 #define EFL_PART_PROTECTED
+#define EFL_UI_SCROLL_MANAGER_PROTECTED
 
 #include 
 
@@ -254,20 +255,20 @@ _handler_open(Evas_Object *obj, Evas_Coord w, Evas_Coord 
h)
switch (sd->orient)
  {
   case EFL_UI_PANEL_ORIENT_TOP:
- elm_interface_scrollable_region_bring_in
-   (obj, 0, (h * sd->content_size_ratio) - sd->handler_size, w, h);
+ efl_ui_scrollable_scroll
+   (obj, EINA_RECT(0, (h * sd->content_size_ratio) - 
sd->handler_size, w, h), EINA_TRUE);
  break;
   case EFL_UI_PANEL_ORIENT_BOTTOM:
- elm_interface_scrollable_region_bring_in
-   (obj, 0, sd->handler_size, w, h);
+ efl_ui_scrollable_scroll
+   (obj, EINA_RECT(0, sd->handler_size, w, h), EINA_TRUE);
  break;
   case EFL_UI_PANEL_ORIENT_LEFT:
- elm_interface_scrollable_region_bring_in
-   (obj, (w * sd->content_size_ratio) - sd->handler_size, 0, w, h);
+ efl_ui_scrollable_scroll
+   (obj, EINA_RECT((w * sd->content_size_ratio) - 
sd->handler_size, 0, w, h), EINA_TRUE);
  break;
   case EFL_UI_PANEL_ORIENT_RIGHT:
- elm_interface_scrollable_region_bring_in
-   (obj, sd->handler_size, 0, w, h);
+ efl_ui_scrollable_scroll
+   (obj, EINA_RECT(sd->handler_size, 0, w, h), EINA_TRUE);
  break;
  }
 }
@@ -280,8 +281,7 @@ _drawer_open(Evas_Object *obj, Evas_Coord w, Evas_Coord h, 
Eina_Bool anim)
 
if (sd->freeze)
  {
-elm_interface_scrollable_movement_block_set
-  (obj, EFL_UI_SCROLL_BLOCK_NONE);
+efl_ui_scrollable_movement_block_set(obj, EFL_UI_SCROLL_BLOCK_NONE);
 sd->freeze = EINA_FALSE;
 elm_layout_signal_emit(sd->scr_ly, "efl,state,content,visible", "efl");
  }
@@ -304,21 +304,16 @@ _drawer_open(Evas_Object *obj, Evas_Coord w, Evas_Coord 
h, Eina_Bool anim)
x = w * sd->content_size_ratio;
  break;
  }
-
-   if (anim)
- elm_interface_scrollable_region_bring_in
-   (obj, x, y, w, h);
-   else
- elm_interface_scrollable_content_region_show
-   (obj, x, y, w, h);
+   efl_ui_scrollable_scroll(obj, EINA_RECT(x, y, w, h), anim);
 }
 
 static void
 _drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord h, Eina_Bool anim)
 {
EFL_UI_PANEL_DATA_GET(obj, sd);
-   int x = 0, y = 0, cx, cy;
+   int x = 0, y = 0;
Eina_Bool horizontal = EINA_FALSE;
+   Eina_Position2D c;
 
elm_widget_tree_unfocusable_set(obj, EINA_TRUE);
switch (sd->orient)
@@ -343,17 +338,17 @@ _drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord 
h, Eina_Bool anim)
  break;
  }
 
-   elm_interface_scrollable_content_pos_get(obj, , );
+   c = efl_ui_scrollable_content_pos_get(obj);
 
-   if ((x == cx) && (y == cy))
+   if ((x == c.x) && (y == c.y))
  {
 if (!sd->freeze)
   {
  if (horizontal)
-   elm_interface_scrollable_movement_block_set
+   efl_ui_scrollable_movement_block_set
   (obj, EFL_UI_SCROLL_BLOCK_HORIZONTAL);
  else
-   elm_interface_scrollable_movement_block_set
+   efl_ui_scrollable_movement_block_set
   (obj, EFL_UI_SCROLL_BLOCK_VERTICAL);
  sd->freeze = EINA_TRUE;
  elm_layout_signal_emit(sd->scr_ly, "efl,state,content,hidden", 
"efl");
@@ -366,23 +361,23 @@ _drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord 
h, 

[EGIT] [core/efl] master 02/03: efl_ui_scroll_util: set drag_step of parent edje object

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 81a7b792359eb21f7318d0de7d52ac7c0a0f995c
Author: Yeongjong Lee 
Date:   Tue Aug 20 09:07:07 2019 -0400

efl_ui_scroll_util: set drag_step of parent edje object

Summary: Depends on D9649

Test Plan: elementary_test -to 'efl.ui.scroller'

Reviewers: eagleeye, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9650
---
 src/lib/elementary/efl_ui_scroll_util.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/elementary/efl_ui_scroll_util.c 
b/src/lib/elementary/efl_ui_scroll_util.c
index 7a2fecdde5..6468e21bcd 100644
--- a/src/lib/elementary/efl_ui_scroll_util.c
+++ b/src/lib/elementary/efl_ui_scroll_util.c
@@ -180,6 +180,16 @@ _scroll_connector_bar_pos_changed_cb(void *data, const 
Efl_Event *event EINA_UNU
ELM_WIDGET_DATA_GET_OR_RETURN(ctx->obj, wd);
 
double posx = 0.0, posy = 0.0;
+   Eina_Size2D cs;
+   Eina_Position2D step;
+
+   step = efl_ui_scrollable_step_size_get(ctx->smanager);
+   cs = efl_ui_scrollable_content_size_get(ctx->smanager);
+
+   edje_object_part_drag_step_set(wd->resize_obj, "efl.dragable.hbar",
+  (double)step.x / cs.w, 0.0);
+   edje_object_part_drag_step_set(wd->resize_obj, "efl.dragable.vbar",
+  0.0, (double)step.y / cs.h);
 
efl_ui_scrollbar_bar_position_get(ctx->smanager, , );
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.hbar", posx, 
0.0);

-- 




[EGIT] [core/efl] master 01/03: efl_ui_scroll_util: emit edc signal that fix scroll arrow visibility

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 8f32138f1f78315392ca71461a952e1cf8f39ca0
Author: Yeongjong Lee 
Date:   Tue Aug 20 09:07:02 2019 -0400

efl_ui_scroll_util: emit edc signal that fix scroll arrow visibility

Summary:
"efl,action,scroll" signal will update arrow state.

ref T8051

Test Plan: elementary_test -to 'efl.ui.scroller'

Reviewers: eagleeye, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8051

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

diff --git a/src/lib/elementary/efl_ui_scroll_util.c 
b/src/lib/elementary/efl_ui_scroll_util.c
index 4336678fc7..7a2fecdde5 100644
--- a/src/lib/elementary/efl_ui_scroll_util.c
+++ b/src/lib/elementary/efl_ui_scroll_util.c
@@ -170,6 +170,7 @@ _scroll_connector_bar_size_changed_cb(void *data, const 
Efl_Event *event EINA_UN
efl_ui_scrollbar_bar_size_get(ctx->smanager, , );
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.hbar", width, 
1.0);
edje_object_part_drag_size_set(wd->resize_obj, "efl.dragable.vbar", 1.0, 
height);
+   efl_layout_signal_emit(wd->resize_obj, "efl,action,scroll", "efl");
 }
 
 static void
@@ -183,6 +184,7 @@ _scroll_connector_bar_pos_changed_cb(void *data, const 
Efl_Event *event EINA_UNU
efl_ui_scrollbar_bar_position_get(ctx->smanager, , );
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.hbar", posx, 
0.0);
edje_object_part_drag_value_set(wd->resize_obj, "efl.dragable.vbar", 0.0, 
posy);
+   efl_layout_signal_emit(wd->resize_obj, "efl,action,scroll", "efl");
 }
 
 static void

-- 




[EGIT] [core/efl] master 01/01: efl_ui_table: respect col, row span in last_position calculation

2019-09-15 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit ae29408b86eaf8f6f324baff0312b336d56b1efc
Author: Yeongjong Lee 
Date:   Fri Sep 6 09:29:09 2019 +0200

efl_ui_table: respect col,row span in last_position calculation

Summary:
col,row spen is needed to get correct last_position.

Thanks to segfaultxavi for refporting.

ref T8182

Test Plan:

https://git.enlightenment.org/tools/examples.git/tree/reference/c/ui/src/ui_container.c

Check that long button and small button are not overlapped.

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8182

Differential Revision: https://phab.enlightenment.org/D9854
---
 src/lib/elementary/efl_ui_table.c | 31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index 2c24c73fb1..865fc76577 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -88,6 +88,7 @@ _efl_ui_table_last_position_get(Eo * obj, Efl_Ui_Table_Data 
*pd, int *last_col,
Table_Item *gi;
int col = -1, row  = -1;
int req_cols, req_rows;
+   int item_row, item_col;
 
if (!pd->linear_recalc)
  {
@@ -102,17 +103,20 @@ _efl_ui_table_last_position_get(Eo * obj, 
Efl_Ui_Table_Data *pd, int *last_col,
  {
 EINA_INLIST_REVERSE_FOREACH(EINA_INLIST_GET(pd->items), gi)
   {
- if ((gi->row < row) || (req_cols < gi->col) || (req_rows < 
gi->row))
+ item_row = gi->row + gi->row_span - 1;
+ item_col = gi->col + gi->col_span - 1;
+ if ((item_row < row) || (req_cols < item_col) ||
+ (req_rows < item_row))
continue;
 
- if (gi->row > row)
+ if (item_row > row)
{
-  row = gi->row;
-  col = gi->col;
+  row = item_row;
+  col = item_col;
}
- else if (gi->col > col)
+ else if (item_col > col)
{
-  col = gi->col;
+  col = item_col;
}
   }
  }
@@ -120,17 +124,20 @@ _efl_ui_table_last_position_get(Eo * obj, 
Efl_Ui_Table_Data *pd, int *last_col,
  {
 EINA_INLIST_REVERSE_FOREACH(EINA_INLIST_GET(pd->items), gi)
   {
- if ((gi->col < col) || (req_cols < gi->col) || (req_rows < 
gi->row))
+ item_row = gi->row + gi->row_span - 1;
+ item_col = gi->col + gi->col_span - 1;
+ if ((item_col < col) || (req_cols < item_col) ||
+ (req_rows < item_row))
continue;
 
- if (gi->col > col)
+ if (item_col > col)
{
-  col = gi->col;
-  row = gi->row;
+  col = item_col;
+  row = item_row;
}
- else if (gi->row > row)
+ else if (item_row > row)
{
-  row = gi->row;
+  row = item_row;
}
   }
  }

-- 




[EGIT] [core/efl] master 01/01: efl_ui_widget: make Efl_Ui_Scrollable_On_Show_Region legacy

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 37a63fb1ee30e453d7eb1b513be31c9f736f3bf9
Author: Yeongjong Lee 
Date:   Tue Sep 10 09:09:00 2019 -0400

efl_ui_widget: make Efl_Ui_Scrollable_On_Show_Region legacy

Summary:
`Efl_Ui_Scrollable_On_Show_Region` is only used for legacy EAPI. it moved to
elm_widget.h from eo file. also, it renamed `Elm_Widget_On_Show_Region_Cb`.

Reviewers: Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9896
---
 src/lib/elementary/efl_ui_widget.c   | 2 +-
 src/lib/elementary/efl_ui_widget.eo  | 8 
 src/lib/elementary/efl_ui_widget_eo.legacy.h | 6 --
 src/lib/elementary/elm_widget.h  | 6 --
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/src/lib/elementary/efl_ui_widget.c 
b/src/lib/elementary/efl_ui_widget.c
index 5d089bd775..5a55e0aca2 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -5160,7 +5160,7 @@ _efl_ui_widget_efl_ui_focus_object_focus_set(Eo *obj, 
Elm_Widget_Smart_Data *pd,
 /* Legacy APIs */
 
 EAPI void
-elm_widget_on_show_region_hook_set(Eo *obj, void *data, 
Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb func_free_cb)
+elm_widget_on_show_region_hook_set(Eo *obj, void *data, 
Elm_Widget_On_Show_Region_Cb func, Eina_Free_Cb func_free_cb)
 {
ELM_WIDGET_DATA_GET(obj, sd);
 
diff --git a/src/lib/elementary/efl_ui_widget.eo 
b/src/lib/elementary/efl_ui_widget.eo
index 29aa9e4bc6..3c892dac04 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -1,11 +1,3 @@
-function @beta Efl.Ui.Scrollable_On_Show_Region {
-   [[Function pointer for on show region hook]]
-   params {
-  @in obj: Efl.Canvas.Object; [[Canvas object]]
-  @in region: Eina.Rect; [[Showed region]]
-   }
-};
-
 struct Efl.Ui.Widget_Focus_State {
[[All relevant fields needed for the current state of focus registration
  @since 1.22
diff --git a/src/lib/elementary/efl_ui_widget_eo.legacy.h 
b/src/lib/elementary/efl_ui_widget_eo.legacy.h
index 70ae62e88b..e4fb297628 100644
--- a/src/lib/elementary/efl_ui_widget_eo.legacy.h
+++ b/src/lib/elementary/efl_ui_widget_eo.legacy.h
@@ -11,12 +11,6 @@ typedef Eo Efl_Ui_Widget;
 #ifndef _EFL_UI_WIDGET_EO_TYPES
 #define _EFL_UI_WIDGET_EO_TYPES
 
-/** Function pointer for on show region hook
- *
- * @ingroup Efl_Ui
- */
-typedef void (*Efl_Ui_Scrollable_On_Show_Region)(void *data, Efl_Canvas_Object 
*obj, Eina_Rect region);
-
 /** All relevant fields needed for the current state of focus registeration
  *
  * @ingroup Efl_Ui
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index c2a9474d17..cda2196067 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -303,6 +303,8 @@ typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void 
*data);
 typedef void  (*Elm_Widget_Item_Signal_Cb)(void *data, 
Elm_Object_Item *item, const char *emission, const char *source);
 
 typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
+typedef void (*Elm_Widget_On_Show_Region_Cb)(void *data, Evas_Object *obj, 
Eina_Rect region);
+
 
 #include "efl_ui_widget.eo.h"
 #include "elm_widget_item_container_eo.h"
@@ -359,7 +361,7 @@ typedef struct _Elm_Widget_Smart_Data
 * handling the request of showing a specific region from an inner
 * widget (mainly issued by entries, on cursor moving) */
void *on_show_region_data;
-   Efl_Ui_Scrollable_On_Show_Region on_show_region;
+   Elm_Widget_On_Show_Region_Cb  on_show_region;
Eina_Free_Cb  on_show_region_data_free;
 
Elm_Focus_Move_Policy focus_move_policy;
@@ -587,7 +589,7 @@ EAPI Eina_Boolelm_widget_api_check(int ver);
 EAPI Eina_Boolelm_widget_access(Evas_Object *obj, Eina_Bool is_access);
 EAPI Eina_Error  elm_widget_theme(Evas_Object *obj);
 EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme 
*th, Eina_Bool force);
-EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, 
void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free);
+EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, 
void *data, Elm_Widget_On_Show_Region_Cb func, Eina_Free_Cb data_free);
 EAPI Eina_Boolelm_widget_sub_object_parent_add(Evas_Object *sobj);
 EAPI Eina_Boolelm_widget_sub_object_add(Evas_Object *obj, Evas_Object 
*sobj);
 EAPI Eina_Boolelm_widget_sub_object_del(Evas_Object *obj, Evas_Object 
*sobj);

-- 




[EGIT] [core/efl] master 01/01: efl_mono: update docs of CreateWrapperFor

2019-09-15 Thread Yeongjong Lee
xartigas pushed a commit to branch master.

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

commit 41aa680c859a306dd13ff0f7f9a76aa7a046aa6a
Author: Yeongjong Lee 
Date:   Fri Jul 26 15:00:17 2019 +0200

efl_mono: update docs of CreateWrapperFor

Reviewers: lauromoura, felipealmeida, segfaultxavi, vitor.sousa

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9084
---
 src/bindings/mono/eo_mono/iwrapper.cs | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index 09c82a7e81..6b7719e61f 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -569,11 +569,8 @@ public class Globals
 
 /// Creates a new wrapper for the given Eo id.
 ///
-/// If the Eo was created from a non-generated class (i.e. C#-pure 
class), it returns
-/// the C# instance handle stored in the Eo's private data.
-///
-/// For generated-class Eo instance, we use reflection to get the 
correct C# type to re-wrap
-/// it.
+/// If the Eo have a WrapperSupervisor, it returns the C# instance 
handle stored in its
+/// WrapperSupervisor. otherwise, we use reflection to get the correct C# 
type to re-wrap it.
 /// 
 ///
 /// The Eo id to be wrapped.

-- 




[EGIT] [core/efl] master 01/01: efl_canvas_animation_player: delete previous target event callback

2019-09-15 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit 48851138d7a88600638b0fe9be7d04ce7095c4a9
Author: Yeongjong Lee 
Date:   Mon Sep 2 20:55:51 2019 +0900

efl_canvas_animation_player: delete previous target event callback

Summary:
When target is changed, its event callback related `animation_player` 
should be
deleted.

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9814
---
 src/lib/evas/canvas/efl_canvas_animation_player.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c 
b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 8466067a12..aa89c367ff 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -12,6 +12,12 @@ _efl_canvas_animation_player_target_set(Eo *eo_obj 
EINA_UNUSED,
  Efl_Canvas_Animation_Player_Data *pd,
  Efl_Canvas_Object *target)
 {
+   if (pd->target == target)
+ return;
+
+   if (pd->target)
+ efl_event_callback_del(pd->target, EFL_EVENT_DEL, _target_del_cb, pd);
+
efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd);
 
pd->target = target;

-- 




[EGIT] [core/efl] master 02/02: efl_input_hold: replace hold property name with input_hold

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit 97510fc5714e899f0681b79acb0cead7527bf42b
Author: Yeongjong Lee 
Date:   Fri Aug 2 04:43:14 2019 +

efl_input_hold: replace hold property name with input_hold

Sorry to touch stable eo classes. there is name conflict issue between 
class and
property when binding language is generated from eo. for example in C#, 
compiler
error occurs.

```
src/bindings/mono/efl_input_hold.eo.cs(166,17): error CS0542:
`Efl.Input.Hold.Hold': member names cannot be the same as their enclosing 
type
```

This patch changes Efl.Input.Hold.GetHold/SetHold to
Efl.Input.Hold.GetInputHold/SetInputHold and generates 
Efl.Input.Hold.InputHold
property.

Note that CAPI is not changed.

ref T8093

Reviewed-by: Xavi Artigas 
Reviewed-by: Mike Blumenkrantz 
Reviewed-by: Lauro Neto 
Differential Revision: https://phab.enlightenment.org/D9484
---
 src/bin/eolian_mono/eolian/mono/blacklist.hh | 3 +--
 src/lib/evas/canvas/efl_input_hold.c | 4 ++--
 src/lib/evas/canvas/efl_input_hold.eo| 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh 
b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 733592e239..5099013396 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -114,8 +114,7 @@ inline bool is_alias_blacklisted(attributes::alias_def 
const& alias)
 
 inline bool is_property_blacklisted(std::string const& name)
 {
-return name == "Efl.Input.Hold.Hold"
-|| name == "Efl.IText.Text";
+return name == "Efl.IText.Text";
 }
 
 template
diff --git a/src/lib/evas/canvas/efl_input_hold.c 
b/src/lib/evas/canvas/efl_input_hold.c
index 0713ca6e2a..c23f043ad1 100644
--- a/src/lib/evas/canvas/efl_input_hold.c
+++ b/src/lib/evas/canvas/efl_input_hold.c
@@ -13,13 +13,13 @@
 #define MY_CLASS EFL_INPUT_HOLD_CLASS
 
 EOLIAN static void
-_efl_input_hold_hold_set(Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd, 
Eina_Bool val)
+_efl_input_hold_input_hold_set(Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd, 
Eina_Bool val)
 {
pd->hold = !!val;
 }
 
 EOLIAN static Eina_Bool
-_efl_input_hold_hold_get(const Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd)
+_efl_input_hold_input_hold_get(const Eo *obj EINA_UNUSED, Efl_Input_Hold_Data 
*pd)
 {
return pd->hold;
 }
diff --git a/src/lib/evas/canvas/efl_input_hold.eo 
b/src/lib/evas/canvas/efl_input_hold.eo
index 9649d75cb6..9160f2d306 100644
--- a/src/lib/evas/canvas/efl_input_hold.eo
+++ b/src/lib/evas/canvas/efl_input_hold.eo
@@ -2,7 +2,7 @@ class Efl.Input.Hold extends Efl.Object implements 
Efl.Input.Event
 {
[[Event data sent when inputs are put on hold or resumed.]]
methods {
-  @property hold {
+  @property input_hold {
  [[Property to show if inputs are now on hold.]]
  values {
 val: bool; [[$true if inputs are on hold, $false otherwise]]

-- 




[EGIT] [core/efl] master 01/01: efl_ui: remove duplicated hint_min_set code

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit 51a644d96650d08f8ffa8e633277d60e9536f08f
Author: Yeongjong Lee 
Date:   Wed Aug 14 09:56:42 2019 -0400

efl_ui: remove duplicated hint_min_set code

Summary:
evas_object_size_hint_min_set call efl_gfx_hint_size_restricted_min_set
internally.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9567
---
 src/lib/elementary/efl_ui_flip.c   |  5 +
 src/lib/elementary/efl_ui_frame.c  |  5 +
 src/lib/elementary/efl_ui_image.c  |  5 +
 src/lib/elementary/efl_ui_image_zoomable.c | 10 ++
 4 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c
index d6e9152146..e24583796d 100644
--- a/src/lib/elementary/efl_ui_flip.c
+++ b/src/lib/elementary/efl_ui_flip.c
@@ -93,10 +93,7 @@ _sizing_eval(Evas_Object *obj)
 
elm_coords_finger_size_adjust(fingx, , fingy, );
 
-   if (elm_widget_is_legacy(obj))
- evas_object_size_hint_min_set(obj, minw, minh);
-   else
- efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
evas_object_size_hint_max_set(obj, maxw, maxh);
 }
 
diff --git a/src/lib/elementary/efl_ui_frame.c 
b/src/lib/elementary/efl_ui_frame.c
index 1f167fb495..5680fdf901 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -38,10 +38,7 @@ _sizing_eval(Evas_Object *obj,
evas_object_size_hint_min_get(obj, , );
if ((minw == cminw) && (minh == cminh)) return;
 
-   if (elm_widget_is_legacy(obj))
- evas_object_size_hint_min_set(obj, minw, minh);
-   else
- efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
evas_object_size_hint_max_set(obj, -1, -1);
 }
 
diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index 68403700be..c07f2b2ca4 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -802,10 +802,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
   }
  }
 
-   if (elm_widget_is_legacy(obj))
- evas_object_size_hint_min_set(obj, minw, minh);
-   else
- efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
evas_object_size_hint_max_set(obj, maxw, maxh);
 
if (sd->img)
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c 
b/src/lib/elementary/efl_ui_image_zoomable.c
index 4b76f6bde4..64eda7a52d 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -116,10 +116,7 @@ _sizing_eval(Evas_Object *obj)
 
evas_object_size_hint_max_get
  (wd->resize_obj, , );
-   if (elm_widget_is_legacy(obj))
- evas_object_size_hint_min_set(obj, minw, minh);
-   else
- efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
evas_object_size_hint_max_set(obj, maxw, maxh);
 }
 
@@ -1864,10 +1861,7 @@ _efl_ui_image_zoomable_efl_canvas_group_group_add(Eo 
*obj, Efl_Ui_Image_Zoomable
  (priv->img, EVAS_CALLBACK_IMAGE_PRELOADED, _main_img_preloaded_cb, obj);
 
edje_object_size_min_calc(edje, , );
-   if (elm_widget_is_legacy(obj))
- evas_object_size_hint_min_set(obj, minw, minh);
-   else
- efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
+   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(minw, minh));
 
_efl_ui_image_zoomable_edje_object_attach(obj);
 

-- 




[EGIT] [core/efl] master 03/03: efl_input_key: replace key property name with key_sym

2019-09-15 Thread Yeongjong Lee
zmike pushed a commit to branch master.

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

commit f2b1f312a97a6ef3f909109161db25d1d3b3f1d5
Author: Yeongjong Lee 
Date:   Mon Aug 5 08:48:04 2019 -0400

efl_input_key: replace key property name with key_sym

Summary:
Sorry to touch stable eo classes. there is name conflict issue between 
class and
property when binding language is generated from eo. for example in C#, 
compiler
error occurs.

```
src/bindings/mono/efl_input_key.eo.cs(272,26): error CS0542:
`Efl.Input.Key.Key': member names cannot be the same as their enclosing type
```

This patch changes Efl.Input.Key.GetKey/SetKey method to
Efl.Input.Key.GetKeySym/SetKeySym and generates Efl.Input.Key.KeySym
property.

Note that CAPI is not changed.

ref T8093

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, woohyun, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8093

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

zmike note: this class was not released at the point of this patch, the 
class
was only recently marked as stable
---
 src/bin/elementary/test_events.c |  2 +-
 src/bin/eolian_mono/eolian/mono/blacklist.hh | 13 ++---
 src/lib/elementary/elc_fileselector.c|  2 +-
 src/lib/elementary/elm_code_widget.c |  2 +-
 src/lib/evas/canvas/efl_input_key.c  |  4 ++--
 src/lib/evas/canvas/efl_input_key.eo |  2 +-
 src/tests/elementary/efl_ui_test_win.c   |  2 +-
 7 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/bin/elementary/test_events.c b/src/bin/elementary/test_events.c
index 4b36bf4b35..e1438db3cb 100644
--- a/src/bin/elementary/test_events.c
+++ b/src/bin/elementary/test_events.c
@@ -56,7 +56,7 @@ _key_down(void *data, const Efl_Event *ev)
// 2. ecore_evas -> evas -> focused obj (elm_win) -> here
 
sprintf(str, "key=%s keyname=%s string=%s compose=%s",
-   efl_input_key_get(ev->info),
+   efl_input_key_sym_get(ev->info),
efl_input_key_name_get(ev->info),
efl_input_key_string_get(ev->info),
efl_input_key_compose_string_get(ev->info));
diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh 
b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 02cda670d9..733592e239 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -114,8 +114,7 @@ inline bool is_alias_blacklisted(attributes::alias_def 
const& alias)
 
 inline bool is_property_blacklisted(std::string const& name)
 {
-return name == "Efl.Input.Key.Key"
-|| name == "Efl.Input.Hold.Hold"
+return name == "Efl.Input.Hold.Hold"
 || name == "Efl.IText.Text";
 }
 
@@ -135,17 +134,9 @@ inline bool 
is_property_blacklisted(attributes::property_def const& property, Co
 
 template
 inline bool is_property_blacklisted(attributes::property_def const& property,
-attributes::klass_def const& 
implementing_class,
+EINA_UNUSED attributes::klass_def const& 
implementing_class,
 Context const& context)
 {
-   std::string property_name = name_helpers::property_managed_name(property);
-   std::string klass_name = 
name_helpers::klass_concrete_or_interface_name(implementing_class);
-
-   // This property wrapper is invalidated as it would clash with the 
implementing
-   // class constructor. CS
-   if (property_name == klass_name)
- return true;
-
return is_property_blacklisted(property, context);
 }
 
diff --git a/src/lib/elementary/elc_fileselector.c 
b/src/lib/elementary/elc_fileselector.c
index a3ef342e61..39f1a7cd3d 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -1537,7 +1537,7 @@ _files_key_down(void *data, const Efl_Event *event)
 
  if (!searchbar) return;
 
- key = efl_input_key_get(ev);
+ key = efl_input_key_sym_get(ev);
  string = efl_input_key_string_get(ev);
  if (string && *(string) && (isalpha(*string) || isdigit(*string)))
{
diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index 4a953e2130..17ee786791 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1891,7 +1891,7 @@ 
_elm_code_widget_efl_ui_widget_widget_input_event_handler(Eo *obj EINA_UNUSED, E
if (eo_event->desc != EFL_EVENT_KEY_DOWN) return EINA_FALSE;
 
// FIXME: This should use key bindings and the standard implementation!
-   if (eina_streq(efl_input_key_get(e

[EGIT] [core/efl] master 01/01: efl_ui_collection: use length value for even parameter of eina_spans_intersect

2019-09-15 Thread Yeongjong Lee
bu5hm4n pushed a commit to branch master.

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

commit 38cec03d6746cf14c428df830ad500f857e0e496
Author: Yeongjong Lee 
Date:   Wed Aug 21 02:52:06 2019 +

efl_ui_collection: use length value for even parameter of 
eina_spans_intersect

Parameter of `eina_spans_intersect` are pairs of point and length.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D9655
---
 src/lib/elementary/efl_ui_collection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_collection.c 
b/src/lib/elementary/efl_ui_collection.c
index a7f42ef3a8..c7101fdbd5 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -877,8 +877,8 @@ _efl_ui_collection_efl_ui_focus_manager_move(Eo *obj, 
Efl_Ui_Collection_Data *pd
 Eina_Rect element;
 element = efl_gfx_entity_geometry_get(focus);
 viewport = efl_gfx_entity_geometry_get(obj);
-if (!eina_spans_intersect(element.x, element.x+element.w, viewport.x, 
viewport.x+viewport.w) &&
-!eina_spans_intersect(element.y, element.y+element.h, viewport.y, 
viewport.y+viewport.y))
+if (!eina_spans_intersect(element.x, element.w, viewport.x, 
viewport.w) &&
+!eina_spans_intersect(element.y, element.h, viewport.y, 
viewport.h))
   {
  efl_ui_scrollable_scroll(obj, element, EINA_TRUE);
  return focus;

-- 




[EGIT] [core/efl] efl-1.22 18/119: navigation_layout: set efl.content y-axis align to 0.0

2019-05-30 Thread Yeongjong Lee
zmike pushed a commit to branch efl-1.22.

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

commit b21263b0fe8f2e756baa77b185a57e938599ccaa
Author: Yeongjong Lee 
Date:   Thu May 9 15:42:13 2019 +0900

navigation_layout: set efl.content y-axis align to 0.0

Summary:
If `efl.content` min size is greater than edc area size, `efl.bar` and
`efl.content` are overlapped because default y-align is 0.5.

This patch avoid it.

Test Plan:
Sample code:
```
// gcc -o efl_ui_stack_example efl_ui_stack_example.c `pkg-config --cflags 
--libs elementary`

EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
   Eo *win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get());

   Eo *stack = efl_add(EFL_UI_STACK_CLASS, win);
   efl_content_set(win, stack);

   Eo *nl = efl_add(EFL_UI_NAVIGATION_LAYOUT_CLASS, stack,
efl_ui_stack_push(stack, efl_added));

   Eo *bn = efl_add(EFL_UI_NAVIGATION_BAR_CLASS, stack);
   efl_text_set(bn, "Title Text");
   efl_ui_navigation_layout_bar_set(nl, bn);

   Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, nl,
 efl_text_set(efl_added, "Button 1"),
 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(50, 
80)),
 efl_content_set(nl, efl_added));

   efl_gfx_entity_size_set(win, EINA_SIZE2D(100, 80));
}
EFL_MAIN()
```

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8868
---
 data/elementary/themes/edc/efl/navigation_layout.edc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/data/elementary/themes/edc/efl/navigation_layout.edc 
b/data/elementary/themes/edc/efl/navigation_layout.edc
index 4319453b96..9947d6d313 100644
--- a/data/elementary/themes/edc/efl/navigation_layout.edc
+++ b/data/elementary/themes/edc/efl/navigation_layout.edc
@@ -21,6 +21,7 @@ group { "efl/navigation_layout";
relative: 0.0 1.0;
 }
 rel2.to_x: "base";
+align: 0.5 0.0;
  }
   }
}

-- 




[EGIT] [core/efl] efl-1.22 62/119: efl_ui_relative_layout: prevent infinite loop in chain calculation

2019-05-30 Thread Yeongjong Lee
zmike pushed a commit to branch efl-1.22.

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

commit ce49884b1601cabef5d338e891ee20d5f256cf7c
Author: Yeongjong Lee 
Date:   Wed May 29 17:24:30 2019 +0900

efl_ui_relative_layout: prevent infinite loop in chain calculation

Test Plan:
test code
```
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Eo *win, *layout, *btn1, *btn2, *btn3;

   win =  efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get());
   layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win,
efl_content_set(win, efl_added));

   btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout);
   btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout);

   efl_ui_relative_layout_relation_right_set(layout, btn1, btn2, 0.0);
   efl_ui_relative_layout_relation_right_set(layout, btn2, btn1, 0.0);

   efl_ui_relative_layout_relation_left_set(layout, btn2, btn1, 1.0);
   efl_ui_relative_layout_relation_left_set(layout, btn1, btn2, 1.0);

   elm_run();
   return 0;
}
ELM_MAIN()
```

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

diff --git a/src/lib/elementary/efl_ui_relative_layout.c 
b/src/lib/elementary/efl_ui_relative_layout.c
index 491c52f8af..9845f00d48 100644
--- a/src/lib/elementary/efl_ui_relative_layout.c
+++ b/src/lib/elementary/efl_ui_relative_layout.c
@@ -217,7 +217,15 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, 
Eina_Bool axis)
// find head
head = child;
while (head == head->calc.to[START]->calc.to[END])
- head = head->calc.to[START];
+ {
+head = head->calc.to[START];
+if (head == child)
+  {
+ ERR("%c-axis circular dependency when calculating \"%s\"(%p).",
+ axis ? 'Y' : 'X', efl_class_name_get(child->obj), child->obj);
+ return EINA_TRUE;
+  }
+ }
 
//calculate weight_sum
aspect_type = !axis ? EFL_GFX_HINT_ASPECT_VERTICAL : 
EFL_GFX_HINT_ASPECT_HORIZONTAL;

-- 




[EGIT] [core/efl] master 02/02: efl_ui_relative_layout: prevent infinite loop in chain calculation

2019-05-29 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit 56ab05660e62b732434c82b4595d507adac5f823
Author: Yeongjong Lee 
Date:   Wed May 29 17:24:30 2019 +0900

efl_ui_relative_layout: prevent infinite loop in chain calculation

Test Plan:
test code
```
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Eo *win, *layout, *btn1, *btn2, *btn3;

   win =  efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get());
   layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win,
efl_content_set(win, efl_added));

   btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout);
   btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout);

   efl_ui_relative_layout_relation_right_set(layout, btn1, btn2, 0.0);
   efl_ui_relative_layout_relation_right_set(layout, btn2, btn1, 0.0);

   efl_ui_relative_layout_relation_left_set(layout, btn2, btn1, 1.0);
   efl_ui_relative_layout_relation_left_set(layout, btn1, btn2, 1.0);

   elm_run();
   return 0;
}
ELM_MAIN()
```

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

diff --git a/src/lib/elementary/efl_ui_relative_layout.c 
b/src/lib/elementary/efl_ui_relative_layout.c
index a0814cebad..7e8b6f3c01 100644
--- a/src/lib/elementary/efl_ui_relative_layout.c
+++ b/src/lib/elementary/efl_ui_relative_layout.c
@@ -218,7 +218,15 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, 
Eina_Bool axis)
// find head
head = child;
while (head == head->calc.to[START]->calc.to[END])
- head = head->calc.to[START];
+ {
+head = head->calc.to[START];
+if (head == child)
+  {
+ ERR("%c-axis circular dependency when calculating \"%s\"(%p).",
+ axis ? 'Y' : 'X', efl_class_name_get(child->obj), child->obj);
+ return EINA_TRUE;
+  }
+ }
 
//calculate weight_sum
aspect_type = !axis ? EFL_GFX_HINT_ASPECT_VERTICAL : 
EFL_GFX_HINT_ASPECT_HORIZONTAL;

-- 




[EGIT] [core/efl] master 01/02: efl_ui_relative_layout: allow to respect the min size of its child

2019-05-29 Thread Yeongjong Lee
jaehyun pushed a commit to branch master.

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

commit e3a791c4b176b7c396b1f4c56cd7a1ad54f1b745
Author: Yeongjong Lee 
Date:   Wed May 29 17:24:21 2019 +0900

efl_ui_relative_layout: allow to respect the min size of its child

Summary: It will have the same policy as the Efl.Ui.Box, Table.

Test Plan: elementary_test -to 'efl.ui.relative_layout'

Reviewers: Jaehyun_Cho, herb

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9029
---
 src/lib/elementary/efl_ui_relative_layout.c| 78 --
 .../elementary/efl_ui_relative_layout_private.h| 28 
 2 files changed, 100 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_relative_layout.c 
b/src/lib/elementary/efl_ui_relative_layout.c
index 530179cab4..a0814cebad 100644
--- a/src/lib/elementary/efl_ui_relative_layout.c
+++ b/src/lib/elementary/efl_ui_relative_layout.c
@@ -177,6 +177,11 @@ _child_aspect_calc(Efl_Ui_Relative_Layout_Child *child, 
Eina_Bool axis)
 calc->want[0].length = calc->want[1].length * calc->aspect[0] / 
calc->aspect[1];
  }
//calculate min size
+   if (calc->aspect[1] > calc->aspect[0])
+ calc->min[1] = calc->min[0] * calc->aspect[1] / calc->aspect[0];
+   else
+ calc->min[0] = calc->min[1] * calc->aspect[0] / calc->aspect[1];
+
if (calc->want[0].length < calc->min[0])
  {
 calc->want[0].length = calc->min[0];
@@ -298,8 +303,17 @@ _child_chain_calc(Efl_Ui_Relative_Layout_Child *child, 
Eina_Bool axis)
 cur_pos += o->calc.space[axis].length;
 o->calc.space[axis].length -= o->calc.margin[START] + 
o->calc.margin[END];
 o->calc.chain_state[axis] = RELATIVE_CALC_DONE;
+child->calc.m0[axis] += o->calc.min[axis];
  }
 
+   child->calc.mi[axis] = head->rel[START].relative * 
(head->calc.to[START]->calc.mj[axis] -
+head->calc.to[START]->calc.mi[axis]) + 
head->calc.to[START]->calc.mi[axis];
+   child->calc.mj[axis] = tail->rel[END].relative * 
(tail->calc.to[END]->calc.mj[axis] -
+tail->calc.to[END]->calc.mi[axis]) + 
tail->calc.to[END]->calc.mi[axis];
+   child->calc.m0[axis] += -child->calc.min[axis] +
+(head->calc.to[START]->calc.m0[axis] * head->rel[START].relative) +
+(tail->calc.to[END]->calc.m0[axis] * (1 - 
tail->rel[END].relative));
+
return EINA_TRUE;
 }
 
@@ -355,6 +369,32 @@ _child_calc(Efl_Ui_Relative_Layout_Child *child, Eina_Bool 
axis)
   (calc->space[axis].length - calc->want[axis].length) * calc->align[axis];
 
child->calc.state[axis] = RELATIVE_CALC_DONE;
+   if (child->calc.chain_state[axis] == RELATIVE_CALC_DONE)
+ return;
+
+   //calculate relative layout min
+   calc->mi[axis] = child->rel[START].relative * 
(calc->to[START]->calc.mj[axis] -
+calc->to[START]->calc.mi[axis]) + 
calc->to[START]->calc.mi[axis];
+   calc->mj[axis] = child->rel[END].relative * (calc->to[END]->calc.mj[axis] -
+calc->to[END]->calc.mi[axis]) + 
calc->to[END]->calc.mi[axis];
+   calc->m0[axis] = calc->to[START]->calc.m0[axis] * 
child->rel[START].relative;
+
+   if ((calc->to[START] == calc->to[END]) &&
+   EINA_DBL_EQ(child->rel[START].relative, child->rel[END].relative))
+ {
+double r, a; // relative, align
+r = calc->mi[axis] +
+   (child->rel[START].relative * (calc->mj[axis] - calc->mi[axis]));
+a = calc->align[axis];
+calc->m0[axis] += (calc->min[axis] + calc->margin[START] + 
calc->margin[END]) *
+   ((EINA_DBL_EQ(r, 0.0) || (!EINA_DBL_EQ(r, 1.0) && (a < r))) ?
+((1 - a) / (1 - r)) : (a / r));
+ }
+   else
+ {
+calc->m0[axis] += calc->to[END]->calc.m0[axis] * (1 - 
child->rel[END].relative);
+ }
+
 }
 
 static void
@@ -386,18 +426,36 @@ _hash_clear_cb(void *data)
 
 static Eina_Bool
 _hash_child_calc_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key 
EINA_UNUSED,
-void *data, void *fdata EINA_UNUSED)
+void *data, void *fdata)
 {
Efl_Ui_Relative_Layout_Child *child = data;
+   Efl_Ui_Relative_Layout_Calc *calc = &(child->calc);
+   Efl_Ui_Relative_Layout_Data *pd = fdata;
Eina_Rect want;
+   int axis, layout_min;
+   double min_len;
 
_child_calc(child, 0);
_child_calc(child, 1);
 
-   want.x = child->calc.want[0].position;
-   want.w = child->calc.want[0].length;
-   want.y = child-&g

Re: [E-devel] [EGIT] [core/efl] master 01/01: elm_dbus_menu: add missing const for Eina_List

2018-04-17 Thread YEONGJONG LEE
Hello,

I'm sure this is right.
See https://phab.enlightenment.org/D5953

Sorry, i forgot to revise commit title :(

Regards
Yeongjong Lee

 원본 이메일 
보낸 사람: Stefan Schmidt <ste...@osg.samsung.com>
날짜: 18/4/17 오후 3:11 (GMT+09:00)
받은 사람: Enlightenment developer list <
enlightenment-devel@lists.sourceforge.net>, YeongJong Lee <
yj34@samsung.com>
제목: Re: [E-devel] [EGIT] [core/efl] master 01/01: elm_dbus_menu: add
missing const for Eina_List

Hello.


On 04/17/2018 04:10 AM, YeongJong Lee wrote:
> sanghyeonlee pushed a commit to branch master.
>
>
http://git.enlightenment.org/core/efl.git/commit/?id=c943c4a2ffd51d9c7a1f4dd95f99721b1cb9148e
>
> commit c943c4a2ffd51d9c7a1f4dd95f99721b1cb9148e
> Author: YeongJong Lee <yj34@samsung.com>
> Date:   Tue Apr 17 11:08:25 2018 +0900
>
> elm_dbus_menu: add missing const for Eina_List
>
> Summary:
> This fixes following warning
>
> ../src/lib/eina/eina_list.h:1421:10: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> Test Plan: make
>
> Reviewers: SanghyeonLee
>
> Reviewed By: SanghyeonLee
>
> Subscribers: cedric
>
> Differential Revision: https://phab.enlightenment.org/D5952
> ---
>  src/lib/elementary/elm_dbus_menu.c | 7 ++-
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/src/lib/elementary/elm_dbus_menu.c
b/src/lib/elementary/elm_dbus_menu.c
> index 0bf096347d..73b8a7bf0b 100644
> --- a/src/lib/elementary/elm_dbus_menu.c
> +++ b/src/lib/elementary/elm_dbus_menu.c
> @@ -333,8 +333,7 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu,
Eina_List *property_list,
>  {
> char *property;
> Eldbus_Message_Iter *layout, *array, *pair, *variant;
> -   Eina_List *l;
> -   const Eina_List *it;
> +   const Eina_List *l, *it;
> Elm_Object_Item *obj_item;
>
> layout = eldbus_message_iter_container_new(iter, 'r', NULL);
> @@ -422,8 +421,7 @@ _elm_dbus_menu_add(Eo *menu)
>  {
> Elm_DBus_Menu *dbus_menu;
> Elm_Object_Item *obj_item;
> -   const Eina_List *it;
> -   Eina_List *l;
> +   const Eina_List *it, *l;
>
> ELM_MENU_CHECK(menu) NULL;
>
> @@ -457,7 +455,6 @@ _elm_dbus_menu_add(Eo *menu)
> return dbus_menu;
>
>  error_hash:
> -   eina_iterator_free(it);
> eina_hash_free(dbus_menu->elements);
>  error_menu:
> free(dbus_menu);
>

You commit message does only mention adding the const qualifier but nothing
about this iterator free you remove.

Are you sure this is right or has this been committed accidentally?

regards
Stefan Schmidt



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 원본 이메일 보낸 사람: Stefan Schmidt <ste...@osg.samsung.com> 날짜:
18/4/17  오후 3:11  (GMT+09:00) 받은 사람: Enlightenment developer list <
enlightenment-devel@lists.sourceforge.net>, YeongJong Lee <
yj34@samsung.com> 제목: Re: [E-devel] [EGIT] [core/efl] master 01/01:
elm_dbus_menu: add missing const for Eina_List
Hello.


On 04/17/2018 04:10 AM, YeongJong Lee wrote:
> sanghyeonlee pushed a commit to branch master.
>
>
http://git.enlightenment.org/core/efl.git/commit/?id=c943c4a2ffd51d9c7a1f4dd95f99721b1cb9148e
>
> commit c943c4a2ffd51d9c7a1f4dd95f99721b1cb9148e
> Author: YeongJong Lee <yj34@samsung.com>
> Date:   Tue Apr 17 11:08:25 2018 +0900
>
> elm_dbus_menu: add missing const for Eina_List
>
> Summary:
> This fixes following warning
>
> ../src/lib/eina/eina_list.h:1421:10: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>
> Test Plan: make
>
> Reviewers: SanghyeonLee
>
> Reviewed By: SanghyeonLee
>
> Subscribers: cedric
>
> Differential Revision: https://phab.enlightenment.org/D5952
> ---
>  src/lib/elementary/elm_dbus_menu.c | 7 ++-
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/src/lib/elementary/elm_dbus_menu.c
b/src/lib/elementary/elm_dbus_menu.c
> index 0bf096347d..73b8a7bf0b 100644
> --- a/src/lib/elementary/elm_dbus_menu.c
> +++ b/src/lib/elementary/elm_dbus_menu.c
> @@ -333,8 +333,7 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu,
Eina_List *property_list,
>  {
> char *property;
> Eldbus_Message_Iter *layout, *array, *pair, *variant;
> -   Eina_List *l;
> -   const Eina_List *it;
> +   const Eina_List *l, *it;
> 

[EGIT] [core/efl] master 01/06: elementary: fix unintentional visibility of elm_hover in combobox constructor

2017-10-06 Thread Yeongjong Lee
cedric pushed a commit to branch master.

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

commit bc2fe6bb778b559e6c88f836d8cbdfb631b193b4
Author: Yeongjong Lee <clean...@naver.com>
Date:   Fri Oct 6 09:46:21 2017 -0700

elementary: fix unintentional visibility of elm_hover in combobox 
constructor

Summary:
since fd9cf1d3b628f70d66ec85a4f2433c675d9ad243, All Eo canvas objects remain
visible by default.
but elm_hover doesn't want to be shown in combobox constructor.
showing elm_hover in constructor occurs unexpected behavior.
this fixes that bug.

Test Plan:
1. elementary_test - Combobox
2. Click the combobox to Expand the list.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: cedric

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

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

diff --git a/src/lib/elementary/elc_combobox.c 
b/src/lib/elementary/elc_combobox.c
index e11feb208d..9372ffe34f 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -358,7 +358,8 @@ _elm_combobox_efl_object_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
 
//hover
sd->hover = efl_add(ELM_HOVER_CLASS, sd->hover_parent,
-   elm_obj_widget_style_set(efl_added, buf));
+   elm_obj_widget_style_set(efl_added, buf),
+   efl_canvas_object_legacy_ctor(efl_added));
evas_object_layer_set(sd->hover, EVAS_LAYER_MAX);
efl_ui_mirrored_automatic_set(sd->hover, EINA_FALSE);
elm_hover_target_set(sd->hover, obj);

-- 




[EGIT] [tools/eflete] master 01/01: project manager: remove unnecessary codes of _trylock

2017-10-06 Thread Yeongjong Lee
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=efad8510bd0164f5e69c9865ecbd40533f603148

commit efad8510bd0164f5e69c9865ecbd40533f603148
Author: Yeongjong Lee <clean...@naver.com>
Date:   Fri Oct 6 11:50:23 2017 +0300

project manager: remove unnecessary codes of _trylock

Summary:
_project_lock_pid_check can check lock permission, so it doesn't need to
recheck about lock.
actually the open function(open(path, O_RDWR);) always return -1, because
the file always does not exist. (see line 567)

also, this fixes bug that eflete can't open existing projects.

Test Plan:
1. Create new project.
2. Close eflete successfully.
3. Open the project again.
4. Check that eflete can open the project.

Reviewers: rimmed

Reviewed By: rimmed

Differential Revision: https://phab.enlightenment.org/D5259
---
 src/bin/project_manager/project_manager2.c | 29 ++---
 1 file changed, 2 insertions(+), 27 deletions(-)

diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index 46727..772f738cb 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -532,6 +532,7 @@ _project_lock_pid_check(const char *lock_file)
lf = fopen(lock_file, "r");
if (!lf)
  {
+ERR(" %s\n", strerror(errno));
 return PM_PROJECT_LOCKED_PERMISSION;
  }
if (fscanf(lf, "%i", ) <= 0)
@@ -564,10 +565,8 @@ _project_lock_pid_check(const char *lock_file)
 static PM_Project_Result
 _project_trylock(const char *pro_path)
 {
-   int fd;
char *dir;
char path[PATH_MAX];
-   PM_Project_Result ret = true;
 
assert(path != NULL);
 
@@ -579,31 +578,7 @@ _project_trylock(const char *pro_path)
 return _project_lock_pid_check(path);
  }
 
-   fd = open(path, O_RDWR);
-   if (fd < 1)
- {
-ERR(" %s\n", strerror(errno));
-return PM_PROJECT_LOCKED_PERMISSION;
- }
-
-#ifndef _WIN32
-   struct flock fl;
-   fl.l_type = F_UNLCK;
-   fl.l_whence = SEEK_SET;
-   fl.l_start = 0;
-   fl.l_len = 0;
-   fl.l_pid = 0;
-   if (fcntl(fd, F_GETLK, ) != -1)
- {
-if (fl.l_type != F_UNLCK)
-  ret = PM_PROJECT_LOCKED_PERMISSION;
- }
-   else
- ret = PM_PROJECT_LOCKED_PERMISSION;
-#endif /* _WIN32 */
-
-   close(fd);
-   return ret;
+   return PM_PROJECT_SUCCESS;
 }
 
 static Eina_Bool

-- 




[EGIT] [tools/eflete] master 01/01: menu: avoid incorrect error message

2017-10-06 Thread Yeongjong Lee
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=38ca994ec0c9552698cd80a6a0e5ec0949628224

commit 38ca994ec0c9552698cd80a6a0e5ec0949628224
Author: Yeongjong Lee <clean...@naver.com>
Date:   Fri Oct 6 11:22:37 2017 +0300

menu: avoid incorrect error message

Test Plan:
1. Open eflete
2. Click File, Edit, View, Window, Help menu
3. check that console doesn't print error message.

Reviewers: rimmed

Reviewed By: rimmed

Differential Revision: https://phab.enlightenment.org/D5257
---
 src/bin/ui/menu.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index 2ce6bda0c..579e7406e 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -203,6 +203,13 @@ _menu_cb(void *data __UNUSED__,
   case MENU_HELP_SHORTCUTS:
  shortcuts_window_add();
  break;
+  case MENU_FILE:
+  case MENU_EDIT:
+  case MENU_VIEW:
+  case MENU_WINDOW:
+  case MENU_HELP:
+ //do nothing
+ break;
   default:
  ERR("unknown menu id: %d", menu_event->mid);
  break;

-- 




[EGIT] [tools/eflete] master 01/01: ewe: Add missing constructor/destructor code

2017-10-06 Thread Yeongjong Lee
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=720bf7ff93bf88933dfdd4ad9f3e908a551ac9f5

commit 720bf7ff93bf88933dfdd4ad9f3e908a551ac9f5
Author: Yeongjong Lee <clean...@naver.com>
Date:   Fri Oct 6 11:14:17 2017 +0300

ewe: Add missing constructor/destructor code

Summary:
the constructor/destructor code seem to have been deleted
this add the missing code
now, the ruler come back and this fixes broken tests of eflete

also see 694ee5a7590265eed33ed986c2f95271d6bb36a7

Test Plan:
1. Open project
2. Check that ruler is shown
and
make check

Reviewers: rimmed

Differential Revision: https://phab.enlightenment.org/D5254
---
 src/lib/ewe_ruler.c  | 62 
 src/lib/ewe_ruler.eo |  1 +
 2 files changed, 63 insertions(+)

diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index 87b08cc0f..e2caf2678 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -1005,14 +1005,76 @@ ewe_ruler_add(Evas_Object *parent)
 EOLIAN static Eo*
 _ewe_ruler_efl_object_constructor(Eo *obj, Ewe_Ruler_Smart_Data *sd)
 {
+   const char *data_dir = NULL;
+   Eina_Strbuf *theme_path = NULL;
+
obj = efl_constructor(efl_super(obj, MY_CLASS));
sd->obj = obj;
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
 
+   elm_widget_sub_object_parent_add(obj);
+
+   data_dir = elm_app_data_dir_get();
+   if (data_dir && strcmp(data_dir, ""))
+ {
+theme_path = eina_strbuf_new();
+eina_strbuf_append_printf(theme_path,
+  
"%s"EINA_PATH_SEP_S"themes"EINA_PATH_SEP_S"default"EINA_PATH_SEP_S"ewe.edj",
+  data_dir);
+sd->theme_file = eina_strbuf_string_steal(theme_path);
+eina_strbuf_free(theme_path);
+ }
+   else
+ {
+sd->theme_file = strdup(EWE_THEME);
+ }
+
+   sd->clip = evas_object_rectangle_add(evas_object_evas_get(obj));
+   evas_object_smart_member_add(sd->clip, obj);
+   sd->bg = elm_layout_add(obj);
+   elm_layout_file_set(sd->bg, sd->theme_file,
+   "ewe/ruler/horizontal_background/default");
+   evas_object_smart_member_add(sd->bg, obj);
+
+   sd->horizontal = EINA_TRUE;
+   sd->geometry.width = 0;
+   sd->geometry.height = 0;
+   sd->geometry.x = 0;
+   sd->geometry.y = 0;
+   sd->ruler_visible = EINA_FALSE;
+   sd->size_changed = EINA_TRUE;
+   sd->text_changed = EINA_TRUE;
+   sd->position_changed = EINA_TRUE;
+   ewe_ruler_scale_add(obj, NULL);
+
return obj;
 }
 
 EOLIAN static void
+_ewe_ruler_efl_object_destructor(Eo *obj, Ewe_Ruler_Smart_Data *sd)
+{
+   Ewe_Ruler_Scale *scale;
+   Ewe_Ruler_Marker *marker;
+   Eina_List *l, *ls;
+
+   EINA_LIST_FOREACH_SAFE(sd->markers, l, ls, marker)
+ ewe_ruler_marker_del(obj, marker);
+
+   EINA_LIST_FOREACH_SAFE(sd->scales, l, ls, scale)
+ ewe_ruler_scale_del(obj, scale);
+
+   evas_object_smart_member_del(sd->clip);
+   evas_object_del(sd->clip);
+
+   evas_object_smart_member_del(sd->bg);
+   evas_object_del(sd->bg);
+
+   free(sd->theme_file);
+
+   efl_destructor(efl_super(obj, MY_CLASS));
+}
+
+EOLIAN static void
 _ewe_ruler_class_constructor(Efl_Class *klass)
 {
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
diff --git a/src/lib/ewe_ruler.eo b/src/lib/ewe_ruler.eo
index 6b27ca66a..bf791e04d 100644
--- a/src/lib/ewe_ruler.eo
+++ b/src/lib/ewe_ruler.eo
@@ -314,6 +314,7 @@ class Ewe.Ruler (Efl.Ui.Layout)
implements {
   class.constructor;
   Efl.Object.constructor;
+  Efl.Object.destructor;
   Efl.Gfx.size { set; }
   Efl.Gfx.position { set; }
   Efl.Gfx.visible { set; }

-- 




[EGIT] [tools/eflete] master 01/01: ewe: fix eo compilation

2017-10-03 Thread Yeongjong Lee
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=28295ecb2e8c0f5e663fe403860bc48e42a4cc55

commit 28295ecb2e8c0f5e663fe403860bc48e42a4cc55
Author: Yeongjong Lee <clean...@naver.com>
Date:   Wed Oct 4 08:29:48 2017 +0300

ewe: fix eo compilation

Summary:
Now its buildable

see 1610ed12a8fe56bc4534d01f86b6e61620a1029a

fixes T6043

Test Plan: make

Reviewers: rimmed

Reviewed By: rimmed

Maniphest Tasks: T6043

Differential Revision: https://phab.enlightenment.org/D5253
---
 src/lib/ewe_private.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ewe_private.h b/src/lib/ewe_private.h
index 525092fa5..c5b114d56 100644
--- a/src/lib/ewe_private.h
+++ b/src/lib/ewe_private.h
@@ -18,6 +18,7 @@
 #ifndef EWE_PRIVATE_H
 #define EWE_PRIVATE_H
 
+#define ELM_WIDGET_PROTECTED
 #define EFL_CANVAS_OBJECT_PROTECTED
 #define EFL_CANVAS_GROUP_PROTECTED
 #define EFL_CANVAS_GROUP_BETA

-- 




[EGIT] [tools/enventor] master 01/01: edc_editor: Prevent auto-scrolling by scroller

2017-07-10 Thread YeongJong Lee
jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=b13596ac2c3b6685955f50c037f424c295408078

commit b13596ac2c3b6685955f50c037f424c295408078
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Jul 10 20:33:34 2017 +0900

edc_editor: Prevent auto-scrolling by scroller

Summary:
scroller had auto-scroll properties.
In detail, when the content of scroller have focus, the scroller scroll 
top-left
position of the content.

But enventor does not want to auto-scroll.
This prevent it.

Ref : 44e40c7c5e4549e78008eb7b74b6ab1b7e1fcf9d

Test Plan:
1. Open enventor basic template
2. Scroll down
3. click edc_editor

Reviewers: Jaehyun_Cho, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4930
---
 src/lib/edc_editor.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 1a74373..7481bf8 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -1152,11 +1152,20 @@ err:
 }
 
 static void
-edit_focused_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+edit_focused_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
edit_data *ed = data;
evas_object_smart_callback_call(ed->enventor, SIG_FOCUSED, NULL);
+
+   //Prevent auto-scrolling by scroller
+   elm_object_focus_allow_set(obj, EINA_FALSE);
+}
+
+static void
+edit_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj,
+  void *event_info EINA_UNUSED)
+{
+   elm_object_focus_allow_set(obj, EINA_TRUE);
 }
 
 /*/
@@ -1513,6 +1522,8 @@ edit_init(Enventor_Object *enventor, Enventor_Item *it)
elm_entry_context_menu_disabled_set(en_edit, EINA_TRUE);
elm_entry_line_wrap_set(en_edit, ELM_WRAP_NONE);
evas_object_smart_callback_add(en_edit, "focused", edit_focused_cb, ed);
+   evas_object_smart_callback_add(en_edit, "unfocused",
+  edit_unfocused_cb, NULL);
evas_object_smart_callback_add(en_edit, "changed,user", edit_changed_cb, 
ed);
evas_object_smart_callback_add(en_edit, "cursor,changed",
   edit_cursor_changed_cb, ed);

-- 




[EGIT] [tools/edi] master 01/02: Fix build warning

2017-06-25 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=792ca745e77f8ae6ea0c9a1494a3154bb1a95318

commit 792ca745e77f8ae6ea0c9a1494a3154bb1a95318
Author: YeongJong Lee <clean...@naver.com>
Date:   Sun Jun 25 08:54:30 2017 +0100

Fix build warning

Summary: Add some error log

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4917
---
 src/bin/edi_build_main.c|  3 ++-
 src/bin/edi_consolepanel.c  |  4 +++-
 src/bin/edi_debugpanel.c|  6 +++---
 src/lib/edi_build_provider_cmake.c  |  9 ++---
 src/lib/edi_build_provider_make.c   | 15 ++-
 src/lib/edi_build_provider_python.c |  3 ++-
 src/lib/edi_create.c|  4 +++-
 7 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/src/bin/edi_build_main.c b/src/bin/edi_build_main.c
index 8fade98..b3230ab 100644
--- a/src/bin/edi_build_main.c
+++ b/src/bin/edi_build_main.c
@@ -154,7 +154,8 @@ main(int argc, char **argv)
 goto end;
  }
 
-   getcwd(path, PATH_MAX);
+   if (!getcwd(path, PATH_MAX))
+ goto end;
edi_project_set(path);
 
if (!edi_builder_can_build())
diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c
index 45541b6..6a90400 100644
--- a/src/bin/edi_consolepanel.c
+++ b/src/bin/edi_consolepanel.c
@@ -228,7 +228,9 @@ _edi_test_line_parse_suite(const char *path)
 
pathlength = strlen(path);
snprintf(logfile, pathlength + 4 + 1, "%s.log", path);
-   realpath(logfile, logpath);
+   if (!realpath(logfile, logpath))
+ ERR("Log file not found: %s", logfile);
+
if (_current_test_dir)
  eina_stringshare_del(_current_test_dir);
_current_test_dir = eina_stringshare_add(dirname(logpath));
diff --git a/src/bin/edi_debugpanel.c b/src/bin/edi_debugpanel.c
index fd3331c..f074ed3 100644
--- a/src/bin/edi_debugpanel.c
+++ b/src/bin/edi_debugpanel.c
@@ -207,8 +207,9 @@ _edi_debug_process_id(int *state)
 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);
 f = fopen(path, "r");
 if (!f) continue;
-fgets(buf, sizeof(buf), f);
+p = fgets(buf, sizeof(buf), f);
 fclose(f);
+if (!p) continue;
 temp_name = ecore_file_file_get(buf);
 if (!strcmp(temp_name, program_name))
   {
@@ -220,8 +221,7 @@ _edi_debug_process_id(int *state)
  if (f)
{
   count = 0;
-  fgets(buf, sizeof(buf), f);
-  p = buf;
+  p = fgets(buf, sizeof(buf), f);
   while (*p++ != '\0')
 {
if (p[0] == ' ') { count++; p++; }
diff --git a/src/lib/edi_build_provider_cmake.c 
b/src/lib/edi_build_provider_cmake.c
index 3bee684..37b97a1 100644
--- a/src/lib/edi_build_provider_cmake.c
+++ b/src/lib/edi_build_provider_cmake.c
@@ -37,7 +37,8 @@ _cmake_file_hidden_is(const char *file)
 static void
 _cmake_build(void)
 {
-   chdir(edi_project_get());
+   if (chdir(edi_project_get()) != 0)
+ ERR("Could not chdir");
ecore_exe_pipe_run("mkdir -p build && cd build && cmake 
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 .. && make && cd ..",
   ECORE_EXE_PIPE_READ_LINE_BUFFERED | 
ECORE_EXE_PIPE_READ |
   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | 
ECORE_EXE_PIPE_ERROR |
@@ -47,7 +48,8 @@ _cmake_build(void)
 static void
 _cmake_test(void)
 {
-   chdir(edi_project_get());
+   if (chdir(edi_project_get()) != 0)
+ ERR("Could not chdir");
ecore_exe_pipe_run("env CK_VERBOSITY=verbose make check", 
ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_READ |
   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | 
ECORE_EXE_PIPE_ERROR |
   ECORE_EXE_PIPE_WRITE | ECORE_EXE_USE_SH, NULL);
@@ -56,7 +58,8 @@ _cmake_test(void)
 static void
 _cmake_clean(void)
 {
-   chdir(edi_project_get());
+   if (chdir(edi_project_get()) != 0)
+ ERR("Could not chdir");
ecore_exe_pipe_run("make clean", ECORE_EXE_PIPE_READ_LINE_BUFFERED | 
ECORE_EXE_PIPE_READ |
   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | 
ECORE_EXE_PIPE_ERROR |
   ECORE_EXE_PIPE_WRITE | ECORE_EXE_USE_SH, NULL);
diff --git a/src/lib/edi_build_provider_make.c 
b/src/lib/edi_build_provider_make.c
index 8870828..82aaa82 100644
--- a/src/lib/edi_build_provider_make.c
+++ b/src/lib/edi_build_provider_make.c
@@ -44,7 +44,8 @@ _make_file_hidden_is(const char *file)
 static void
 _make_build_make(void)
 {
-   chdir(edi_project_get());
+   if (chdir(edi_project_get()) != 0)
+ ERR("Could not chdir");
ecore_exe_pipe_run(BEAR_COMMAND MAKE_COMMAND, 
ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_RE

[EGIT] [core/efl] master 01/01: elm_code: fix wrong selection delete

2017-05-30 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 0b67bfc0315fdf7fed800652d10b76b7a17a7051
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue May 30 08:33:10 2017 +0100

elm_code: fix wrong selection delete

Summary:
If multi selection have 0 column and delete the selection, 0 + 1 column also
deleted
This fix that bug.

Also, remove needless code.

Test Plan:
1. select multi line with 0 column.
2. delete the selection

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4922
---
 src/lib/elementary/elm_code_widget_selection.c | 25 +--
 .../elementary/elm_code_test_widget_selection.c| 50 --
 2 files changed, 56 insertions(+), 19 deletions(-)

diff --git a/src/lib/elementary/elm_code_widget_selection.c 
b/src/lib/elementary/elm_code_widget_selection.c
index c8c1dacde8..9cac479d3e 100644
--- a/src/lib/elementary/elm_code_widget_selection.c
+++ b/src/lib/elementary/elm_code_widget_selection.c
@@ -186,7 +186,8 @@ _elm_code_widget_selection_delete_multi(Elm_Code_Widget 
*widget, Elm_Code_Widget
 {
Elm_Code_Line *line;
const char *first, *last;
-   unsigned int last_length, start, end, length, i;
+   unsigned int last_length, start, length, i;
+   int end;
char *content;
Elm_Code_Widget_Selection_Data *selection;
 
@@ -200,22 +201,16 @@ _elm_code_widget_selection_delete_multi(Elm_Code_Widget 
*widget, Elm_Code_Widget
 
line = elm_code_file_line_get(pd->code->file, selection->end_line);
last = elm_code_line_text_get(line, _length);
-   end = elm_code_widget_line_text_position_for_column_get(widget, line, 
selection->end_col);
+   end = (int)elm_code_widget_line_text_position_for_column_get(widget, line, 
selection->end_col);
 
-   if (last_length == end)
- {
-length = start + last_length - end;
-content = malloc(sizeof(char) * length);
-strncpy(content, first, start);
- }
-   else
- {
-length = start + last_length - (end + 1);
-content = malloc(sizeof(char) * length);
-strncpy(content, first, start);
+   if (selection->end_col == 0)
+ end = -1;
 
-strncpy(content + start, last + end + 1, last_length - (end + 1));
- }
+   length = start + last_length - (end + 1);
+   content = malloc(sizeof(char) * length);
+   strncpy(content, first, start);
+   if (last_length > 0)
+ strncpy(content + start, last + end + 1, last_length - (end + 1));
 
for (i = line->number; i > selection->start_line; i--)
  elm_code_file_line_remove(pd->code->file, i);
diff --git a/src/tests/elementary/elm_code_test_widget_selection.c 
b/src/tests/elementary/elm_code_test_widget_selection.c
index e394300af6..db046a0155 100644
--- a/src/tests/elementary/elm_code_test_widget_selection.c
+++ b/src/tests/elementary/elm_code_test_widget_selection.c
@@ -346,13 +346,14 @@ START_TEST (elm_code_test_widget_selection_delete_twoline)
file = elm_code_file_new(code);
elm_code_file_line_append(file, "text", 4, NULL);
elm_code_file_line_append(file, "TEXT", 4, NULL);
+   elm_code_file_line_append(file, "remove", 6, NULL);
 
win = elm_win_add(NULL, "code", ELM_WIN_BASIC);
widget = elm_code_widget_add(win, code);
line = elm_code_file_line_get(file, 1);
text = elm_code_line_text_get(line, NULL);
ck_assert_str_eq("text", text);
-   ck_assert_int_eq(2, elm_code_file_lines_get(file));
+   ck_assert_int_eq(3, elm_code_file_lines_get(file));
 
elm_code_widget_selection_start(widget, 1, 3);
elm_code_widget_selection_end(widget, 2, 2);
@@ -361,6 +362,15 @@ START_TEST (elm_code_test_widget_selection_delete_twoline)
line = elm_code_file_line_get(file, 1);
text = elm_code_line_text_get(line, );
ck_assert_strn_eq("teXT", text, length);
+   ck_assert_int_eq(2, elm_code_file_lines_get(file));
+
+   elm_code_widget_selection_start(widget, 1, 5);
+   elm_code_widget_selection_end(widget, 2, 0);
+   elm_code_widget_selection_delete(widget);
+
+   line = elm_code_file_line_get(file, 1);
+   text = elm_code_line_text_get(line, );
+   ck_assert_strn_eq("teXTremove", text, length);
ck_assert_int_eq(1, elm_code_file_lines_get(file));
 
elm_code_free(code);
@@ -383,13 +393,14 @@ START_TEST 
(elm_code_test_widget_selection_reverse_delete_twoline)
file = elm_code_file_new(code);
elm_code_file_line_append(file, "text", 4, NULL);
elm_code_file_line_append(file, "TEXT", 4, NULL);
+   elm_code_file_line_append(file, "remove", 6, NULL);
 
win = elm_win_add(NULL, "code", ELM_WIN_BASIC);
widget = elm_code_widget_add(win, code);
line = elm_code_file_li

[EGIT] [tools/edi] master 01/01: autosuggest: Refactor suggest list show function

2017-05-28 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=6239499fed98e19a0d7aa6bb5d8bcc1b638b7dee

commit 6239499fed98e19a0d7aa6bb5d8bcc1b638b7dee
Author: YeongJong Lee <clean...@naver.com>
Date:   Sun May 28 18:58:55 2017 +0100

autosuggest: Refactor suggest list show function

Summary:
1. Fix wrong location of suggest list
2. Remove duplicated function
3. Add return condition

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4918
---
 src/bin/editor/edi_editor.c | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 9966bc4..afab1c5 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -421,7 +421,7 @@ static void
 _suggest_popup_show(Edi_Editor *editor)
 {
unsigned int col, row;
-   Evas_Coord cx, cy, cw, ch, sy, sh, ey, eh, bg_x, bg_y;
+   Evas_Coord cx, cy, cw, ch, sh, eh, bg_x, bg_y;
char *word;
 
if (!editor->suggest_genlist)
@@ -430,28 +430,26 @@ _suggest_popup_show(Edi_Editor *editor)
if (elm_genlist_items_count(editor->suggest_genlist) <= 0)
  return;
 
+   if (evas_object_visible_get(editor->suggest_bg))
+ return;
+
elm_code_widget_cursor_position_get(editor->entry, , );
elm_code_widget_geometry_for_position_get(editor->entry, row, col,
  , , , );
+   evas_object_geometry_get(editor->suggest_bg, NULL, NULL, NULL, );
+   evas_object_geometry_get(elm_object_top_widget_get(editor->entry),
+NULL, NULL, NULL, );
 
word = _edi_editor_current_word_get(editor, row, col);
 
bg_x = cx - (strlen(word) + 1) * cw;
bg_y = cy + ch;
+   if (bg_y + sh > eh)
+ bg_y = cy - sh;
 
evas_object_move(editor->suggest_bg, bg_x, bg_y);
evas_object_show(editor->suggest_bg);
 
-   evas_object_geometry_get(editor->suggest_bg, NULL, , NULL, );
-   evas_object_geometry_get(editor->entry, NULL, , NULL, );
-
-   if (sy + sh > ey + eh)
- {
-bg_y = cy - sh;
-
-evas_object_move(editor->suggest_bg, bg_x, bg_y);
- }
-
if (!evas_object_key_grab(editor->suggest_genlist, "Return", 0, 0, 
EINA_TRUE))
  ERR("Failed to grab key - %s", "Return");
if (!evas_object_key_grab(editor->suggest_genlist, "Up", 0, 0, EINA_TRUE))

-- 




[EGIT] [tools/enventor] master 01/01: redoundo: fix abnormal behavior of smart redoundo

2017-05-22 Thread YeongJong Lee
jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=8b55d776da3440a8096e26e9b194469bd8f8c38e

commit 8b55d776da3440a8096e26e9b194469bd8f8c38e
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue May 23 10:14:19 2017 +0900

redoundo: fix abnormal behavior of smart redoundo

Summary:
1. When delete text
2. When add some separated text on the same line ex)  -> abbaacca
,the smart redoundo is broken

This fixes that bugs

Test Plan:
1. turn on smart redo / undo option
1. add / delete text
2. check that smart redoundo works correctly

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D4880
---
 src/lib/redoundo.c | 27 +--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/lib/redoundo.c b/src/lib/redoundo.c
index 3762452..94c866b 100644
--- a/src/lib/redoundo.c
+++ b/src/lib/redoundo.c
@@ -63,6 +63,7 @@ _input_timer_cb(void *data)
 static diff_data *
 smart_analyser(redoundo_data *rd, diff_data *diff)
 {
+   Eina_Bool is_continues_text = EINA_FALSE;
if (!enventor_obj_smart_undo_redo_get(rd->enventor)) return diff;
 
if (rd->smart.timer)
@@ -73,21 +74,43 @@ smart_analyser(redoundo_data *rd, diff_data *diff)
 
if (!diff) return diff;
 
+   if (!rd->last_diff || (rd->last_diff->action != diff->action))
+ {
+rd->smart.continues_input = EINA_TRUE;
+return diff;
+ }
+
if (diff->length == 1 && enventor_obj_auto_indent_get(rd->enventor))
  {
if (strstr(diff->text, "")) diff->relative = EINA_TRUE;
  else diff->relative = EINA_FALSE;
  }
 
+   // Determine the text of diff is continuous
+   if (diff->action ?
+   ((rd->last_diff->cursor_pos + rd->last_diff->length) == 
diff->cursor_pos) :
+   ((diff->cursor_pos + diff->length) == rd->last_diff->cursor_pos) ||
+   (diff->cursor_pos == rd->last_diff->cursor_pos))
+ is_continues_text = EINA_TRUE;
+
// Analyse speed of text input and words separates
if ((rd->smart.continues_input) && (!diff->relative) &&
-   (isalpha(diff->text[0])) && (rd->last_diff && 
(isalpha(rd->last_diff->text[0]
+   (isalpha(diff->text[0])) && (isalpha(rd->last_diff->text[0])) &&
+   (is_continues_text))
  {
 diff_data *tmp = diff;
 const char *text;
 diff = rd->last_diff;
 diff->length += tmp->length;
-text = eina_stringshare_printf("%s%s", diff->text, tmp->text);
+
+if (diff->action || (diff->cursor_pos == tmp->cursor_pos))
+  text = eina_stringshare_printf("%s%s", diff->text, tmp->text);
+else
+  {
+ diff->cursor_pos = tmp->cursor_pos;
+ text = eina_stringshare_printf("%s%s", tmp->text, diff->text);
+  }
+
 eina_stringshare_replace(>text, text);
 eina_stringshare_del(text);
 rd->last_diff = eina_list_data_get(eina_list_prev(rd->current_node));

-- 




[EGIT] [tools/enventor] master 01/01: refactor key event method

2017-02-21 Thread YeongJong Lee
jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=a8a14566c7b9ccbffc230c9c4989e39736331de0

commit a8a14566c7b9ccbffc230c9c4989e39736331de0
Author: YeongJong Lee <clean...@naver.com>
Date:   Wed Feb 22 15:57:17 2017 +0900

refactor key event method

Summary: The key event work well now.

Test Plan:
1. Run enventor
2. Test the shortcut key that use modifiers(, )
3. Check the shortcut work correctly

Reviewers: Hermet, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Maniphest Tasks: T5146

Differential Revision: https://phab.enlightenment.org/D4620
---
 src/bin/main.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index c281823..d3b52a6 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -631,8 +631,7 @@ enventor_setup(app_data *ad)
 static Eina_Bool
 alt_func(Evas_Event_Key_Down *event)
 {
-   if (evas_key_modifier_is_set(event->modifiers, "Shift") ||
-   evas_key_modifier_is_set(event->modifiers, "Ctrl"))
+   if (!evas_key_modifier_is_set(event->modifiers, "Alt"))
  return EINA_FALSE;
 
//Full Edit View
@@ -666,8 +665,7 @@ alt_func(Evas_Event_Key_Down *event)
 static Eina_Bool
 ctrl_func(Evas_Event_Key_Down *event)
 {
-   if (evas_key_modifier_is_set(event->modifiers, "Shift") ||
-   evas_key_modifier_is_set(event->modifiers, "Alt"))
+   if (!evas_key_modifier_is_set(event->modifiers, "Control"))
  return EINA_FALSE;
 
//Save
@@ -862,7 +860,7 @@ static void
 keygrabber_init(app_data *ad)
 {
Evas *e = evas_object_evas_get(base_enventor_get());
-   ad->keygrabber = evas_object_rectangle_add(e);
+   ad->keygrabber = base_enventor_get();
evas_object_event_callback_add(ad->keygrabber, EVAS_CALLBACK_KEY_DOWN,
   keygrabber_key_down_cb, NULL);
 #define GRAB_ADD(key, modifier) \

-- 




[EGIT] [core/efl] master 06/13: efl_ui_flip: fix wrong define

2017-02-07 Thread YeongJong Lee
cedric pushed a commit to branch master.

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

commit 62803f9164aec0522cd9b0db7f6b3e0e52358351
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Feb 7 13:36:16 2017 -0800

efl_ui_flip: fix wrong define

Reviewers: jpeg, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elementary/efl_ui_flip.c| 2 +-
 src/lib/elementary/efl_ui_widget_flip.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c
index 57d1b18..5a6ff21 100644
--- a/src/lib/elementary/efl_ui_flip.c
+++ b/src/lib/elementary/efl_ui_flip.c
@@ -1941,7 +1941,7 @@ elm_flip_perspective_set(Evas_Object *obj,
  Evas_Coord x EINA_UNUSED,
  Evas_Coord y EINA_UNUSED)
 {
-   ELM_FLIP_CHECK(obj);
+   EFL_UI_FLIP_CHECK(obj);
 }
 
 // FIXME: add ambient and lighting control
diff --git a/src/lib/elementary/efl_ui_widget_flip.h 
b/src/lib/elementary/efl_ui_widget_flip.h
index 012580f..11c2abd 100644
--- a/src/lib/elementary/efl_ui_widget_flip.h
+++ b/src/lib/elementary/efl_ui_widget_flip.h
@@ -104,7 +104,7 @@ struct _Vertex3
return val;   \
 }
 
-#define ELM_FLIP_CHECK(obj)  \
+#define EFL_UI_FLIP_CHECK(obj)   \
   if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_FLIP_CLASS))) \
 return
 

-- 




[EGIT] [core/efl] master 07/13: efl_ui_image: fix wrong define

2017-02-07 Thread YeongJong Lee
cedric pushed a commit to branch master.

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

commit 5bb2f5b7b4bcda570867b6eb378fa501c6a72327
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Feb 7 13:36:40 2017 -0800

efl_ui_image: fix wrong define

Reviewers: jypark, jpeg, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elementary/efl_ui_widget_image.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_widget_image.h 
b/src/lib/elementary/efl_ui_widget_image.h
index f1480f0..92cf185 100644
--- a/src/lib/elementary/efl_ui_widget_image.h
+++ b/src/lib/elementary/efl_ui_widget_image.h
@@ -1,5 +1,5 @@
-#ifndef ELM_WIDGET_IMAGE_H
-#define ELM_WIDGET_IMAGE_H
+#ifndef EFL_UI_WIDGET_IMAGE_H
+#define EFL_UI_WIDGET_IMAGE_H
 
 #include "Elementary.h"
 

-- 




[EGIT] [core/efl] master 01/01: elm_code: add support for redo

2017-02-02 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 4aee312774df7446eecc9bcfd15ce98ea568f815
Author: YeongJong Lee <clean...@naver.com>
Date:   Thu Feb 2 18:07:02 2017 +

elm_code: add support for redo

Summary:
now, elm_code support redo.
shortcut is  + 

Test Plan:
1. elementary_test - Code Editor
2. Check that undo and redo are work correctly.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4642
---
 src/lib/elementary/elm_code_widget.c  | 19 ---
 src/lib/elementary/elm_code_widget.eo |  3 ++
 src/lib/elementary/elm_code_widget_undo.c | 82 ---
 3 files changed, 80 insertions(+), 24 deletions(-)

diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index 199d19a..349551b 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1249,7 +1249,7 @@ _elm_code_widget_change_selection_add(Evas_Object *widget)
 
change = _elm_code_widget_change_create(selection->start_col,
selection->start_line,
-   selection->end_col + 1,
+   selection->end_col,
selection->end_line,
selection_text,
strlen(selection_text),
@@ -1360,8 +1360,8 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
Elm_Code *code;
Elm_Code_Line *line;
Elm_Code_Widget_Change_Info *change;
-   unsigned int row, col, position, oldlen, width, indent;
-   char *oldtext, *leading;
+   unsigned int row, col, position, oldlen, width, indent, textlen;
+   char *oldtext, *leading, *text;
 
_elm_code_widget_change_selection_add(widget);
elm_code_widget_selection_delete(widget);
@@ -1394,9 +1394,14 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
efl_event_callback_legacy_call(widget, 
ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
free(leading);
 
-   change = _elm_code_widget_change_create(width + 1, row, indent - 1, row + 
1, "\n", 1, EINA_TRUE);
+   textlen = strlen(leading) + 2;
+   text = malloc(sizeof(char) * textlen);
+   snprintf(text, textlen, "\n%s", leading);
+
+   change = _elm_code_widget_change_create(width + 1, row, indent - 1, row + 
1, text, strlen(text), EINA_TRUE);
_elm_code_widget_undo_change_add(widget, change);
_elm_code_widget_change_free(change);
+   free(text);
 }
 
 static void
@@ -1479,7 +1484,7 @@ _elm_code_widget_backspace(Elm_Code_Widget *widget)
 
efl_event_callback_legacy_call(widget, 
ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
-   change = _elm_code_widget_change_create(start_col, row, end_col, row, text, 
char_width, EINA_FALSE);
+   change = _elm_code_widget_change_create(start_col, row, end_col - 1, row, 
text, char_width, EINA_FALSE);
_elm_code_widget_undo_change_add(widget, change);
_elm_code_widget_change_free(change);
 }
@@ -1524,7 +1529,7 @@ _elm_code_widget_delete(Elm_Code_Widget *widget)
elm_obj_code_widget_cursor_position_set(widget, row, start_col);
efl_event_callback_legacy_call(widget, 
ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
-   change = _elm_code_widget_change_create(start_col, row, col, row, text, 
char_width, EINA_FALSE);
+   change = _elm_code_widget_change_create(start_col, row, col - 1, row, text, 
char_width, EINA_FALSE);
_elm_code_widget_undo_change_add(widget, change);
_elm_code_widget_change_free(change);
 }
@@ -1545,6 +1550,8 @@ _elm_code_widget_control_key_down_cb(Elm_Code_Widget 
*widget, const char *key)
  elm_code_widget_selection_paste(widget);
else if (!strcmp("x", key))
  elm_code_widget_selection_cut(widget);
+   else if (!strcmp("y", key))
+ elm_code_widget_redo(widget);
else if (!strcmp("z", key))
  elm_code_widget_undo(widget);
 }
diff --git a/src/lib/elementary/elm_code_widget.eo 
b/src/lib/elementary/elm_code_widget.eo
index f6bf6f4..49a2ad8 100644
--- a/src/lib/elementary/elm_code_widget.eo
+++ b/src/lib/elementary/elm_code_widget.eo
@@ -275,6 +275,9 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface.Atspi.Text)
   undo {
  [[Undo last action]]
   }
+  redo {
+ [[Redo last action]]
+  }
}
implements {
   class.constructor;
diff --git a/src/lib/elementary/elm_code_widget_undo.c 
b/src/lib/elementary/elm_code_widget_undo.c
index ed0b8f2..5da08d1 100644
--- a/src/lib/elementary/elm_code_widget_undo.c
+++ b/src/lib/elementary/elm_code_widget_undo.c
@@ -6,6 +6,25 @@
 
 #include "elm_code_widget_private.h"
 
+static void
+_elm

[EGIT] [tools/enventor] master 01/01: goto: fix scroll issue

2017-02-01 Thread YeongJong Lee
jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=324454b3cb0da9f9e4344202276b062b3dc45f4c

commit 324454b3cb0da9f9e4344202276b062b3dc45f4c
Author: YeongJong Lee <clean...@naver.com>
Date:   Thu Feb 2 10:44:01 2017 +0900

goto: fix scroll issue

Summary:
Add scroller_region_show method.

fix https://phab.enlightenment.org/T4416

Test Plan:
1. Run enventor
2. Open goto window using shortcut key( + )
3. type line number
4. check the scroller scroll correctly

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D4619
---
 src/lib/edc_editor.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 1d5ffa0..1a74373 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -1659,10 +1659,14 @@ edit_max_line_get(edit_data *ed)
 void
 edit_goto(edit_data *ed, int line)
 {
+   int cursor_y;
+
elm_entry_select_none(ed->en_edit);
Evas_Object *tb = elm_entry_textblock_get(ed->en_edit);
Evas_Textblock_Cursor *cur = evas_object_textblock_cursor_get(tb);
evas_textblock_cursor_line_set(cur, (line - 1));
+   elm_entry_cursor_geometry_get(ed->en_edit, NULL, _y, NULL, NULL);
+   elm_scroller_region_show(ed->scroller, 0, cursor_y, 0, 0);
elm_entry_calc_force(ed->en_edit);
elm_object_focus_set(ed->en_edit, EINA_TRUE);
 }

-- 




[EGIT] [core/efl] master 01/01: elm_code: add copy/paste/cut undo

2017-02-01 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 251469e2fecdecd338262ed93919cea4100bdd11
Author: YeongJong Lee <clean...@naver.com>
Date:   Wed Feb 1 09:08:14 2017 +

elm_code: add copy/paste/cut undo

Summary: The patch for supporting copy,paste and cut undo

Test Plan:
1. elementary_test - Code Editor
2. Check that undo work correctly when copy,paste and cut

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4636
---
 src/lib/elementary/elm_code_widget.c   |  6 ++---
 src/lib/elementary/elm_code_widget_private.h   |  2 ++
 src/lib/elementary/elm_code_widget_selection.c | 32 +++---
 3 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index 6d17db2..199d19a 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1221,9 +1221,7 @@ _elm_code_widget_change_create(unsigned int start_col, 
unsigned int start_line,
info->end_col = end_col;
info->end_line = end_line;
 
-   info->content = malloc((length + 1) * sizeof(char));
-   strncpy(info->content, text, length);
-   info->content[length] = '\0';
+   info->content = strndup(text, length);
info->length = length;
 
return info;
@@ -1251,7 +1249,7 @@ _elm_code_widget_change_selection_add(Evas_Object *widget)
 
change = _elm_code_widget_change_create(selection->start_col,
selection->start_line,
-   selection->end_col,
+   selection->end_col + 1,
selection->end_line,
selection_text,
strlen(selection_text),
diff --git a/src/lib/elementary/elm_code_widget_private.h 
b/src/lib/elementary/elm_code_widget_private.h
index 42ed274..9364eff 100644
--- a/src/lib/elementary/elm_code_widget_private.h
+++ b/src/lib/elementary/elm_code_widget_private.h
@@ -68,4 +68,6 @@ EAPI Elm_Code_Widget_Selection_Data 
*elm_code_widget_selection_normalized_get(Ev
 
 void _elm_code_widget_undo_change_add(Evas_Object *widget, 
Elm_Code_Widget_Change_Info *info);
 
+void _elm_code_widget_change_selection_add(Evas_Object *widget);
+
 #endif
diff --git a/src/lib/elementary/elm_code_widget_selection.c 
b/src/lib/elementary/elm_code_widget_selection.c
index 6f4357f..1c4ecde 100644
--- a/src/lib/elementary/elm_code_widget_selection.c
+++ b/src/lib/elementary/elm_code_widget_selection.c
@@ -356,14 +356,17 @@ elm_code_widget_selection_cut(Evas_Object *widget)
 {
char *text;
 
+   if (elm_code_widget_selection_is_empty(widget))
+ return;
+
text = elm_code_widget_selection_text_get(widget);
elm_cnp_selection_set(widget, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_TEXT, 
text, strlen(text));
elm_cnp_selection_loss_callback_set(widget, ELM_SEL_TYPE_CLIPBOARD, 
_selection_loss_cb, widget);
free(text);
 
+   _elm_code_widget_change_selection_add(widget);
elm_code_widget_selection_delete(widget);
 
-   // TODO construct and pass a change object for cut and paste
efl_event_callback_legacy_call(widget, 
ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 }
 
@@ -372,6 +375,9 @@ elm_code_widget_selection_copy(Evas_Object *widget)
 {
char *text;
 
+   if (elm_code_widget_selection_is_empty(widget))
+ return;
+
text = elm_code_widget_selection_text_get(widget);
elm_cnp_selection_set(widget, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_TEXT, 
text, strlen(text));
elm_cnp_selection_loss_callback_set(widget, ELM_SEL_TYPE_CLIPBOARD, 
_selection_loss_cb, widget);
@@ -429,8 +435,10 @@ static Eina_Bool
 _selection_paste_cb(void *data, Evas_Object *obj EINA_UNUSED, 
Elm_Selection_Data *ev)
 {
Elm_Code *code;
+   Elm_Code_Line *line;
Elm_Code_Widget *widget;
-   unsigned int row, col;
+   Elm_Code_Widget_Change_Info *change;
+   unsigned int row, col, end_row, end_col, position;
 
widget = (Elm_Code_Widget *)data;
 
@@ -447,7 +455,24 @@ _selection_paste_cb(void *data, Evas_Object *obj 
EINA_UNUSED, Elm_Selection_Data
else
  _selection_paste_multi(widget, code, col, row, ev->data, ev->len - 1);
 
-   // TODO construct and pass a change object for cut and paste
+   elm_obj_code_widget_cursor_position_get(widget, _row, _col);
+
+   line = elm_code_file_line_get(code->file, end_row);
+   position = elm_code_widget_line_text_position_for_column_get(widget, line, 
end_col);
+
+   change = calloc(1, sizeof(Elm_Code_Widget_Change_Info));
+   change->insert = EINA_TRUE;
+   change->start_col = col;
+   change->start_line = row;
+   change->

[EGIT] [core/efl] master 01/01: elm_code: fix that selected code can't undo

2017-01-31 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 928091bedbcb1bb3166f680bcd192ef32677fc3b
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Jan 31 19:04:33 2017 +

elm_code: fix that selected code can't undo

Summary: Change some undo logic and remove unused function

Test Plan:
1. elementary_test - Code Editor
2. Select lines.
3. Remove selected lines.
4. undo removed lines( + )

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4631
---
 src/lib/elementary/elm_code_widget.c   | 83 ++
 src/lib/elementary/elm_code_widget_selection.c | 23 +++
 src/lib/elementary/elm_code_widget_selection.h |  2 +
 src/lib/elementary/elm_code_widget_undo.c  | 37 +++-
 4 files changed, 118 insertions(+), 27 deletions(-)

diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index 98799d5..6d17db2 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1206,25 +1206,6 @@ _elm_code_widget_cursor_move_pagedown(Elm_Code_Widget 
*widget)
_elm_code_widget_cursor_move(widget, pd, col, row, EINA_TRUE);
 }
 
-static Eina_Bool
-_elm_code_widget_delete_selection(Elm_Code_Widget *widget)
-{
-   Elm_Code_Widget_Data *pd;
-   Elm_Code_Widget_Selection_Data *selection;
-
-   pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
-
-   if (!pd->selection)
- return EINA_FALSE;
-
-   selection = elm_code_widget_selection_normalized_get(widget);
-   elm_code_widget_selection_delete(widget);
-   elm_code_widget_cursor_position_set(widget, selection->start_line, 
selection->start_col);
-   free(selection);
-
-   return EINA_TRUE;
-}
-
 static Elm_Code_Widget_Change_Info *
 _elm_code_widget_change_create(unsigned int start_col, unsigned int start_line,
unsigned int end_col, unsigned int end_line,
@@ -1256,6 +1237,32 @@ _elm_code_widget_change_free(Elm_Code_Widget_Change_Info 
*info)
 }
 
 void
+_elm_code_widget_change_selection_add(Evas_Object *widget)
+{
+   Elm_Code_Widget_Change_Info *change;
+   Elm_Code_Widget_Selection_Data *selection;
+   char *selection_text;
+
+   if (elm_code_widget_selection_is_empty(widget))
+ return;
+
+   selection_text = elm_code_widget_selection_text_get(widget);
+   selection = elm_code_widget_selection_normalized_get(widget);
+
+   change = _elm_code_widget_change_create(selection->start_col,
+   selection->start_line,
+   selection->end_col,
+   selection->end_line,
+   selection_text,
+   strlen(selection_text),
+   EINA_FALSE);
+   _elm_code_widget_undo_change_add(widget, change);
+   _elm_code_widget_change_free(change);
+   free(selection_text);
+   free(selection);
+}
+
+void
 _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char 
*text, int length, Eina_Bool undo)
 {
Elm_Code *code;
@@ -1264,7 +1271,12 @@ 
_elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char *t
unsigned int row, col, position, col_width, curlen, indent;
const char *curtext, *indent_text;
 
-   _elm_code_widget_delete_selection(widget);
+   if (undo)
+ {
+_elm_code_widget_change_selection_add(widget);
+elm_code_widget_selection_delete(widget);
+ }
+
code = elm_obj_code_widget_code_get(widget);
elm_obj_code_widget_cursor_position_get(widget, , );
line = elm_code_file_line_get(code->file, row);
@@ -1353,7 +1365,9 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
unsigned int row, col, position, oldlen, width, indent;
char *oldtext, *leading;
 
-   _elm_code_widget_delete_selection(widget);
+   _elm_code_widget_change_selection_add(widget);
+   elm_code_widget_selection_delete(widget);
+
code = elm_obj_code_widget_code_get(widget);
elm_obj_code_widget_cursor_position_get(widget, , );
line = elm_code_file_line_get(code->file, row);
@@ -1400,18 +1414,27 @@ _elm_code_widget_backspaceline(Elm_Code_Widget *widget, 
Eina_Bool nextline)
 
if (nextline)
  {
+elm_code_widget_selection_start(widget, row, col);
+elm_code_widget_selection_end(widget, row + 1, 0);
+_elm_code_widget_change_selection_add(widget);
+
 elm_code_line_merge_down(line);
  }
else
  {
 oldline = elm_code_file_line_get(code->file, row - 1);
 elm_code_line_text_get(oldline, );
-elm_code_line_merge_up(line);
 
 position = elm_code_widget_line_text_column_width_to_

[EGIT] [tools/edi] master 01/01: ui: Bring in current tab

2017-01-31 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=36a5bb1410f3e69d8ef22be21f2d1ad20a592fe1

commit 36a5bb1410f3e69d8ef22be21f2d1ad20a592fe1
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Jan 31 18:32:59 2017 +

ui: Bring in current tab

Summary: Bring in current tab if it is not in the scope of scroller.

Test Plan:
1. Open project
2. Open several file
3. Check current tab is in the scope of scroller

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4416
---
 src/bin/mainview/edi_mainview.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c
index c35844c..04c44c5 100644
--- a/src/bin/mainview/edi_mainview.c
+++ b/src/bin/mainview/edi_mainview.c
@@ -17,7 +17,7 @@
 #include "edi_private.h"
 #include "edi_config.h"
 
-static Evas_Object *_content_frame, *_current_view, *tb, *_main_win, 
*_welcome_panel;
+static Evas_Object *_content_frame, *_current_view, *tb, *_main_win, 
*_welcome_panel, *_tab_scroller;
 static Evas_Object *_edi_mainview_choose_popup, *_edi_mainview_goto_popup;
 static Edi_Path_Options *_edi_mainview_choose_options;
 
@@ -117,6 +117,7 @@ edi_mainview_item_select(Edi_Mainview_Item *item)
 {
Eina_List *list;
Edi_Mainview_Item *it;
+   Evas_Coord tabw, region_x = 0, w, total_w = 0;
 
if (item->win)
  {
@@ -127,10 +128,16 @@ edi_mainview_item_select(Edi_Mainview_Item *item)
 EINA_LIST_FOREACH(_edi_mainview_items, list, it)
   {
  elm_object_signal_emit(it->tab, "mouse,up,1", "base");
+ evas_object_geometry_get(it->tab, NULL, NULL, , NULL);
+ if (item == it) region_x = total_w;
+ total_w += w;
   }
 
 _edi_mainview_view_show(item->view);
 elm_object_signal_emit(item->tab, "mouse,down,1", "base");
+
+evas_object_geometry_get(item->tab, NULL, NULL, , NULL);
+elm_scroller_region_bring_in(_tab_scroller, region_x, 0, tabw, 0);
  }
 }
 
@@ -244,6 +251,7 @@ _edi_mainview_item_tab_add(Edi_Path_Options *options, const 
char *mime)
 
elm_box_pack_end(tb, tab);
evas_object_show(tab);
+   elm_box_recalculate(tb);
item->tab = tab;
edi_mainview_item_select(item);
 
@@ -738,6 +746,7 @@ edi_mainview_add(Evas_Object *parent, Evas_Object *win)
elm_scroller_policy_set(scr, ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF);
elm_table_pack(tabs, scr, 0, 0, 1, 1);
evas_object_show(scr);
+   _tab_scroller = scr;
 
tb = elm_box_add(scr);
evas_object_size_hint_weight_set(tb, 0.0, 0.0);

-- 




[EGIT] [tools/edi] master 01/01: filepanel: fix bug that unable to expand again

2017-01-30 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=b73f04cba3e977ef30057d9a1e44b17010237ae9

commit b73f04cba3e977ef30057d9a1e44b17010237ae9
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Jan 31 07:37:59 2017 +

filepanel: fix bug that unable to expand again

Summary:
When directory is contracted, hash data still remained.
In order to expand again, it is needed to delete hash data of subitems when 
contracted

Test Plan:
1. Open project.
2. Expand directory
3. Contract directory
4. Expand directory again
5. check that works fine

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4634
---
 src/bin/edi_filepanel.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c
index 717e98b..8d2dd33 100644
--- a/src/bin/edi_filepanel.c
+++ b/src/bin/edi_filepanel.c
@@ -434,8 +434,18 @@ _ls_error_cb(void *data, Eio_File *handler EINA_UNUSED, 
int error EINA_UNUSED)
 static void
 _file_listing_empty(Edi_Dir_Data *dir, Elm_Object_Item *parent_it)
 {
+   const Eina_List *list, *l;
+   Elm_Object_Item *subit;
+   Edi_Dir_Data *subdir;
+
if (dir->monitor) eio_monitor_del(dir->monitor);
 
+   list = elm_genlist_item_subitems_get(parent_it);
+   EINA_LIST_FOREACH(list, l, subit)
+ {
+subdir = elm_object_item_data_get(subit);
+eina_hash_del(_list_items, subdir->path, NULL);
+ }
elm_genlist_item_subitems_clear(parent_it);
 }
 

-- 




[EGIT] [core/efl] master 01/01: elm_code: Add a safety code to prevent arithmetic exception

2017-01-28 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 694c16ab2bfbb67f535e3475d358fdb41ddf8be1
Author: YeongJong Lee <clean...@naver.com>
Date:   Sat Jan 28 12:38:37 2017 +

elm_code: Add a safety code to prevent arithmetic exception

Test Plan:
1. elementary_test - Code Editor
2. Chack there is not arithmetic exception

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

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

diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index fe91214..98799d5 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1841,6 +1841,9 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
if (!pd->code)
  return;
 
+   if (!pd->code->file->lines)
+ return;
+
evas_object_geometry_get(widget, NULL, NULL, , );
 
old_width = ww;

-- 




[EGIT] [tools/edi] master 01/01: autosuggest: Fix segment fault when type long word

2017-01-13 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=1c3474245a70548ec3a3993dac963fd7d8e0687e

commit 1c3474245a70548ec3a3993dac963fd7d8e0687e
Author: YeongJong Lee <clean...@naver.com>
Date:   Fri Jan 13 11:38:26 2017 +

autosuggest: Fix segment fault when type long word

Summary:
It need a space more for adding a charater.
e.g. line 434..

Test Plan:
1. open suggest list in code file using  + .
2. type some long word.
e.g. 'evas_object_smart_callback_add'
3. Check there is no segment fault.

Reviewers: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4562
---
 src/bin/editor/edi_editor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 23096b8..a7132c3 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -92,10 +92,10 @@ _edi_editor_current_word_get(Edi_Editor *editor, unsigned 
int row, unsigned int
   *(ptr - 1) == '_'))
  ptr--;
 
-   wordlen = col - (ptr - curtext) - 1;
+   wordlen = col - (ptr - curtext);
curword = malloc(sizeof(char) * (wordlen + 1));
strncpy(curword, ptr, wordlen);
-   curword[wordlen] = '\0';
+   curword[wordlen - 1] = '\0';
 
return curword;
 }

-- 




[EGIT] [core/efl] master 01/01: elm_code: Add 2 spaces auto indent after keywords

2017-01-06 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 13730d7a75fddc0c086c6da2e86e3509c6935156
Author: YeongJong Lee <clean...@naver.com>
Date:   Fri Jan 6 09:38:02 2017 +

elm_code: Add 2 spaces auto indent after keywords

Summary:
When insert newline, check the previous line has keyword.
If so, insert 2 spaces indent more.

Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with keywords.
3. Type .
4. Check that the indentation of newline is correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4543
---
 src/lib/elementary/elm_code_indent.c| 37 ++-
 src/tests/elementary/elm_code_test_indent.c | 39 -
 2 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_code_indent.c 
b/src/lib/elementary/elm_code_indent.c
index 6709749..c76ffb6 100644
--- a/src/lib/elementary/elm_code_indent.c
+++ b/src/lib/elementary/elm_code_indent.c
@@ -2,10 +2,38 @@
 # include "elementary_config.h"
 #endif
 
+#include "regex.h"
 #include "Elementary.h"
 
 #include "elm_code_private.h"
 
+static Eina_Bool
+elm_code_line_indent_startswith_keyword(Elm_Code_Line *line)
+{
+   regex_t regex;
+   char *text;
+   Eina_Bool ret;
+   unsigned int textlen;
+
+   text = (char *)elm_code_line_text_get(line, );
+   text = strndup(text, textlen);
+
+   regcomp(, "^\\s*("
+   "((if|else\\s*if|while|for|switch)\\s*\\(.*\\)\\s*\\{?)|"
+   "((else|do)\\s*\\{?)|"
+   "(case\\s+.+:)|"
+   "(default:)"
+   ")\\s*$", REG_EXTENDED | REG_NOSUB);
+
+   ret = regexec(, text, 0, NULL, 0);
+   free(text);
+
+   if (ret == 0)
+ return EINA_TRUE;
+   else
+ return EINA_FALSE;
+}
+
 EAPI char *
 elm_code_line_indent_get(Elm_Code_Line *line)
 {
@@ -22,7 +50,7 @@ elm_code_line_indent_get(Elm_Code_Line *line)
prevtext = elm_code_line_text_get(prevline, );
 
ptr = (char *)prevtext;
-   buf = malloc((prevlength + 3) * sizeof(char));
+   buf = malloc((prevlength + 5) * sizeof(char));
while (count < prevlength)
  {
 if (!_elm_code_text_char_is_whitespace(*ptr))
@@ -34,6 +62,13 @@ elm_code_line_indent_get(Elm_Code_Line *line)
 
strncpy(buf, prevtext, count);
buf[count] = '\0';
+
+   if (elm_code_line_indent_startswith_keyword(prevline))
+ {
+strcpy(buf + count, "  ");
+count += 2;
+ }
+
if (count < prevlength)
  {
 next = *ptr;
diff --git a/src/tests/elementary/elm_code_test_indent.c 
b/src/tests/elementary/elm_code_test_indent.c
index bacc522..9a35b7c 100644
--- a/src/tests/elementary/elm_code_test_indent.c
+++ b/src/tests/elementary/elm_code_test_indent.c
@@ -75,7 +75,7 @@ START_TEST (elm_code_indent_simple_braces)
code = elm_code_create();
file = elm_code_file_new(code);
 
-   _indent_check(file, "if() {", "   ");
+   _indent_check(file, "if() {", " ");
_indent_check(file, "}", "");
 
_indent_check(file, "  {", " ");
@@ -125,10 +125,47 @@ START_TEST (elm_code_indent_matching_braces)
 }
 END_TEST
 
+START_TEST (elm_code_indent_startswith_keyword)
+{
+   Elm_Code_File *file;
+   Elm_Code *code;
+
+   elm_init(1, NULL);
+   code = elm_code_create();
+   file = elm_code_file_new(code);
+
+   _indent_check(file, "if ()", "  ");
+   _indent_check(file, "else", "  ");
+   _indent_check(file, "else if ()", "  ");
+   _indent_check(file, "for ()", "  ");
+   _indent_check(file, "while ()", "  ");
+   _indent_check(file, "do", "  ");
+   _indent_check(file, "do {", " ");
+
+   _indent_check(file, "  switch ()", "");
+   _indent_check(file, "   case a:", " ");
+   _indent_check(file, "   default:", " ");
+
+   _indent_check(file, "if ();", "");
+   _indent_check(file, "  for ();", "  ");
+
+   _indent_check(file, "  iffy()", "  ");
+   _indent_check(file, "  fi()", "  ");
+   _indent_check(file, "  elihw", "  ");
+
+   _indent_check(file, "   if", "   ");
+   _indent_check(file, "   while", "   ");
+
+   elm_code_free(code);
+   elm_shutdown();
+}
+END_TEST
+
 void elm_code_test_indent(TCase *tc)
 {
tcase_add_test(tc, elm_code_indent_whitespace_test);
tcase_add_test(tc, elm_code_indent_comments_test);
tcase_add_test(tc, elm_code_indent_simple_braces);
tcase_add_test(tc, elm_code_indent_matching_braces);
+   tcase_add_test(tc, elm_code_indent_startswith_keyword);
 }

-- 




[EGIT] [core/efl] master 01/01: elm_code: refactor auto indent about brace matching

2017-01-01 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

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

commit 65dc673ae820e6d57bde061f1a542b66ab63a2b8
Author: YeongJong Lee <clean...@naver.com>
Date:   Sun Jan 1 14:29:43 2017 +

elm_code: refactor auto indent about brace matching

Summary: return value of brace matching function no longer need free().

Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with braces.
3. Check that closing brace has correct indent.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4540
---
 src/lib/elementary/elm_code_indent.c| 35 -
 src/lib/elementary/elm_code_indent.h|  2 +-
 src/lib/elementary/elm_code_widget.c| 29 
 src/tests/elementary/elm_code_test_indent.c | 21 -
 4 files changed, 40 insertions(+), 47 deletions(-)

diff --git a/src/lib/elementary/elm_code_indent.c 
b/src/lib/elementary/elm_code_indent.c
index 70b66cd..6709749 100644
--- a/src/lib/elementary/elm_code_indent.c
+++ b/src/lib/elementary/elm_code_indent.c
@@ -79,30 +79,34 @@ elm_code_line_indent_get(Elm_Code_Line *line)
return buf;
 }
 
-EAPI char *
-elm_code_line_indent_matching_braces_get(Elm_Code_Line *line)
+EAPI const char *
+elm_code_line_indent_matching_braces_get(Elm_Code_Line *line, unsigned int 
*length)
 {
Elm_Code_File *file;
int stack, row;
-   unsigned int length, count = 0;
-   const char *content;
-   char *buf, *ptr;
+   unsigned int len_tmp, count = 0;
+   const char *content, *ptr;
 
file = line->file;
stack = 0;
row = line->number - 1;
+   *length = 0;
+
while (row > 0)
  {
 line = elm_code_file_line_get(file, row);
-content = elm_code_line_text_get(line, );
-if (memchr(content, '{', length)) stack--;
-else if (memchr(content, '}', length)) stack++;
+content = elm_code_line_text_get(line, _tmp);
+
+if (memchr(content, '{', len_tmp)) stack--;
+else if (memchr(content, '}', len_tmp)) stack++;
 
 if (stack < 0)
   {
- if (length == 0) return strdup("");
- ptr = (char *)content;
- while (count < length)
+ if (len_tmp == 0)
+   return "";
+
+ ptr = content;
+ while (count < len_tmp)
{
   if (!_elm_code_text_char_is_whitespace(*ptr))
 break;
@@ -110,12 +114,11 @@ elm_code_line_indent_matching_braces_get(Elm_Code_Line 
*line)
   count++;
   ptr++;
}
- buf = malloc(sizeof(char) * (count + 1));
- memset(buf, ' ', count);
- buf[count] = '\0';
- return buf;
+
+ *length = count;
+ return content;
   }
 row--;
  }
-   return strdup("");
+   return "";
 }
diff --git a/src/lib/elementary/elm_code_indent.h 
b/src/lib/elementary/elm_code_indent.h
index 41eaccd..b00ac3d 100644
--- a/src/lib/elementary/elm_code_indent.h
+++ b/src/lib/elementary/elm_code_indent.h
@@ -22,7 +22,7 @@ extern "C" {
 
 EAPI char *elm_code_line_indent_get(Elm_Code_Line *line);
 
-EAPI char *elm_code_line_indent_matching_braces_get(Elm_Code_Line *line);
+EAPI const char *elm_code_line_indent_matching_braces_get(Elm_Code_Line *line, 
unsigned int *length);
 
 /**
  * @}
diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index c9baadd..3bdb665 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1261,8 +1261,8 @@ _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget 
*widget, const char *t
Elm_Code *code;
Elm_Code_Line *line;
Elm_Code_Widget_Change_Info *change;
-   unsigned int row, col, position, col_width, curlen, indent, count;
-   char *curtext, *leading;
+   unsigned int row, col, position, col_width, curlen, indent;
+   const char *curtext, *indent_text;
 
_elm_code_widget_delete_selection(widget);
code = elm_obj_code_widget_code_get(widget);
@@ -1276,29 +1276,18 @@ 
_elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget *widget, const char *t
  }
if (text[0] == '}')
  {
-curtext = (char *)elm_code_line_text_get(line, );
+curtext = elm_code_line_text_get(line, );
 
-count = 0;
-while (count < curlen)
+if (elm_code_text_is_whitespace(curtext, line->length))
   {
- if (*curtext != ' ' && *curtext != '\t')
-   break;
-
- count++;
- curtext++;
-  }
-
-if (count + 1 == col)
-  {
- leading = elm_code_line_indent_matching_bra

[EGIT] [tools/edi] master 01/01: autosuggest: Fix position when the suggest list is hidden.

2017-01-01 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=73d86702471d7c304dde040697c95e24bafced5c

commit 73d86702471d7c304dde040697c95e24bafced5c
Author: YeongJong Lee <clean...@naver.com>
Date:   Sun Jan 1 14:24:21 2017 +

autosuggest: Fix position when the suggest list is hidden.

Summary: Remove some unnecessary function.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4539
---
 src/bin/editor/edi_editor.c| 34 ++
 src/bin/editor/edi_editor_suggest_provider_c.c |  9 +--
 2 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 1d79d34..5422c2e 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -122,7 +122,7 @@ _suggest_list_content_get(void *data, Evas_Object *obj, 
const char *part)
elm_code_widget_font_get(editor->entry, , _size);
 
summary = edi_editor_suggest_provider_get(editor)->summary_get(editor, 
suggest_it);
-   format = "

[EGIT] [tools/edi] master 01/01: update AUTHORS.

2016-12-29 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=76d00512f5e9cfa7f8eecd3dbfbdcc6fc0562800

commit 76d00512f5e9cfa7f8eecd3dbfbdcc6fc0562800
Author: YeongJong Lee <clean...@naver.com>
Date:   Thu Dec 29 18:09:15 2016 +

update AUTHORS.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4523
---
 AUTHORS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AUTHORS b/AUTHORS
index 0cadb21..86b70eb 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,6 @@
 ajwillia.ms (Andy Williams) <a...@andywilliams.me>
 wilsonk (Kelly Wilson)  <wils...@cpsc.ucalgary.ca>
+YOhoho  (YeongJong Lee) <clean...@naver.com>
 
 Windows compatibility thanks to Vincent Torri <vincent.to...@gmail.com>
 Icon created by The Rasterman (Carsten Haitzler) <ras...@rasterman.com>

-- 




[EGIT] [tools/edi] master 01/01: editor_doc: Add documentation finding support using libclang

2016-12-28 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=e4af7c18a9bbfc6e92661e9ff572b4c6233d24c0

commit e4af7c18a9bbfc6e92661e9ff572b4c6233d24c0
Author: YeongJong Lee <clean...@naver.com>
Date:   Wed Dec 28 23:22:46 2016 +

editor_doc: Add documentation finding support using libclang

Summary:
 +  opens document. This find doxygen comment using libclang 
and
dump each tags.
Now, it just support functions.

Test Plan:
1. Open document using  + .
2. Check that the document is correct.

Reviewers: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4522
---
 src/bin/Makefile.am   |   1 +
 src/bin/editor/edi_editor.c   |  13 +-
 src/bin/editor/edi_editor.h   |  11 +
 src/bin/editor/edi_editor_documentation.c | 461 ++
 4 files changed, 477 insertions(+), 9 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 2e74628..85f5586 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -37,6 +37,7 @@ edi_config.c \
 editor/edi_editor_search.c \
 editor/edi_editor_suggest_provider.c \
 editor/edi_editor.c \
+editor/edi_editor_documentation.c \
 edi_content_provider.c \
 screens/edi_welcome.c \
 screens/edi_about.c \
diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 23321ae..1d79d34 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -907,6 +907,9 @@ _unfocused_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UN
 
if (editor->suggest_bg)
  evas_object_hide(editor->suggest_bg);
+
+   if (editor->doc_popup && evas_object_visible_get(editor->doc_popup))
+ evas_object_del(editor->doc_popup);
 }
 
 static void
@@ -914,7 +917,6 @@ _mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  void *event_info)
 {
Edi_Editor *editor;
-   Evas_Object *popup;
Evas_Event_Mouse_Up *event;
Eina_Bool ctrl;
unsigned int row;
@@ -937,14 +939,7 @@ _mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
if (!word || !strlen(word))
  return;
 
-   popup = elm_popup_add(editor->entry);
-   elm_popup_timeout_set(popup,1.5);
-
-   elm_object_style_set(popup, "transparent");
-   elm_object_part_text_set(popup, "title,text", word);
-   elm_object_text_set(popup, "No help available for this term");
-
-   evas_object_show(popup);
+   edi_editor_doc_open(editor);
 }
 
 static void
diff --git a/src/bin/editor/edi_editor.h b/src/bin/editor/edi_editor.h
index 4b74930..7dc8fe7 100644
--- a/src/bin/editor/edi_editor.h
+++ b/src/bin/editor/edi_editor.h
@@ -3,6 +3,7 @@
 
 #if HAVE_LIBCLANG
 #include 
+#include 
 #endif
 #include 
 
@@ -40,6 +41,7 @@ struct _Edi_Editor
Evas_Object *entry; /**< The main text entry widget for the editor */
Evas_Object *suggest_bg; /**< The autosuggest background */
Evas_Object *suggest_genlist; /**< The autosuggest genlist */
+   Evas_Object *doc_popup; /**< The popup for documentation */
Eina_List *undo_stack; /**< The list of operations that can be undone */
 
/* Private */
@@ -127,6 +129,15 @@ void edi_editor_search(Edi_Editor *editor);
 void edi_editor_save(Edi_Editor *editor);
 
 /**
+ * Open the document of the entity where the cursor is located.
+ *
+ * @param editor the text editor instance to open document.
+ *
+ * @ingroup Widgets
+ */
+void edi_editor_doc_open(Edi_Editor *editor);
+
+/**
  * @}
  */
 
diff --git a/src/bin/editor/edi_editor_documentation.c 
b/src/bin/editor/edi_editor_documentation.c
new file mode 100644
index 000..92fa2fc
--- /dev/null
+++ b/src/bin/editor/edi_editor_documentation.c
@@ -0,0 +1,461 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include 
+#include 
+
+#include "edi_editor.h"
+#include "edi_private.h"
+
+typedef struct
+{
+   Eina_Strbuf *title;
+   Eina_Strbuf *detail;
+   Eina_Strbuf *param;
+   Eina_Strbuf *ret;
+   Eina_Strbuf *see;
+} Edi_Document;
+
+static void
+_edi_doc_free(Edi_Document *doc)
+{
+   if (!doc) return;
+
+   eina_strbuf_free(doc->title);
+   eina_strbuf_free(doc->detail);
+   eina_strbuf_free(doc->param);
+   eina_strbuf_free(doc->ret);
+   eina_strbuf_free(doc->see);
+}
+
+#if HAVE_LIBCLANG
+static void
+_edi_doc_init(Edi_Document *doc)
+{
+   doc->title = eina_strbuf_new();
+   doc->detail = eina_strbuf_new();
+   doc->param = eina_strbuf_new();
+   doc->ret = eina_strbuf_new();
+   doc->see = eina_strbuf_new();
+}
+
+static Eina_Bool
+_edi_doc_newline_check(Eina_Strbuf *strbuf)
+{
+   const char *str;
+
+   str = eina_strbuf_string_get(strbuf);
+
+   if (strlen(str) < 4)
+ return EINA_TRUE;
+
+   str = str + strlen(str) - 4;
+
+   if (!strcmp(str, ""))
+ return EINA_FALSE;
+ 

[EGIT] [tools/edi] master 01/01: autosuggest: One editor has one suggest evas object

2016-12-23 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=f9b8129724399c46799bbc3c6b6797883f3e635a

commit f9b8129724399c46799bbc3c6b6797883f3e635a
Author: YeongJong Lee <clean...@naver.com>
Date:   Fri Dec 23 10:05:33 2016 +

autosuggest: One editor has one suggest evas object

Summary:
Remove unnecessary global variable.

This commit also fix bug that using autosuggest( + ) occurs
segment fault in non-code file.

Test Plan:
1. Run Edi.
2. Open project.
3. Open non-code file (e.g. README).
4. Call suggest list using  + .
5. Check that there is not segment fault.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4509
---
 src/bin/editor/edi_editor.c | 130 +++-
 src/bin/editor/edi_editor.h |   3 +
 2 files changed, 71 insertions(+), 62 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index b845148..be7fa06 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -36,7 +36,7 @@ typedef struct
Eina_Bool is_param_cand;
 } Suggest_Item;
 
-static Evas_Object *_suggest_popup_bg, *_suggest_popup_genlist;
+static void _suggest_popup_show(Edi_Editor *editor);
 #endif
 
 void
@@ -225,16 +225,16 @@ _suggest_list_cb_selected(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_
 }
 
 static void
-_suggest_list_update(char *word)
+_suggest_list_update(Edi_Editor *editor, char *word)
 {
Suggest_Item *suggest_it;
Eina_List *list, *l;
Elm_Genlist_Item_Class *ic;
Elm_Object_Item *item;
 
-   elm_genlist_clear(_suggest_popup_genlist);
+   elm_genlist_clear(editor->suggest_genlist);
 
-   list = (Eina_List *)evas_object_data_get(_suggest_popup_genlist,
+   list = (Eina_List *)evas_object_data_get(editor->suggest_genlist,
 "suggest_list");
ic = elm_genlist_item_class_new();
ic->item_style = "full";
@@ -244,7 +244,7 @@ _suggest_list_update(char *word)
  {
 if (eina_str_has_prefix(suggest_it->name, word))
   {
- elm_genlist_item_append(_suggest_popup_genlist,
+ elm_genlist_item_append(editor->suggest_genlist,
  ic,
  suggest_it,
  NULL,
@@ -255,14 +255,15 @@ _suggest_list_update(char *word)
  }
elm_genlist_item_class_free(ic);
 
-   item = elm_genlist_first_item_get(_suggest_popup_genlist);
+   item = elm_genlist_first_item_get(editor->suggest_genlist);
if (item)
  {
 elm_genlist_item_selected_set(item, EINA_TRUE);
 elm_genlist_item_show(item, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+_suggest_popup_show(editor);
  }
else
- evas_object_hide(_suggest_popup_bg);
+ evas_object_hide(editor->suggest_bg);
 }
 
 static void
@@ -276,7 +277,10 @@ _suggest_list_set(Edi_Editor *editor)
unsigned int row, col;
Eina_List *list = NULL;
 
-   list = (Eina_List *)evas_object_data_get(_suggest_popup_genlist,
+   if (!editor->as_unit)
+ return;
+
+   list = (Eina_List *)evas_object_data_get(editor->suggest_genlist,
 "suggest_list");
if (list)
  {
@@ -286,7 +290,7 @@ _suggest_list_set(Edi_Editor *editor)
   _suggest_item_free(suggest_it);
 
 list = NULL;
-evas_object_data_del(_suggest_popup_genlist, "suggest_list");
+evas_object_data_del(editor->suggest_genlist, "suggest_list");
  }
 
elm_code_widget_cursor_position_get(editor->entry, , );
@@ -358,8 +362,8 @@ _suggest_list_set(Edi_Editor *editor)
 
clang_disposeCodeCompleteResults(res);
 
-   evas_object_data_set(_suggest_popup_genlist, "suggest_list", list);
-   _suggest_list_update(curword);
+   evas_object_data_set(editor->suggest_genlist, "suggest_list", list);
+   _suggest_list_update(editor, curword);
free(curword);
 }
 
@@ -387,12 +391,14 @@ _suggest_list_selection_insert(Edi_Editor *editor, const 
char *selection)
 }
 
 static void
-_suggest_bg_cb_hide(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
+_suggest_bg_cb_hide(void *data, Evas *e EINA_UNUSED,
 Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
Eina_List *list = NULL;
+   Edi_Editor *editor;
 
-   list = (Eina_List *)evas_object_data_get(_suggest_popup_genlist,
+   editor = (Edi_Editor *)data;
+   list = (Eina_List *)evas_object_data_get(editor->suggest_genlist,
 "suggest_list");
if (list)
  {
@@ -402,11 +408,11 @@ _suggest_bg_cb_hide(void *data EINA_UNUSED, Evas *e 
EINA_UNUSED,
   _suggest_item_free(suggest_it);
 
 list = NULL;
-evas_

[EGIT] [tools/edi] master 01/01: autosuggest: Support detail of suggest

2016-12-22 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=0866448895daeed7ca2ad5d6716a039151422a0b

commit 0866448895daeed7ca2ad5d6716a039151422a0b
Author: YeongJong Lee <clean...@naver.com>
Date:   Thu Dec 22 10:45:25 2016 +

autosuggest: Support detail of suggest

Summary: The suggest list shows detail of suggest.(return type and 
parameter)

Test Plan:
1. Run edi.
2. Open project.
3. Open suggest list using  + .
4. Check that The detail of suggest is correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4505
---
 src/bin/editor/edi_editor.c | 359 
 src/bin/editor/edi_editor.h |   3 +
 2 files changed, 270 insertions(+), 92 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 3079e86..0a33dba 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -27,6 +27,15 @@ typedef struct
 } Edi_Range;
 
 #if HAVE_LIBCLANG
+typedef struct
+{
+   enum CXCursorKind kind;
+   char *ret;
+   char *name;
+   char *param;
+   Eina_Bool is_param_cand;
+} Suggest_Item;
+
 static Evas_Object *_suggest_popup_bg, *_suggest_popup_genlist;
 #endif
 
@@ -69,7 +78,7 @@ _changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUS
 }
 
 #if HAVE_LIBCLANG
-static char*
+static char *
 _edi_editor_current_word_get(Edi_Editor *editor, unsigned int row, unsigned 
int col)
 {
Elm_Code *code;
@@ -98,13 +107,58 @@ _edi_editor_current_word_get(Edi_Editor *editor, unsigned 
int row, unsigned int
return curword;
 }
 
+static char *
+_suggest_item_return_get(Suggest_Item *item)
+{
+   char *ret_str;
+   int retlen;
+
+   if (item->ret)
+ {
+retlen = strlen(item->ret) + 6;
+ret_str = malloc(sizeof(char) * retlen);
+snprintf(ret_str, retlen, " %s", item->ret);
+ }
+   else
+ ret_str = strdup("");
+
+   return ret_str;
+}
+
+static char *
+_suggest_item_parameter_get(Suggest_Item *item)
+{
+   char *param_str;
+   int paramlen;
+
+   if (item->param)
+ {
+paramlen = strlen(item->param) + 6;
+param_str = malloc(sizeof(char) * paramlen);
+snprintf(param_str, paramlen, "%s", item->param);
+ }
+   else
+ param_str = strdup("");
+
+   return param_str;
+}
+
+static void
+_suggest_item_free(Suggest_Item *item)
+{
+   if (item->ret) free(item->ret);
+   if (item->name) free(item->name);
+   if (item->param) free(item->param);
+   free(item);
+}
+
 static Evas_Object *
 _suggest_list_content_get(void *data, Evas_Object *obj, const char *part)
 {
Edi_Editor *editor;
Edi_Mainview_Item *item;
-   Evas_Object *label;
-   char *format, *display, *auto_str = data;
+   Suggest_Item *suggest_it = data;
+   char *format, *display;
const char *font;
int font_size, displen;
 
@@ -120,15 +174,14 @@ _suggest_list_content_get(void *data, Evas_Object *obj, 
const char *part)
elm_code_widget_font_get(editor->entry, , _size);
 
format = "

[EGIT] [tools/edi] master 01/01: autosuggest: Change the variable name from 'autocomplete' to 'suggest' for readability.

2016-12-19 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=284c7ff3caa9c7e75103c6bb8b1195b2f1f6c2e2

commit 284c7ff3caa9c7e75103c6bb8b1195b2f1f6c2e2
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Dec 19 23:25:01 2016 +

autosuggest: Change the variable name from 'autocomplete' to 'suggest' for 
readability.

Summary:
Change the variable name from 'autocomplete' to 'suggest'.
Because 'autocomplete' is too long.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4496
---
 src/bin/editor/edi_editor.c | 137 +---
 1 file changed, 65 insertions(+), 72 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 78efcb2..3079e86 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -27,7 +27,7 @@ typedef struct
 } Edi_Range;
 
 #if HAVE_LIBCLANG
-static Evas_Object *_clang_autocomplete_popup_bg, 
*_clang_autocomplete_popup_genlist;
+static Evas_Object *_suggest_popup_bg, *_suggest_popup_genlist;
 #endif
 
 void
@@ -99,7 +99,7 @@ _edi_editor_current_word_get(Edi_Editor *editor, unsigned int 
row, unsigned int
 }
 
 static Evas_Object *
-_autocomplete_list_content_get(void *data, Evas_Object *obj, const char *part)
+_suggest_list_content_get(void *data, Evas_Object *obj, const char *part)
 {
Edi_Editor *editor;
Edi_Mainview_Item *item;
@@ -136,26 +136,26 @@ _autocomplete_list_content_get(void *data, Evas_Object 
*obj, const char *part)
 }
 
 static void
-_autocomplete_list_update(char *word)
+_suggest_list_update(char *word)
 {
Eina_List *list, *l;
Elm_Genlist_Item_Class *ic;
Elm_Object_Item *item;
char *auto_str;
 
-   elm_genlist_clear(_clang_autocomplete_popup_genlist);
+   elm_genlist_clear(_suggest_popup_genlist);
 
-   list = (Eina_List *)evas_object_data_get(_clang_autocomplete_popup_genlist,
-"autocomplete_list");
+   list = (Eina_List *)evas_object_data_get(_suggest_popup_genlist,
+"suggest_list");
ic = elm_genlist_item_class_new();
ic->item_style = "full";
-   ic->func.content_get = _autocomplete_list_content_get;
+   ic->func.content_get = _suggest_list_content_get;
 
EINA_LIST_FOREACH(list, l, auto_str)
  {
 if (eina_str_has_prefix(auto_str, word))
   {
- elm_genlist_item_append(_clang_autocomplete_popup_genlist,
+ elm_genlist_item_append(_suggest_popup_genlist,
  ic,
  auto_str,
  NULL,
@@ -166,15 +166,15 @@ _autocomplete_list_update(char *word)
  }
elm_genlist_item_class_free(ic);
 
-   item = elm_genlist_first_item_get(_clang_autocomplete_popup_genlist);
+   item = elm_genlist_first_item_get(_suggest_popup_genlist);
if (item)
  elm_genlist_item_selected_set(item, EINA_TRUE);
else
- evas_object_hide(_clang_autocomplete_popup_bg);
+ evas_object_hide(_suggest_popup_bg);
 }
 
 static void
-_autocomplete_list_set(Edi_Editor *editor)
+_suggest_list_set(Edi_Editor *editor)
 {
Elm_Code *code;
CXIndex idx;
@@ -186,16 +186,15 @@ _autocomplete_list_set(Edi_Editor *editor)
unsigned int clang_argc, row, col;
Eina_List *list = NULL;
 
-   list = (Eina_List *)evas_object_data_get(_clang_autocomplete_popup_genlist,
-"autocomplete_list");
+   list = (Eina_List *)evas_object_data_get(_suggest_popup_genlist,
+"suggest_list");
if (list)
  {
 char *temp_str;
 EINA_LIST_FREE(list, temp_str)
   free(temp_str);
 list = NULL;
-evas_object_data_del(_clang_autocomplete_popup_genlist,
- "autocomplete_list");
+evas_object_data_del(_suggest_popup_genlist, "suggest_list");
  }
 
elm_code_widget_cursor_position_get(editor->entry, , );
@@ -248,37 +247,35 @@ _autocomplete_list_set(Edi_Editor *editor)
clang_disposeTranslationUnit(tx_unit);
clang_disposeIndex(idx);
 
-   evas_object_data_set(_clang_autocomplete_popup_genlist,
-"autocomplete_list", list);
-   _autocomplete_list_update(curword);
+   evas_object_data_set(_suggest_popup_genlist, "suggest_list", list);
+   _suggest_list_update(curword);
free(curword);
 }
 
 static void
-_autocomplete_bg_cb_hide(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
- Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_suggest_bg_cb_hide(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
+Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {

[EGIT] [tools/edi] master 01/01: filelist: Check that the filelist has same file before insertion.

2016-12-19 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=21ae2bfebdbdfdc458dd10df49a34ca42f8e983b

commit 21ae2bfebdbdfdc458dd10df49a34ca42f8e983b
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Dec 19 23:08:55 2016 +

filelist: Check that the filelist has same file before insertion.

Summary:
'elm_code_file_save' emit EIO_MONITOR_FILE_CREATED event.
It occurs filelist duplication.
So Check that the filelist has same file before insertion.

Test Plan:
1. Run Edi.
2. Open project.
3. Edit a file.
4. Save the file.
5. Check that the filelist doesn't have same file.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4497
---
 src/bin/edi_filepanel.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c
index 0c6ff7f..b92bc94 100644
--- a/src/bin/edi_filepanel.c
+++ b/src/bin/edi_filepanel.c
@@ -352,6 +352,7 @@ _file_listing_item_insert(const char *path, Eina_Bool 
isdir, Elm_Object_Item *pa
 {
Elm_Genlist_Item_Class *clas = 
Edi_Dir_Data *sd;
+   Elm_Object_Item *it;
 
sd = calloc(1, sizeof(Edi_Dir_Data));
if (isdir)
@@ -361,6 +362,11 @@ _file_listing_item_insert(const char *path, Eina_Bool 
isdir, Elm_Object_Item *pa
  }
 
sd->path = eina_stringshare_add(path);
+   it = elm_genlist_search_by_text_item_get(list, NULL, "elm.text",
+basename((char *)sd->path),
+ELM_GLOB_MATCH_NO_ESCAPE);
+   if (it) return;
+
(void)!elm_genlist_item_sorted_insert(list, clas, sd, parent_it,
  isdir ? ELM_GENLIST_ITEM_TREE : 
ELM_GENLIST_ITEM_NONE,
  _file_list_cmp, _item_sel, sd);

-- 




[EGIT] [tools/edi] master 01/01: autocomplete: fix screen flicker when use autocomplete

2016-12-16 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=8d82796fa1c58d93f247a91561555285559171db

commit 8d82796fa1c58d93f247a91561555285559171db
Author: YeongJong Lee <clean...@naver.com>
Date:   Fri Dec 16 21:05:39 2016 +

autocomplete: fix screen flicker when use autocomplete

Summary: Remove file save function when initialize clang.

Test Plan: Check that the screen is not blinking when use autocomplete.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4486
---
 src/bin/editor/edi_editor.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 8948081..86c0536 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -178,6 +178,7 @@ _autocomplete_list_set(Edi_Editor *editor)
CXIndex idx;
CXTranslationUnit tx_unit;
CXCodeCompleteResults *res;
+   struct CXUnsavedFile unsaved_file;
char *curword, **clang_argv;
const char *path, *args;
unsigned int clang_argc, row, col;
@@ -195,7 +196,6 @@ _autocomplete_list_set(Edi_Editor *editor)
  "autocomplete_list");
  }
 
-   edi_editor_save(editor);
elm_code_widget_cursor_position_get(editor->entry, , );
 
code = elm_code_widget_code_get(editor->entry);
@@ -208,13 +208,19 @@ _autocomplete_list_set(Edi_Editor *editor)
clang_argv = eina_str_split_full(args, " ", 0, _argc);
 
idx = clang_createIndex(0, 0);
+
+   unsaved_file.Filename = path;
+   unsaved_file.Contents = elm_code_widget_text_between_positions_get(
+ editor->entry, 1, 1, col, 
row);
+   unsaved_file.Length = strlen(unsaved_file.Contents);
/* FIXME: Possibly activate more options? */
tx_unit = clang_parseTranslationUnit(idx, path,
 (const char *const *)clang_argv,
-(int)clang_argc, NULL, 0,
+(int)clang_argc, _file, 1,
 CXTranslationUnit_PrecompiledPreamble);
clang_reparseTranslationUnit(tx_unit, 0, 0, 0);
-   res = clang_codeCompleteAt(tx_unit, path, row, col - strlen(curword), NULL, 
0,
+   res = clang_codeCompleteAt(tx_unit, path, row, col - strlen(curword),
+  _file, 1,
   CXCodeComplete_IncludeMacros |
   CXCodeComplete_IncludeCodePatterns);
 

-- 




[EGIT] [tools/edi] master 01/01: autocomplete: Refresh candidate list when typing.

2016-12-12 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=9d128bdb40e02cd172afb0203ce3aa22cc62e3e0

commit 9d128bdb40e02cd172afb0203ce3aa22cc62e3e0
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Dec 13 07:42:36 2016 +

autocomplete: Refresh candidate list when typing.

Summary:
if you start typing when candidate list is shown,
the list refresh immediately.

Test Plan:
1. Run edi.
2. Open project.
3. Open candidate list using  + .
4. Continue typing.
5. Check the candidate list is correct.

Reviewers: bu5hm4n, ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4478
---
 src/bin/editor/edi_editor.c | 376 
 1 file changed, 275 insertions(+), 101 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 6282b17..8948081 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -26,7 +26,7 @@ typedef struct
Edi_Location end;
 } Edi_Range;
 
-static Evas_Object *_clang_autocomplete_popup_bg;
+static Evas_Object *_clang_autocomplete_popup_bg, 
*_clang_autocomplete_popup_genlist;
 
 void
 edi_editor_save(Edi_Editor *editor)
@@ -68,14 +68,12 @@ _changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUS
 
 #if HAVE_LIBCLANG
 static char*
-_edi_editor_current_word_get(Edi_Editor *editor)
+_edi_editor_current_word_get(Edi_Editor *editor, unsigned int row, unsigned 
int col)
 {
Elm_Code *code;
Elm_Code_Line *line;
char *ptr, *curword, *curtext;
-   unsigned int curlen, col, row, wordlen;
-
-   elm_obj_code_widget_cursor_position_get(editor->entry, , );
+   unsigned int curlen, wordlen;
 
code = elm_code_widget_code_get(editor->entry);
line = elm_code_file_line_get(code->file, row);
@@ -98,62 +96,6 @@ _edi_editor_current_word_get(Edi_Editor *editor)
return curword;
 }
 
-static void
-_autocomplete_list_cb_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
-   Evas_Object *obj, void *event_info)
-{
-   Edi_Mainview_Item *item;
-   Edi_Editor *editor;
-   Elm_Code *code;
-   Elm_Code_Line *line;
-   Evas_Event_Key_Down *ev = event_info;
-   char *word;
-   const char *list_word;
-   unsigned int wordlen, col, row;
-
-   item = edi_mainview_item_current_get();
-
-   if (!item)
- return;
-
-   editor = (Edi_Editor *)evas_object_data_get(item->view, "editor");
-
-   elm_code_widget_cursor_position_get(editor->entry, , );
-
-   code = elm_code_widget_code_get(editor->entry);
-   line = elm_code_file_line_get(code->file, row);
-
-   if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "Up"))
- return;
-   else if (!strcmp(ev->key, "Return"))
- {
-Elm_Object_Item *it;
-
-word = _edi_editor_current_word_get(editor);
-wordlen = strlen(word);
-free(word);
-
-elm_code_line_text_remove(line, col - wordlen - 1, wordlen);
-it = elm_genlist_selected_item_get(obj);
-list_word = elm_object_item_data_get(it);
-
-elm_code_line_text_insert(line, col - wordlen - 1,
-  list_word, strlen(list_word));
-elm_code_widget_cursor_position_set(editor->entry, row,
-  col - wordlen + strlen(list_word));
- }
-
-   evas_object_del(_clang_autocomplete_popup_bg);
-}
-
-static void
-_autocomplete_list_cb_focus(void *data EINA_UNUSED,
-Evas_Object *obj EINA_UNUSED, void *event_info)
-{
-   Elm_Object_Item *it = event_info;
-   elm_genlist_item_selected_set(it, EINA_TRUE);
-}
-
 static Evas_Object *
 _autocomplete_list_content_get(void *data, Evas_Object *obj, const char *part)
 {
@@ -192,14 +134,45 @@ _autocomplete_list_content_get(void *data, Evas_Object 
*obj, const char *part)
 }
 
 static void
-_autocomplete_list_del(void *data, Evas_Object *obj EINA_UNUSED)
+_autocomplete_list_update(char *word)
 {
-   char *auto_str = data;
-   free(auto_str);
+   Eina_List *list, *l;
+   Elm_Genlist_Item_Class *ic;
+   Elm_Object_Item *item;
+   char *auto_str;
+
+   elm_genlist_clear(_clang_autocomplete_popup_genlist);
+
+   list = (Eina_List *)evas_object_data_get(_clang_autocomplete_popup_genlist,
+"autocomplete_list");
+   ic = elm_genlist_item_class_new();
+   ic->item_style = "full";
+   ic->func.content_get = _autocomplete_list_content_get;
+
+   EINA_LIST_FOREACH(list, l, auto_str)
+ {
+if (eina_str_has_prefix(auto_str, word))
+  {
+ elm_genlist_item_append(_clang_autocomplete_popup_genlist,
+ ic,
+ auto_str,
+ NULL,
+ ELM_

[EGIT] [tools/edi] master 01/02: autocomplete: Add code autocomplete using clang

2016-12-11 Thread YeongJong Lee
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=ebc07e85e064027b50efa61c8469d518fc40ec00

commit ebc07e85e064027b50efa61c8469d518fc40ec00
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Dec 12 00:23:22 2016 +

autocomplete: Add code autocomplete using clang

Summary:
Pressing shortcut( + ) while editing the code show
the list of suggestions.

This support variable, function, struct member.. etc.
It is simple version, so it show just function name without parameter, 
return type.

Test Plan:
1. Run edi.
2. Open project.
3. Press shortcut( + ) while editing the code.
4. Check that the list of suggestions are correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D4476
---
 src/bin/editor/edi_editor.c | 259 +++-
 1 file changed, 257 insertions(+), 2 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 317c01d..365eb7e 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -26,6 +26,8 @@ typedef struct
Edi_Location end;
 } Edi_Range;
 
+static Evas_Object *_clang_autocomplete_popup_bg;
+
 void
 edi_editor_save(Edi_Editor *editor)
 {
@@ -51,8 +53,6 @@ _edi_editor_autosave_cb(void *data)
return ECORE_CALLBACK_CANCEL;
 }
 
-
-
 static void
 _changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
@@ -66,6 +66,252 @@ _changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUS
  editor->save_timer = ecore_timer_add(EDI_CONTENT_SAVE_TIMEOUT, 
_edi_editor_autosave_cb, editor);
 }
 
+#if HAVE_LIBCLANG
+static char*
+_edi_editor_currnet_word_get(Edi_Editor *editor)
+{
+   Elm_Code *code;
+   Elm_Code_Line *line;
+   char *ptr, *curword, *curtext;
+   unsigned int curlen, col, row, wordlen;
+
+   elm_obj_code_widget_cursor_position_get(editor->entry, , );
+
+   code = elm_code_widget_code_get(editor->entry);
+   line = elm_code_file_line_get(code->file, row);
+
+   curtext = (char *)elm_code_line_text_get(line, );
+   ptr = curtext + col - 1;
+
+   while (ptr != curtext &&
+ ((*(ptr - 1) >= 'a' && *(ptr - 1) <= 'z') ||
+  (*(ptr - 1) >= 'A' && *(ptr - 1) <= 'Z') ||
+  (*(ptr - 1) >= '0' && *(ptr - 1) <= '9') ||
+  *(ptr - 1) == '_'))
+ ptr--;
+
+   wordlen = col - (ptr - curtext) - 1;
+   curword = malloc(sizeof(char) * (wordlen + 1));
+   strncpy(curword, ptr, wordlen);
+   curword[wordlen] = '\0';
+
+   return curword;
+}
+
+static void
+_autocomplete_list_cb_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
+   Evas_Object *obj, void *event_info)
+{
+   Edi_Mainview_Item *item;
+   Edi_Editor *editor;
+   Elm_Code *code;
+   Elm_Code_Line *line;
+   Evas_Event_Key_Down *ev = event_info;
+   char *word;
+   const char *list_word;
+   unsigned int wordlen, col, row;
+
+   item = edi_mainview_item_current_get();
+
+   if (!item)
+ return;
+
+   editor = (Edi_Editor *)evas_object_data_get(item->view, "editor");
+
+   elm_code_widget_cursor_position_get(editor->entry, , );
+
+   code = elm_code_widget_code_get(editor->entry);
+   line = elm_code_file_line_get(code->file, row);
+
+   if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "Up"))
+ return;
+   else if (!strcmp(ev->key, "Return"))
+ {
+Elm_Object_Item *it;
+
+word = _edi_editor_currnet_word_get(editor);
+wordlen = strlen(word);
+free(word);
+
+elm_code_line_text_remove(line, col - wordlen - 1, wordlen);
+it = elm_genlist_selected_item_get(obj);
+list_word = elm_object_item_data_get(it);
+
+elm_code_line_text_insert(line, col - wordlen - 1,
+  list_word, strlen(list_word));
+elm_code_widget_cursor_position_set(editor->entry,
+  col - wordlen + strlen(list_word), row);
+ }
+
+   evas_object_del(_clang_autocomplete_popup_bg);
+}
+
+static void
+_autocomplete_list_cb_focus(void *data EINA_UNUSED,
+Evas_Object *obj EINA_UNUSED, void *event_info)
+{
+   Elm_Object_Item *it = event_info;
+   elm_genlist_item_selected_set(it, EINA_TRUE);
+}
+
+static Evas_Object *
+_autocomplete_list_content_get(void *data, Evas_Object *obj, const char *part)
+{
+   Edi_Editor *editor;
+   Edi_Mainview_Item *item;
+   Evas_Object *label;
+   char *format, *display, *auto_str = data;
+   const char *font;
+   int font_size, displen;
+
+   if (strcmp(part, "elm.swallow.content"))
+ return NULL;
+
+   item = edi_mainview_item_current_get();
+
+   if (!item)
+ return NULL;
+
+   editor = (Edi_Editor *)evas_object_data_get(item->view, "editor");
+   elm_code_widget_font_get(editor->entry, , _size);
+
+   format = "

[EGIT] [tools/enventor] master 01/01: edc_navigator: Add dragable bar for edc_navigator

2016-11-29 Thread YeongJong Lee
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=d9cbfba323c10c7e29defb2cad1daafb2faa4594

commit d9cbfba323c10c7e29defb2cad1daafb2faa4594
Author: YeongJong Lee <clean...@naver.com>
Date:   Wed Nov 30 13:25:56 2016 +0900

edc_navigator: Add dragable bar for edc_navigator

Summary:
edc_navigator can be resized. in order to prevent collision
between edc_navigator and file_browser, limit the size to half each other.

Test Plan:
1. Run enventor
2-1. Drag the bar between text editor and edc_navigator
2-2. Toggle edc_navigator using key F10
3. Check edc_navigator size is saved after restart envertor

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D4439
---
 data/themes/default/layout_common.edc | 172 +++---
 src/bin/base_gui.c|  16 
 src/bin/config_data.c |  22 +
 src/bin/edc_navigator.c   |  75 +++
 src/include/common.h  |   2 +-
 src/include/config_data.h |   2 +
 src/include/edc_navigator.h   |   4 +
 7 files changed, 281 insertions(+), 12 deletions(-)

diff --git a/data/themes/default/layout_common.edc 
b/data/themes/default/layout_common.edc
index 2c02872..061a38d 100644
--- a/data/themes/default/layout_common.edc
+++ b/data/themes/default/layout_common.edc
@@ -2422,28 +2422,26 @@ group { "main_layout";
to_y: "elm.swallow.file_tab";
 }
 align: 0 0;
-min: 200 0;
-max: 0 -1;
 fixed: 1 0;
 visible: 0;
  }
  desc { "visible";
 inherit: "default";
-align: 1 0;
 rel1 {
relative: 1.0 0.0;
-}
-rel2 {
-   relative: 1.0 0.0;
-   to_y: "elm.swallow.file_tab";
+   to: "elm.bar.right";
 }
 visible: 1;
  }
   }
   spacer { "whole_left";
  desc { "default";
-rel2.relative: 0.0 1.0;
-rel2.to: "elm.swallow.edc_navigator";
+rel2.relative: 0.5 1.0;
+ }
+  }
+  spacer { "whole_right";
+ desc { "default";
+rel1.relative: 0.5 0.0;
  }
   }
   spacer { "elm.bar.left";
@@ -2455,8 +2453,21 @@ group { "main_layout";
 max: 0 9;
 min: 0 14;
 fixed: 1 1;
-rel1.relative: 0.0 0.5;
-rel2.relative: 1.0 0.5;
+rel1.relative: 0.0 0.0;
+rel2.relative: 1.0 1.0;
+ }
+  }
+  spacer { "elm.bar.right";
+ dragable { confine: "whole_right";
+x: 1 1 1;
+y: 0 0 0;
+ }
+ desc { "default";
+max: 0 9;
+min: 0 14;
+fixed: 1 1;
+rel1.relative: 0.0 0.0;
+rel2.relative: 1.0 1.0;
  }
   }
   spacer { "elm.bar.event_left";
@@ -2467,6 +2478,14 @@ group { "main_layout";
 rel2.relative: 1.0 0.0;
  }
   }
+  spacer { "elm.bar.event_right";
+ desc { "default";
+rel1.to_x: "elm.bar.right";
+rel2.to_x: "elm.bar.right";
+rel2.to_y: "elm.swallow.file_tab";
+rel2.relative: 1.0 0.0;
+ }
+  }
   swallow { "bar_left";
  dragable.events: "elm.bar.left";
  desc { "default";
@@ -2480,6 +2499,19 @@ group { "main_layout";
 color: 0 0 0 0;
  }
   }
+  swallow { "bar_right";
+ dragable.events: "elm.bar.right";
+ desc { "default";
+min: 10 0;
+max: 9 9;
+fixed: 1 0;
+rel1.to_x: "elm.bar.event_right";
+rel1.relative: 0.0 0.25;
+rel2.to: "elm.bar.event_right";
+rel2.relative: 1.0 0.75;
+color: 0 0 0 0;
+ }
+  }
   rect { "bar_left1";
  repeat_events: 1;
  desc { "default";
@@ -2500,6 +2532,26 @@ group { "main_layout";
 color: 0 0 0 0;
  }
   }
+  rect { "bar_right1";
+ repeat_events: 1;
+ desc { "default";
+fixed: 1 1;
+rel1.to: "bar_right";
+rel2.to: "bar_right";
+rel2.relative: 0.5 1.0;
+color: 0 0 0 0;
+ }
+  }
+  rect { "bar_right2";
+ repeat_events: 1;
+ desc { "default";
+fixed: 1 

[EGIT] [tools/enventor] master 01/01: file_browser: Add dragable bar for file_browser

2016-11-28 Thread YeongJong Lee
hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=c13134d6095aba439c2888056dd9e897844f1845

commit c13134d6095aba439c2888056dd9e897844f1845
Author: YeongJong Lee <clean...@naver.com>
Date:   Tue Nov 29 12:51:29 2016 +0900

file_browser: Add dragable bar for file_browser

Summary: file_browser can be resized.

Test Plan:
1. Run enventor
2-1. Drag the bar between file_browser and live view
2-2. Toggle file_browser using key F9
3. Check file_browser size is saved after restart envertor

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D4431
---
 data/themes/default/layout_common.edc | 167 +-
 src/bin/base_gui.c|  24 -
 src/bin/config_data.c |  22 +
 src/bin/file_browser.c|  75 +++
 src/include/common.h  |   2 +-
 src/include/config_data.h |   2 +
 src/include/file_browser.h|   4 +
 7 files changed, 291 insertions(+), 5 deletions(-)

diff --git a/data/themes/default/layout_common.edc 
b/data/themes/default/layout_common.edc
index e912c72..2c02872 100644
--- a/data/themes/default/layout_common.edc
+++ b/data/themes/default/layout_common.edc
@@ -12,6 +12,8 @@ images {
image: "navi_group.png" COMP;
image: "bg_demo.png" COMP;
image: "help_bg.png" COMP;
+   image: "downlight_glow_left.png" COMP;
+   image: "downlight_glow_right.png" COMP;
 }
 
 group { "fileselector_layout";
@@ -2396,13 +2398,16 @@ group { "main_layout";
to_y: "elm.swallow.file_tab";
 }
 align: 1 0;
-min: 200 0;
 fixed: 1 0;
 visible: 0;
  }
  desc { "visible";
 inherit: "default";
-align: 0 0;
+rel2 {
+   relative: 1.0 0.0;
+   to_x: "elm.bar.left";
+   to_y: "elm.swallow.file_tab";
+}
 visible: 1;
  }
   }
@@ -2435,6 +2440,132 @@ group { "main_layout";
 visible: 1;
  }
   }
+  spacer { "whole_left";
+ desc { "default";
+rel2.relative: 0.0 1.0;
+rel2.to: "elm.swallow.edc_navigator";
+ }
+  }
+  spacer { "elm.bar.left";
+ dragable { confine: "whole_left";
+x: 1 1 1;
+y: 0 0 0;
+ }
+ desc { "default";
+max: 0 9;
+min: 0 14;
+fixed: 1 1;
+rel1.relative: 0.0 0.5;
+rel2.relative: 1.0 0.5;
+ }
+  }
+  spacer { "elm.bar.event_left";
+ desc { "default";
+rel1.to_x: "elm.bar.left";
+rel2.to_x: "elm.bar.left";
+rel2.to_y: "elm.swallow.file_tab";
+rel2.relative: 1.0 0.0;
+ }
+  }
+  swallow { "bar_left";
+ dragable.events: "elm.bar.left";
+ desc { "default";
+min: 10 0;
+max: 9 9;
+fixed: 1 0;
+rel1.to_x: "elm.bar.event_left";
+rel1.relative: 0.0 0.25;
+rel2.to: "elm.bar.event_left";
+rel2.relative: 1.0 0.75;
+color: 0 0 0 0;
+ }
+  }
+  rect { "bar_left1";
+ repeat_events: 1;
+ desc { "default";
+fixed: 1 1;
+rel1.to: "bar_left";
+rel2.to: "bar_left";
+rel2.relative: 0.5 1.0;
+color: 0 0 0 0;
+ }
+  }
+  rect { "bar_left2";
+ repeat_events: 1;
+ desc { "default";
+fixed: 1 1;
+rel1.to: "bar_left";
+rel1.relative: 0.5 0.0;
+rel2.to: "bar_left";
+color: 0 0 0 0;
+ }
+  }
+  image { "glow1a_left";
+ nomouse;
+ desc { "default";
+image.normal: "downlight_glow_left.png";
+image.border: 0 3 0 0;
+max: 32 9;
+rel2.to_x: "elm.bar.left";
+rel2.to_y: "elm.swallow.file_tab";
+rel2.relative: 1.0 0.0;
+color: 255 255 255 0;
+align: 1.0 0.5;
+ }
+ desc { "active";
+inherit: "default";
+color: 255 255 255 255;
+ }
+  }
+  image { "glow1b_left";
+ nomouse;
+ desc { "default";
+image.normal: "downlight_glow_right.png";
+max: 4 

[EGIT] [core/efl] master 06/07: elm_toolbar: refactor _elm_toolbar_item_icon_obj_set function

2016-11-28 Thread YeongJong Lee
cedric pushed a commit to branch master.

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

commit 6584c6cc27913710e8e76b2278307c5696374576
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Nov 28 11:15:20 2016 -0800

elm_toolbar: refactor _elm_toolbar_item_icon_obj_set function

Summary:
In order to natural animation in horizontal item theme,
remove duplicated operation in elm_toolbar_item_icon_obj_set function.

Test Plan:
Change to other icon using elm_toolbar_item_icon_obj_set function in 
horizontal item theme.
or in edi, click Logs/Console/Tests button on bottom toolbar

Reviewers: raster, ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elementary/elm_toolbar.c | 16 +---
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 4f70b47..44dd521 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2576,6 +2576,7 @@ _elm_toolbar_item_icon_update(Elm_Toolbar_Item_Data *item)
Eina_List *l;
 
_elm_widget_sub_object_redirect_to_top(WIDGET(item), old_icon);
+   elm_layout_content_unset(VIEW(item), "elm.swallow.icon");
elm_layout_content_set(VIEW(item), "elm.swallow.icon", item->icon);
if (item->icon)
elm_layout_signal_emit(VIEW(item), "elm,state,icon,visible", "elm");
@@ -2597,8 +2598,6 @@ _elm_toolbar_item_icon_set_cb(void *data,
   const char *source)
 {
Elm_Toolbar_Item_Data *item = data;
-
-   elm_layout_content_unset(VIEW(item), "elm.swallow.icon");
_elm_toolbar_item_icon_update(item);
elm_layout_signal_callback_del
  (obj, emission, source, _elm_toolbar_item_icon_set_cb);
@@ -2624,19 +2623,6 @@ _elm_toolbar_item_icon_obj_set(Evas_Object *obj,
 eina_stringshare_del(item->icon_str);
 item->icon_str = NULL;
  }
-   if (item->icon)
- {
-Elm_Toolbar_Item_State *it_state;
-Eina_List *l;
-Eina_Bool found = EINA_FALSE;
-EINA_LIST_FOREACH(item->states, l, it_state)
-  {
- found |= (it_state->icon == item->icon);
-  }
-if (!found) evas_object_del(item->icon);
-else evas_object_hide(item->icon);
-elm_layout_content_unset(VIEW(item), "elm.swallow.icon");
- }
item->icon = icon_obj;
 
if (icon_obj)

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 29/63: fix korean translation mismatch

2016-10-04 Thread YeongJong Lee
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 1214d62a0f18c0554cb4ca8f343edc90ebc4f9e3
Author: YeongJong Lee <clean...@naver.com>
Date:   Mon Sep 19 16:43:02 2016 +0900

fix korean translation mismatch

Summary:
other 'edge' is translated into '가장자리'.
but this one is translated into '테두리'

Test Plan:
Open Settings Panel - Input - Edge Bindings - Add
Select Left Edge

Reviewers: zmike!, Hermet

Reviewed By: Hermet

Subscribers: cedric, conr2d

Differential Revision: https://phab.enlightenment.org/D4297
---
 po/ko.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/po/ko.po b/po/ko.po
index 2a6730e..77fd2c5 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -5705,7 +5705,7 @@ msgstr "WIN"
 
 #: src/modules/conf_bindings/e_int_config_edgebindings.c:1393
 msgid "Left Edge"
-msgstr "왼쪽 테두리"
+msgstr "왼쪽 가장자리"
 
 #: src/modules/conf_bindings/e_int_config_edgebindings.c:1397
 msgid "Top Edge"

-- 




  1   2   >