Fixing some warnings. Not ideal handling of the Eo_Event_Description but it's less warn-tastic
This commit is contained in:
parent
a3e6ec6876
commit
1a2f4d1ad4
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
|
||||
#include <Eina.h>
|
||||
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Eo.h>
|
||||
|
||||
// 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", "");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue