ajwillia-ms pushed a commit to branch master.

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

commit b3a9bd0f2ca85f8f7d228d9aa306871313a80950
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Mar 10 00:06:50 2016 +0000

    Update to latest eo syntax
    
    Thanks for the script Tom :)
---
 elm_code/src/bin/elm_code_test_main.c              |  36 +++----
 elm_code/src/lib/elm_code.c                        |   2 +-
 elm_code/src/lib/elm_code_diff_widget.c            |  10 +-
 elm_code/src/lib/widget/elm_code_widget.c          | 103 +++++++++------------
 .../src/lib/widget/elm_code_widget_selection.c     |  19 ++--
 elm_code/src/tests/widget/elm_code_test_widget.c   |   2 +-
 src/bin/edi_consolepanel.c                         |  33 +++----
 src/bin/edi_logpanel.c                             |  12 +--
 src/bin/editor/edi_editor.c                        |  11 +--
 src/bin/screens/edi_settings.c                     |   7 +-
 src/bin/screens/edi_settings_font.c                |   9 +-
 11 files changed, 104 insertions(+), 140 deletions(-)

diff --git a/elm_code/src/bin/elm_code_test_main.c 
b/elm_code/src/bin/elm_code_test_main.c
index 97e312c..126f8a7 100644
--- a/elm_code/src/bin/elm_code_test_main.c
+++ b/elm_code/src/bin/elm_code_test_main.c
@@ -66,12 +66,10 @@ _elm_code_test_welcome_setup(Evas_Object *parent)
    Elm_Code_Widget *widget;
 
    code = elm_code_create();
-   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                   elm_obj_code_widget_code_set(code));
-   eo_do(widget,
-         elm_obj_code_widget_font_set(NULL, 12),
-         eo_event_callback_add(&ELM_CODE_EVENT_LINE_LOAD_DONE, 
_elm_code_test_line_done_cb, NULL);
-         eo_event_callback_add(ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_elm_code_test_line_clicked_cb, code));
+   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   elm_obj_code_widget_font_set(widget, NULL, 12);
+   eo_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_elm_code_test_line_done_cb, NULL);
+   eo_event_callback_add(widget, ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_elm_code_test_line_clicked_cb, code);
 
    _append_line(code->file, "❤ Hello World, Elm Code! ❤");
    _append_line(code->file, "");
@@ -96,13 +94,11 @@ _elm_code_test_editor_setup(Evas_Object *parent)
    Elm_Code_Widget *widget;
 
    code = elm_code_create();
-   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                   elm_obj_code_widget_code_set(code));
-   eo_do(widget,
-         elm_obj_code_widget_font_set(NULL, 14),
-         elm_obj_code_widget_editable_set(EINA_TRUE),
-         elm_obj_code_widget_show_whitespace_set(EINA_TRUE),
-         elm_obj_code_widget_line_numbers_set(EINA_TRUE));
+   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   elm_obj_code_widget_font_set(widget, NULL, 14);
+   elm_obj_code_widget_editable_set(widget, EINA_TRUE);
+   elm_obj_code_widget_show_whitespace_set(widget, EINA_TRUE);
+   elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
 
    _append_line(code->file, "Edit me :)");
    _append_line(code->file, "");
