From e3fd501e9bfe0776e4917f502f1f31ee957a3861 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sun, 9 Nov 2014 18:07:03 +0000 Subject: [PATCH] Fixing some warnings. Not ideal handling of the Eo_Event_Description but it's less warn-tastic --- elm_code/lib/elm_code.c | 2 +- elm_code/lib/elm_code_common.h | 4 +--- elm_code/lib/elm_code_widget.c | 15 +++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/elm_code/lib/elm_code.c b/elm_code/lib/elm_code.c index 7f43b7e..0186f83 100644 --- a/elm_code/lib/elm_code.c +++ b/elm_code/lib/elm_code.c @@ -98,7 +98,7 @@ elm_code_callback_fire(Elm_Code *code, const char *signal, void *data) EINA_LIST_FOREACH(code->widgets, item, widget) { - eo_do(widget, eo_event_callback_call(ELM_CODE_EVENT_LINE_SET_DONE, data)); + eo_do(widget, eo_event_callback_call((Eo_Event_Description *)signal, data)); } } diff --git a/elm_code/lib/elm_code_common.h b/elm_code/lib/elm_code_common.h index 76cfa2c..436bd45 100644 --- a/elm_code/lib/elm_code_common.h +++ b/elm_code/lib/elm_code_common.h @@ -3,9 +3,7 @@ #include -#define EFL_BETA_API_SUPPORT -#include - +// TODO figure out how this can be fixed #define ELM_CODE_EVENT_LINE_SET_DONE "line,set,done" //EAPI const Eo_Event_Description ELM_CODE_EVENT_LINE_SET_DONE = // EO_EVENT_DESCRIPTION("line,set,done", ""); diff --git a/elm_code/lib/elm_code_widget.c b/elm_code/lib/elm_code_widget.c index 5133172..02a4f87 100644 --- a/elm_code/lib/elm_code_widget.c +++ b/elm_code/lib/elm_code_widget.c @@ -31,7 +31,7 @@ EAPI void elm_code_widget_fill(Evas_Object *o, Elm_Code *code) { line = elm_code_file_line_get(code->file, y); content = elm_code_file_line_content_get(code->file, y); - chr = content; + chr = (char *)content; cells = evas_object_textgrid_cellrow_get(o, y - 1); length = strlen(content); @@ -55,11 +55,10 @@ EAPI void elm_code_widget_fill(Evas_Object *o, Elm_Code *code) evas_object_textgrid_update_add(o, 0, 0, w, h); } -static void -_elm_code_widget_line_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, - void *event_info) +static Eina_Bool +_elm_code_widget_line_cb(void *data EINA_UNUSED, Eo *obj, + const Eo_Event_Description *desc EINA_UNUSED, void *event_info) { - Elm_Code *code; Elm_Code_Line *line; Evas_Object *o; @@ -68,7 +67,6 @@ _elm_code_widget_line_cb(void *data, Eo *obj, const Eo_Event_Description *desc E unsigned int length, x; int w; - code = (Elm_Code *)data; line = (Elm_Code_Line *)event_info; o = (Evas_Object *)obj; @@ -76,7 +74,7 @@ _elm_code_widget_line_cb(void *data, Eo *obj, const Eo_Event_Description *desc E length = strlen(line->content); evas_object_textgrid_size_get(o, &w, NULL); - chr = line->content; + chr = (char *)line->content; for (x = 0; x < (unsigned int) w && x < length; x++) { cells[x].codepoint = *chr; @@ -93,6 +91,7 @@ _elm_code_widget_line_cb(void *data, Eo *obj, const Eo_Event_Description *desc E } evas_object_textgrid_update_add(o, 0, line->number - 1, w, 1); + return EINA_TRUE; } static void @@ -132,7 +131,7 @@ EAPI Evas_Object *elm_code_widget_add(Evas_Object *parent, Elm_Code *code) evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _elm_code_widget_resize_cb, code); - eo_do(o,eo_event_callback_add(ELM_CODE_EVENT_LINE_SET_DONE, _elm_code_widget_line_cb, code)); + eo_do(o,eo_event_callback_add((Eo_Event_Description *)ELM_CODE_EVENT_LINE_SET_DONE, _elm_code_widget_line_cb, code)); code->widgets = eina_list_append(code->widgets, o); return o;