Adjusted code to use the Eo2 API.

This commit is contained in:
Tom Hacohen 2014-04-03 12:27:57 +01:00
parent 4e5cac21bf
commit ea387769f5
8 changed files with 14 additions and 24 deletions

View File

@ -62,8 +62,8 @@ static void _loop(double t, int f)
eo_do(o_images[i], evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_image_data_get(1, (void **) &data),
evas_obj_image_stride_get(&st));
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
st = st >> 2;
p = data;
for (y = 0; y < h; y++)

View File

@ -62,8 +62,8 @@ static void _loop(double t, int f)
eo_do(o_images[i], evas_obj_position_set(x, y),
evas_obj_size_set(w, h),
evas_obj_image_fill_set(0, 0, w, h),
evas_obj_image_data_get(1, (void **) &data),
evas_obj_image_stride_get(&st));
data = evas_obj_image_data_get(1),
st = evas_obj_image_stride_get());
st = st >> 2;
p = data;
for (y = 0; y < h; y++)

View File

@ -1390,12 +1390,10 @@ main(int argc, char **argv)
ui_loop();
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
if (evas)
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(&ret));
evas_canvas_render_async());
}
else
{

View File

@ -36,7 +36,7 @@ static void _setup(void)
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
o_images[i] = o;
if (o)
eo_do(o, evas_obj_image_source_set(src, NULL),
eo_do(o, evas_obj_image_source_set(src),
evas_obj_size_set(120, 160),
evas_obj_image_fill_set(0,0,120,160),
evas_obj_visibility_set(EINA_TRUE));

View File

@ -49,7 +49,7 @@ static void _setup(void)
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
o_texts[i] = o;
if (o)
eo_do(o, evas_obj_image_source_set(s, NULL));
eo_do(o, evas_obj_image_source_set(s));
/* FIXME s == NULL*/
if (s)
eo_do(s, evas_obj_size_get(&w, &h));

View File

@ -58,7 +58,7 @@ static void _setup(void)
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
o_texts[i] = o;
if (o)
eo_do(o, evas_obj_image_source_set(o_texts[0], NULL));
eo_do(o, evas_obj_image_source_set(o_texts[0]));
if (o_texts[0])
eo_do(o_texts[0], evas_obj_size_get(&w, &h));
if (o)

View File

@ -117,7 +117,7 @@ static void _loop(double t, int f)
Evas_Textblock_Cursor *cur;
static Evas_Textblock_Cursor *cur2;
if (o_text)
eo_do(o_text, evas_obj_textblock_cursor_get(&cur));
eo_do(o_text, cur = evas_obj_textblock_cursor_get());
evas_textblock_cursor_text_append(cur, "*");
evas_textblock_cursor_char_delete(cur);
@ -125,7 +125,7 @@ static void _loop(double t, int f)
if (!cur2)
{
if (o_text)
eo_do(o_text, evas_obj_textblock_cursor_new(&cur2));
eo_do(o_text, cur2 = evas_obj_textblock_cursor_new());
evas_textblock_cursor_paragraph_last(cur2);
evas_textblock_cursor_paragraph_char_first(cur2);
}

View File

@ -276,12 +276,10 @@ _ui_all(void)
ui_loop();
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
if (evas)
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(&ret));
evas_canvas_render_async());
}
else
{
@ -293,12 +291,10 @@ _ui_all(void)
counted at all. */
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
if (evas)
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(&ret));
evas_canvas_render_async());
}
else
{
@ -415,12 +411,10 @@ _ui_num(int n)
engine_loop();
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
if (evas)
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(&ret));
evas_canvas_render_async());
}
else
{
@ -432,12 +426,10 @@ _ui_num(int n)
counted at all. */
if (async_render)
{
Eina_Bool ret = EINA_FALSE;
if (evas)
eo_do(evas,
evas_canvas_sync(),
evas_canvas_render_async(&ret));
evas_canvas_render_async());
}
else
{