@@ -125,11 +121,9 @@ _elm_code_test_mirror_setup(Elm_Code *code, char 
*font_name, Evas_Object *parent
 {
    Elm_Code_Widget *widget;
 
-   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                   elm_obj_code_widget_code_set(code));
-   eo_do(widget,
-         elm_obj_code_widget_font_set(font_name, 11),
-         elm_obj_code_widget_line_numbers_set(EINA_TRUE));
+   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   elm_obj_code_widget_font_set(widget, font_name, 11);
+   elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
 
    evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -150,8 +144,7 @@ _elm_code_test_diff_inline_setup(Evas_Object *parent)
    code = elm_code_create();
    elm_code_file_open(code, path);
 
-   diff = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                 elm_obj_code_widget_code_set(code));
+   eo_add(&diff, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(diff, code));
 
    evas_object_size_hint_weight_set(diff, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(diff, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -206,8 +199,7 @@ _elm_code_test_welcome_mirror_cb(void *data, Evas_Object 
*obj EINA_UNUSED, void
    evas_object_size_hint_weight_set(screen, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
 
    widget = _elm_code_test_editor_setup(screen);
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get());
+   code = elm_obj_code_widget_code_get(widget);
    elm_box_pack_end(screen, widget);
 
    elm_box_pack_end(screen, _elm_code_test_mirror_setup(code, 
"Mono:style=Oblique", screen));
diff --git a/elm_code/src/lib/elm_code.c b/elm_code/src/lib/elm_code.c
index 2d326a7..782830c 100644
--- a/elm_code/src/lib/elm_code.c
+++ b/elm_code/src/lib/elm_code.c
@@ -109,7 +109,7 @@ elm_code_callback_fire(Elm_Code *code, const 
Eo_Event_Description *signal, void
 
    EINA_LIST_FOREACH(code->widgets, item, widget)
      {
-        eo_do(widget, eo_event_callback_call(signal, data));
+        eo_event_callback_call(widget, signal, data);
      }
 }
 
diff --git a/elm_code/src/lib/elm_code_diff_widget.c 
b/elm_code/src/lib/elm_code_diff_widget.c
index a16ecbf..ac66d36 100644
--- a/elm_code/src/lib/elm_code_diff_widget.c
+++ b/elm_code/src/lib/elm_code_diff_widget.c
@@ -95,8 +95,7 @@ elm_code_diff_widget_add(Evas_Object *parent, Elm_Code *code)
    // left side of diff
    wcode1 = elm_code_create();
    elm_code_parser_standard_add(wcode1, ELM_CODE_PARSER_STANDARD_DIFF);
-   widget_left = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                        elm_obj_code_widget_code_set(wcode1));
+   eo_add(&widget_left, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget_left, wcode1));
 
    evas_object_size_hint_weight_set(widget_left, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget_left, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
@@ -107,8 +106,7 @@ elm_code_diff_widget_add(Evas_Object *parent, Elm_Code 
*code)
    // right side of diff
    wcode2 = elm_code_create();
    elm_code_parser_standard_add(wcode2, ELM_CODE_PARSER_STANDARD_DIFF);
-   widget_right = eo_add(ELM_CODE_WIDGET_CLASS, parent,
-                         elm_obj_code_widget_code_set(wcode2));
+   eo_add(&widget_right, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget_right, wcode2));
 
    evas_object_size_hint_weight_set(widget_right, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget_right, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
@@ -126,8 +124,8 @@ elm_code_diff_widget_font_set(Evas_Object *widget, const 
char *name, int size)
    Elm_Code_Widget *child;
 
    child = (Elm_Code_Widget *) evas_object_data_get(widget, 
_ELM_CODE_DIFF_WIDGET_LEFT);
-   eo_do(child, elm_obj_code_widget_font_set(name, size));
+   elm_obj_code_widget_font_set(child, name, size);
    child = (Elm_Code_Widget *) evas_object_data_get(widget, 
_ELM_CODE_DIFF_WIDGET_RIGHT);
-   eo_do(child, elm_obj_code_widget_font_set(name, size));
+   elm_obj_code_widget_font_set(child, name, size);
 }
 
diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index 0341628..ed19d61 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -42,7 +42,7 @@ Eina_Unicode status_icons[] = {
 #define EO_CONSTRUCTOR_CHECK_RETURN(obj) do { \
    Eina_Bool finalized; \
    \
-   eo_do(obj, finalized = eo_finalized_get()); \
+   finalized = eo_finalized_get(obj); \
    if (finalized) \
      { \
         ERR("This function is only allowed during construction."); \
@@ -54,15 +54,15 @@ EAPI Evas_Object *
 elm_code_widget_add(Evas_Object *parent, Elm_Code *code)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   Evas_Object *obj = eo_add(MY_CLASS, parent,
-                             elm_obj_code_widget_code_set(code));
+   Evas_Object *obj = NULL;
+   eo_add(&obj, MY_CLASS, parent, elm_obj_code_widget_code_set(obj, code));
    return obj;
 }
 
 EOLIAN static Eo *
 _elm_code_widget_eo_base_constructor(Eo *obj, Elm_Code_Widget_Data *pd)
 {
-   obj = eo_do_super_ret(obj, ELM_CODE_WIDGET_CLASS, obj, eo_constructor());
+   obj = eo_constructor(eo_super(obj, ELM_CODE_WIDGET_CLASS));
 
    pd->cursor_line = 1;
    pd->cursor_col = 1;
@@ -75,7 +75,7 @@ _elm_code_widget_eo_base_constructor(Eo *obj, 
Elm_Code_Widget_Data *pd)
 EOLIAN static Eo *
 _elm_code_widget_eo_base_finalize(Eo *obj, Elm_Code_Widget_Data *pd)
 {
-   obj = eo_do_super_ret(obj, ELM_CODE_WIDGET_CLASS, obj, eo_finalize());
+   obj = eo_finalize(eo_super(obj, ELM_CODE_WIDGET_CLASS));
 
    if (pd->code)
      return obj;
@@ -115,7 +115,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget)
    Elm_Code_Widget_Data *pd;
 
    pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
-   eo_do(widget, gutter = elm_obj_code_widget_text_left_gutter_width_get());
+   gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
 
    if (!pd->code)
      return;
@@ -187,7 +187,7 @@ _elm_code_widget_fill_line_tokens(Elm_Code_Widget *widget, 
Evas_Textgrid_Cell *c
    unsigned int start, end, length, offset;
    unsigned int token_start_col, token_end_col;
 
-   eo_do(widget, offset = elm_obj_code_widget_text_left_gutter_width_get());
+   offset = elm_obj_code_widget_text_left_gutter_width_get(widget);
    start = offset;
    length = elm_code_widget_line_text_column_width_get(widget, line) + offset;
 
@@ -342,7 +342,7 @@ _elm_code_widget_fill_line(Elm_Code_Widget *widget, 
Elm_Code_Line *line)
    Elm_Code_Widget_Data *pd;
 
    pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
-   eo_do(widget, gutter = elm_obj_code_widget_text_left_gutter_width_get());
+   gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
 
    evas_object_textgrid_size_get(pd->grid, &w, NULL);
    cells = evas_object_textgrid_cellrow_get(pd->grid, line->number - 1);
@@ -395,7 +395,7 @@ _elm_code_widget_empty_line(Elm_Code_Widget *widget, 
unsigned int number)
    Elm_Code_Widget_Data *pd;
 
    pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
-   eo_do(widget, gutter = elm_obj_code_widget_text_left_gutter_width_get());
+   gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
 
    evas_object_textgrid_size_get(pd->grid, &w, NULL);
    cells = evas_object_textgrid_cellrow_get(pd->grid, number - 1);
@@ -483,7 +483,7 @@ _elm_code_widget_line_cb(void *data, const Eo_Event *event)
    line = (Elm_Code_Line *)event->event_info;
    widget = (Elm_Code_Widget *)data;
 
-   eo_do(widget, visible = elm_obj_code_widget_line_visible_get(line));
+   visible = elm_obj_code_widget_line_visible_get(widget, line);
    if (!visible)
      return EO_CALLBACK_CONTINUE;
 
@@ -602,7 +602,7 @@ _elm_code_widget_cursor_ensure_visible(Elm_Code_Widget 
*widget)
    elm_scroller_region_get(pd->scroller, &viewx, &viewy, &vieww, &viewh);
    evas_object_textgrid_cell_size_get(pd->grid, &cellw, &cellh);
 
-   eo_do(widget, gutter = elm_obj_code_widget_text_left_gutter_width_get());
+   gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
    curx = (pd->cursor_col + gutter - 1) * cellw;
    cury = (pd->cursor_line - 1) * cellh;
 
@@ -626,7 +626,7 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, 
Elm_Code_Widget_Data *pd,
    if (!was_key)
      _elm_code_widget_update_focus_directions(widget);
 
-   eo_do(widget, eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CURSOR_CHANGED, 
widget));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CURSOR_CHANGED, 
widget);
    _elm_code_widget_cursor_ensure_visible(widget);
 
    if (oldrow != pd->cursor_line)
@@ -656,7 +656,7 @@ 
_elm_code_widget_position_at_coordinates_get(Elm_Code_Widget *widget, Elm_Code_W
    y = y + sy - oy;
 
    evas_object_textgrid_cell_size_get(pd->grid, &cw, &ch);
-   eo_do(widget, gutter = elm_obj_code_widget_text_left_gutter_width_get());
+   gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
    number = ((double) y / ch) + 1;
    if (col)
      *col = ((double) x / cw) - gutter + 1;
@@ -679,7 +679,7 @@ _elm_code_widget_clicked_gutter_cb(Elm_Code_Widget *widget, 
unsigned int row)
    if (!line)
      return;
 
-   eo_do(widget, 
eo_event_callback_call(ELM_CODE_WIDGET_EVENT_LINE_GUTTER_CLICKED, line));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_LINE_GUTTER_CLICKED, 
line);
 }
 
 static void
@@ -715,7 +715,7 @@ _elm_code_widget_clicked_readonly_cb(Elm_Code_Widget 
*widget, unsigned int row)
    if (!line)
      return;
 
-   eo_do(widget, eo_event_callback_call(ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
line));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_LINE_CLICKED, line);
 }
 
 static void
@@ -951,7 +951,7 @@ 
_elm_code_widget_cursor_move_page_height_get(Elm_Code_Widget *widget)
 {
    unsigned int lines;
 
-   eo_do(widget, lines = elm_obj_code_widget_lines_visible_get());
+   lines = elm_obj_code_widget_lines_visible_get(widget);
    return lines * 0.85;
 }
 
@@ -1068,9 +1068,8 @@ _elm_code_widget_text_at_cursor_insert(Elm_Code_Widget 
*widget, const char *text
    unsigned int row, col, position, col_width;
 
    _elm_code_widget_delete_selection(widget);
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
    line = elm_code_file_line_get(code->file, row);
    if (line == NULL)
      {
@@ -1084,9 +1083,8 @@ _elm_code_widget_text_at_cursor_insert(Elm_Code_Widget 
*widget, const char *text
    col_width = elm_code_widget_line_text_column_width_to_position(widget, 
line, position + length) -
                elm_code_widget_line_text_column_width_to_position(widget, 
line, position);
 
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_set(col + col_width, row),
-         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL));
+   elm_obj_code_widget_cursor_position_set(widget, col + col_width, row);
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
    change = _elm_code_widget_change_create(col, row, col + col_width - 1, row, 
text, length, EINA_TRUE);
    _elm_code_widget_undo_change_add(widget, change);
@@ -1106,8 +1104,7 @@ _elm_code_widget_tab_at_cursor_insert(Elm_Code_Widget 
*widget)
         return;
      }
 
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
    rem = (col - 1) % pd->tabstop;
 
    while (rem < pd->tabstop)
@@ -1127,9 +1124,8 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
    char *oldtext;
 
    _elm_code_widget_delete_selection(widget);
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
    line = elm_code_file_line_get(code->file, row);
    if (line == NULL)
      {
@@ -1150,10 +1146,9 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
    elm_code_line_text_insert(line, 0, oldtext, leading);
    free(oldtext);
 
-   indent = elm_obj_code_widget_line_text_column_width_to_position(line, 
leading);
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_set(indent, row + 1),
-         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL));
+   indent = elm_obj_code_widget_line_text_column_width_to_position(widget, 
line, leading);
+   elm_obj_code_widget_cursor_position_set(widget, indent, row + 1);
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
    change = _elm_code_widget_change_create(width + 1, row, indent - 1, row + 
1, "\n", 1, EINA_TRUE);
    _elm_code_widget_undo_change_add(widget, change);
@@ -1167,9 +1162,8 @@ _elm_code_widget_backspaceline(Elm_Code_Widget *widget, 
Eina_Bool nextline)
    Elm_Code_Line *line, *oldline;
    unsigned int row, col, oldlength, position;
 
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
    line = elm_code_file_line_get(code->file, row);
 
    if (nextline)
@@ -1184,11 +1178,10 @@ _elm_code_widget_backspaceline(Elm_Code_Widget *widget, 
Eina_Bool nextline)
 
         position = elm_code_widget_line_text_column_width_to_position(widget, 
oldline, oldlength);
 
-        eo_do(widget,
-              elm_obj_code_widget_cursor_position_set(position, row - 1));
+        elm_obj_code_widget_cursor_position_set(widget, position, row - 1);
      }
 // TODO construct and pass a change object
-   eo_do(widget, eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, 
NULL));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 }
 
 void
@@ -1203,9 +1196,8 @@ _elm_code_widget_backspace(Elm_Code_Widget *widget)
    if (_elm_code_widget_delete_selection(widget))
      return; // TODO fire the change and log it
 
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
 
    if (col <= 1)
      {
@@ -1225,10 +1217,9 @@ _elm_code_widget_backspace(Elm_Code_Widget *widget)
 
    text = elm_code_widget_text_between_positions_get(widget, start_col, row, 
start_col, row);
    elm_code_line_text_remove(line, position - char_width, char_width);
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_set(start_col, row));
+   elm_obj_code_widget_cursor_position_set(widget, start_col, row);
 
-   eo_do(widget, eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, 
NULL));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
    change = _elm_code_widget_change_create(start_col, row, col, row, text, 
char_width, EINA_FALSE);
    _elm_code_widget_undo_change_add(widget, change);
@@ -1247,9 +1238,8 @@ _elm_code_widget_delete(Elm_Code_Widget *widget)
    if (_elm_code_widget_delete_selection(widget))
      return; // TODO fire the change and log it
 
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
    line = elm_code_file_line_get(code->file, row);
    if (col > elm_code_widget_line_text_column_width_get(widget, line))
      {
@@ -1266,9 +1256,8 @@ _elm_code_widget_delete(Elm_Code_Widget *widget)
 
    text = elm_code_widget_text_between_positions_get(widget, start_col, row, 
start_col, row);
    elm_code_line_text_remove(line, position, char_width?char_width:1);
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_set(start_col, row),
-         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL));
+   elm_obj_code_widget_cursor_position_set(widget, start_col, row);
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
    change = _elm_code_widget_change_create(start_col, row, col, row, text, 
char_width, EINA_FALSE);
    _elm_code_widget_undo_change_add(widget, change);
@@ -1294,9 +1283,8 @@ _elm_code_widget_control_key_down_cb(Elm_Code_Widget 
*widget, const char *key)
    else if (!strcmp("z", key))
      elm_code_widget_undo(widget);
 
-   eo_do(widget,
-// TODO construct and pass a change object for cut and paste
-         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL));
+   // TODO construct and pass a change object for cut and paste
+         eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, 
NULL);
 }
 
 static void
@@ -1692,7 +1680,7 @@ _elm_code_widget_evas_object_smart_add(Eo *obj, 
Elm_Code_Widget_Data *pd)
 {
    Evas_Object *grid, *scroller;
 
-   eo_do_super(obj, ELM_CODE_WIDGET_CLASS, evas_obj_smart_add());
+   evas_obj_smart_add(eo_super(obj, ELM_CODE_WIDGET_CLASS));
    elm_object_focus_allow_set(obj, EINA_TRUE);
 
    elm_layout_file_set(obj, PACKAGE_DATA_DIR "/themes/elm_code.edj", 
"elm_code/layout/default");
@@ -1723,11 +1711,10 @@ _elm_code_widget_evas_object_smart_add(Eo *obj, 
Elm_Code_Widget_Data *pd)
    evas_object_smart_callback_add(obj, "focused", 
_elm_code_widget_focused_event_cb, obj);
    evas_object_smart_callback_add(obj, "unfocused", 
_elm_code_widget_unfocused_event_cb, obj);
 
-   eo_do(obj,
-         eo_event_callback_add(&ELM_CODE_EVENT_LINE_LOAD_DONE, 
_elm_code_widget_line_cb, obj),
-         eo_event_callback_add(&ELM_CODE_EVENT_FILE_LOAD_DONE, 
_elm_code_widget_file_cb, obj),
-         eo_event_callback_add(ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, 
_elm_code_widget_selection_cb, obj),
-         eo_event_callback_add(ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, 
_elm_code_widget_selection_clear_cb, obj));
+   eo_event_callback_add(obj, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_elm_code_widget_line_cb, obj);
+   eo_event_callback_add(obj, &ELM_CODE_EVENT_FILE_LOAD_DONE, 
_elm_code_widget_file_cb, obj);
+   eo_event_callback_add(obj, ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, 
_elm_code_widget_selection_cb, obj);
+   eo_event_callback_add(obj, ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, 
_elm_code_widget_selection_clear_cb, obj);
 
    _elm_code_widget_font_set(obj, pd, NULL, 10);
 }
diff --git a/elm_code/src/lib/widget/elm_code_widget_selection.c 
b/elm_code/src/lib/widget/elm_code_widget_selection.c
index ad7f7c4..8f43890 100644
--- a/elm_code/src/lib/widget/elm_code_widget_selection.c
+++ b/elm_code/src/lib/widget/elm_code_widget_selection.c
@@ -62,9 +62,8 @@ elm_code_widget_selection_start(Evas_Object *widget,
 
    pd->selection->start_line = line;
    pd->selection->start_col = col;
-   eo_do(widget,
-         eo_event_callback_call(ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, 
widget),
-         elm_obj_code_widget_cursor_position_set(col, line));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, 
widget);
+   elm_obj_code_widget_cursor_position_set(widget, col, line);
 }
 
 EAPI void
@@ -89,7 +88,7 @@ elm_code_widget_selection_end(Evas_Object *widget,
 
    pd->selection->end_line = line;
    pd->selection->end_col = col;
-   eo_do(widget, 
eo_event_callback_call(ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, widget));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_SELECTION_CHANGED, 
widget);
 }
 
 EAPI Elm_Code_Widget_Selection_Data *
@@ -145,7 +144,7 @@ elm_code_widget_selection_clear(Evas_Object *widget)
 
    free(pd->selection);
    pd->selection = NULL;
-   eo_do(widget, 
eo_event_callback_call(ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, widget));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, 
widget);
 }
 
 static void
@@ -247,7 +246,7 @@ elm_code_widget_selection_delete(Evas_Object *widget)
 
    free(pd->selection);
    pd->selection = NULL;
-   eo_do(widget, 
eo_event_callback_call(ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, widget));
+   eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_SELECTION_CLEARED, 
widget);
 }
 
 EAPI void
@@ -386,8 +385,7 @@ _selection_paste_single(Elm_Code_Widget *widget, Elm_Code 
*code,
    elm_code_line_text_insert(line, position, text, len);
 
    newcol = elm_code_widget_line_text_column_width_to_position(widget, line, 
position + len);
-   eo_do(widget,
-         elm_obj_code_widget_cursor_position_set(newcol, row));
+   elm_obj_code_widget_cursor_position_set(widget, newcol, row);
 }
 
 static void
@@ -436,9 +434,8 @@ _selection_paste_cb(void *data, Evas_Object *obj 
EINA_UNUSED, Elm_Selection_Data
    if (ev->len <= 0)
      return EINA_TRUE;
 
-   eo_do(widget,
-         code = elm_obj_code_widget_code_get(),
-         elm_obj_code_widget_cursor_position_get(&col, &row));
+   code = elm_obj_code_widget_code_get(widget);
+   elm_obj_code_widget_cursor_position_get(widget, &col, &row);
 
    if (elm_code_text_newlinenpos(ev->data, ev->len, NULL) == 
ELM_CODE_TEXT_NOT_FOUND)
      _selection_paste_single(widget, code, col, row, ev->data, ev->len - 1);
diff --git a/elm_code/src/tests/widget/elm_code_test_widget.c 
b/elm_code/src/tests/widget/elm_code_test_widget.c
index 3471e3c..c65d6b8 100644
--- a/elm_code/src/tests/widget/elm_code_test_widget.c
+++ b/elm_code/src/tests/widget/elm_code_test_widget.c
@@ -77,7 +77,7 @@ START_TEST (elm_code_widget_construct_nocode)
    elm_init(1, NULL);
 
    win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
-   widget = eo_add(ELM_CODE_WIDGET_CLASS, win);
+   eo_add(&widget, ELM_CODE_WIDGET_CLASS, win);
    ck_assert(!widget);
 
    elm_shutdown();
diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c
index 64c9b8a..a64490e 100644
--- a/src/bin/edi_consolepanel.c
+++ b/src/bin/edi_consolepanel.c
@@ -83,8 +83,7 @@ static void _edi_consolepanel_parse_directory(const char 
*line)
 }
 
 static Eina_Bool
-_edi_consolepanel_clicked_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-                             const Eo_Event_Description *desc EINA_UNUSED, 
void *event_info)
+_edi_consolepanel_clicked_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    Edi_Path_Options *options;
    Elm_Code_Line *line;
@@ -92,7 +91,7 @@ _edi_consolepanel_clicked_cb(void *data EINA_UNUSED, Eo *obj 
EINA_UNUSED,
    char *path, *terminated;
    unsigned int length;
 
-   line = (Elm_Code_Line *)event_info;
+   line = (Elm_Code_Line *)event->event_info;
    content = elm_code_line_text_get(line, &length);
 
    terminated = malloc(sizeof(char) * (length + 1));
@@ -115,12 +114,11 @@ _edi_consolepanel_clicked_cb(void *data EINA_UNUSED, Eo 
*obj EINA_UNUSED,
 }
 
 static Eina_Bool
-_edi_consolepanel_line_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-                          const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info)
+_edi_consolepanel_line_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    Elm_Code_Line *line;
 
-   line = (Elm_Code_Line *)event_info;
+   line = (Elm_Code_Line *)event->event_info;
 
    if (line->data)
      line->status = ELM_CODE_STATUS_TYPE_ERROR;
@@ -272,12 +270,11 @@ _edi_test_line_parse_suite(const char *path)
 }
 
 static Eina_Bool
-_edi_testpanel_line_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-                       const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info)
+_edi_testpanel_line_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    Elm_Code_Line *line;
 
-   line = (Elm_Code_Line *)event_info;
+   line = (Elm_Code_Line *)event->event_info;
 
    if (!line->data)
      return EO_CALLBACK_CONTINUE;
@@ -338,11 +335,10 @@ void edi_consolepanel_add(Evas_Object *parent)
    _edi_console_code = code;
 
    widget = elm_code_widget_add(parent, code);
-   eo_do(widget,
-         elm_obj_code_widget_font_set(_edi_project_config->font.name, 
_edi_project_config->font.size),
-         elm_obj_code_widget_gravity_set(0.0, 1.0),
-         eo_event_callback_add(&ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_consolepanel_line_cb, NULL),
-         eo_event_callback_add(ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_edi_consolepanel_clicked_cb, code));
+   elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, 
_edi_project_config->font.size);
+   elm_obj_code_widget_gravity_set(widget, 0.0, 1.0);
+   eo_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_consolepanel_line_cb, NULL);
+   eo_event_callback_add(widget, ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_edi_consolepanel_clicked_cb, code);
 
    evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -364,11 +360,10 @@ void edi_testpanel_add(Evas_Object *parent)
    _edi_test_code = code;
 
    widget = elm_code_widget_add(parent, code);
-   eo_do(widget,
-         elm_obj_code_widget_font_set(_edi_project_config->font.name, 
_edi_project_config->font.size),
-         elm_obj_code_widget_gravity_set(0.0, 1.0),
-         eo_event_callback_add(&ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_testpanel_line_cb, NULL),
-         eo_event_callback_add(ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_edi_consolepanel_clicked_cb, code));
+   elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, 
_edi_project_config->font.size);
+   elm_obj_code_widget_gravity_set(widget, 0.0, 1.0);
+   eo_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_testpanel_line_cb, NULL);
+   eo_event_callback_add(widget, ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_edi_consolepanel_clicked_cb, code);
 
    evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/src/bin/edi_logpanel.c b/src/bin/edi_logpanel.c
index caf0207..e2730dd 100644
--- a/src/bin/edi_logpanel.c
+++ b/src/bin/edi_logpanel.c
@@ -47,12 +47,11 @@ _edi_logpanel_print_cb(const Eina_Log_Domain *domain, 
Eina_Log_Level level,
 }
 
 static Eina_Bool
-_edi_logpanel_line_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED,
-                      const Eo_Event_Description *desc EINA_UNUSED, void 
*event_info)
+_edi_logpanel_line_cb(void *data EINA_UNUSED, const Eo_Event *event)
 {
    Elm_Code_Line *line;
 
-   line = (Elm_Code_Line *)event_info;
+   line = (Elm_Code_Line *)event->event_info;
 
    if (line->data)
      line->status = ELM_CODE_STATUS_TYPE_ERROR;
@@ -75,10 +74,9 @@ void edi_logpanel_add(Evas_Object *parent)
 
    code = elm_code_create();
    widget = elm_code_widget_add(parent, code);
-   eo_do(widget,
-         elm_obj_code_widget_font_set(_edi_project_config->font.name, 
_edi_project_config->font.size),
-         elm_obj_code_widget_gravity_set(0.0, 1.0),
-         eo_event_callback_add(&ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_logpanel_line_cb, NULL));
+   elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, 
_edi_project_config->font.size);
+   elm_obj_code_widget_gravity_set(widget, 0.0, 1.0);
+   eo_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_edi_logpanel_line_cb, NULL);
    evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_show(widget);
diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 236a356..8f7bf08 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -502,12 +502,11 @@ _edi_editor_config_changed(void *data, int type 
EINA_UNUSED, void *event EINA_UN
 
    code->config.trim_whitespace = _edi_config->trim_whitespace;
 
-   eo_do(widget,
-         elm_obj_code_widget_font_set(_edi_project_config->font.name, 
_edi_project_config->font.size),
-         
elm_obj_code_widget_show_whitespace_set(_edi_project_config->gui.show_whitespace),
-         
elm_obj_code_widget_tab_inserts_spaces_set(_edi_project_config->gui.tab_inserts_spaces),
-         
elm_obj_code_widget_line_width_marker_set(_edi_project_config->gui.width_marker),
-         elm_obj_code_widget_tabstop_set(_edi_project_config->gui.tabstop));
+   elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, 
_edi_project_config->font.size);
+   elm_obj_code_widget_show_whitespace_set(widget, 
_edi_project_config->gui.show_whitespace);
+   elm_obj_code_widget_tab_inserts_spaces_set(widget, 
_edi_project_config->gui.tab_inserts_spaces);
+   elm_obj_code_widget_line_width_marker_set(widget, 
_edi_project_config->gui.width_marker);
+   elm_obj_code_widget_tabstop_set(widget, _edi_project_config->gui.tabstop);
 
    return ECORE_CALLBACK_RENEW;
 }
diff --git a/src/bin/screens/edi_settings.c b/src/bin/screens/edi_settings.c
index 482d320..e4566c2 100644
--- a/src/bin/screens/edi_settings.c
+++ b/src/bin/screens/edi_settings.c
@@ -130,10 +130,9 @@ _edi_settings_font_preview_add(Evas_Object *parent, const 
char *font_name, int f
    elm_code_file_line_append(code->file, FONT_PREVIEW, 35, NULL);
 
    widget = elm_code_widget_add(parent, code);
-   eo_do(widget,
-         elm_obj_code_widget_font_set(font_name, font_size),
-         elm_obj_code_widget_line_numbers_set(EINA_TRUE),
-         elm_obj_code_widget_editable_set(EINA_FALSE));
+   elm_obj_code_widget_font_set(widget, font_name, font_size);
+   elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
+   elm_obj_code_widget_editable_set(widget, EINA_FALSE);
    evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_show(widget);
diff --git a/src/bin/screens/edi_settings_font.c 
b/src/bin/screens/edi_settings_font.c
index 23b8eb9..51633ce 100644
--- a/src/bin/screens/edi_settings_font.c
+++ b/src/bin/screens/edi_settings_font.c
@@ -38,11 +38,10 @@ _edi_settings_font_preview_add(Evas_Object *parent, const 
char *font_name, int f
    elm_code_file_line_append(code->file, FONT_PREVIEW, 35, NULL);
 
    widget = elm_code_widget_add(parent, code);
-   eo_do(widget,
-         elm_obj_code_widget_font_set(font_name, font_size),
-         elm_obj_code_widget_line_numbers_set(EINA_TRUE),
-         elm_obj_code_widget_editable_set(EINA_FALSE),
-         elm_obj_code_widget_policy_set(ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF));
+   elm_obj_code_widget_font_set(widget, font_name, font_size);
+   elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
+   elm_obj_code_widget_editable_set(widget, EINA_FALSE);
+   elm_obj_code_widget_policy_set(widget, ELM_SCROLLER_POLICY_OFF, 
ELM_SCROLLER_POLICY_OFF);
    evas_object_size_hint_weight_set(widget, 0.5, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_show(widget);

-- 


Reply via email to