Adjust code to use the slightly different Eo2 API.
With Eo2 you can return values directly without the need to use a pointer (use the C return). For example: eo_do(obj, elm_object_text_get(&text)); becomes: eo_do(obj, text = elm_object_text_get()); @feature
This commit is contained in:
commit
4848c66d47
|
@ -62,8 +62,8 @@ static void _loop(double t, int f)
|
||||||
eo_do(o_images[i], evas_obj_position_set(x, y),
|
eo_do(o_images[i], evas_obj_position_set(x, y),
|
||||||
evas_obj_size_set(w, h),
|
evas_obj_size_set(w, h),
|
||||||
evas_obj_image_fill_set(0, 0, w, h),
|
evas_obj_image_fill_set(0, 0, w, h),
|
||||||
evas_obj_image_data_get(1, (void **) &data),
|
data = evas_obj_image_data_get(1),
|
||||||
evas_obj_image_stride_get(&st));
|
st = evas_obj_image_stride_get());
|
||||||
st = st >> 2;
|
st = st >> 2;
|
||||||
p = data;
|
p = data;
|
||||||
for (y = 0; y < h; y++)
|
for (y = 0; y < h; y++)
|
||||||
|
|
|
@ -62,8 +62,8 @@ static void _loop(double t, int f)
|
||||||
eo_do(o_images[i], evas_obj_position_set(x, y),
|
eo_do(o_images[i], evas_obj_position_set(x, y),
|
||||||
evas_obj_size_set(w, h),
|
evas_obj_size_set(w, h),
|
||||||
evas_obj_image_fill_set(0, 0, w, h),
|
evas_obj_image_fill_set(0, 0, w, h),
|
||||||
evas_obj_image_data_get(1, (void **) &data),
|
data = evas_obj_image_data_get(1),
|
||||||
evas_obj_image_stride_get(&st));
|
st = evas_obj_image_stride_get());
|
||||||
st = st >> 2;
|
st = st >> 2;
|
||||||
p = data;
|
p = data;
|
||||||
for (y = 0; y < h; y++)
|
for (y = 0; y < h; y++)
|
||||||
|
|
|
@ -1390,12 +1390,10 @@ main(int argc, char **argv)
|
||||||
ui_loop();
|
ui_loop();
|
||||||
if (async_render)
|
if (async_render)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
|
||||||
|
|
||||||
if (evas)
|
if (evas)
|
||||||
eo_do(evas,
|
eo_do(evas,
|
||||||
evas_canvas_sync(),
|
evas_canvas_sync(),
|
||||||
evas_canvas_render_async(&ret));
|
evas_canvas_render_async());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ static void _setup(void)
|
||||||
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
||||||
o_images[i] = o;
|
o_images[i] = o;
|
||||||
if (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_size_set(120, 160),
|
||||||
evas_obj_image_fill_set(0,0,120,160),
|
evas_obj_image_fill_set(0,0,120,160),
|
||||||
evas_obj_visibility_set(EINA_TRUE));
|
evas_obj_visibility_set(EINA_TRUE));
|
||||||
|
|
|
@ -49,7 +49,7 @@ static void _setup(void)
|
||||||
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
||||||
o_texts[i] = o;
|
o_texts[i] = o;
|
||||||
if (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*/
|
/* FIXME s == NULL*/
|
||||||
if (s)
|
if (s)
|
||||||
eo_do(s, evas_obj_size_get(&w, &h));
|
eo_do(s, evas_obj_size_get(&w, &h));
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void _setup(void)
|
||||||
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
o = eo_add(EVAS_OBJ_IMAGE_CLASS, evas);
|
||||||
o_texts[i] = o;
|
o_texts[i] = o;
|
||||||
if (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])
|
if (o_texts[0])
|
||||||
eo_do(o_texts[0], evas_obj_size_get(&w, &h));
|
eo_do(o_texts[0], evas_obj_size_get(&w, &h));
|
||||||
if (o)
|
if (o)
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void _loop(double t, int f)
|
||||||
Evas_Textblock_Cursor *cur;
|
Evas_Textblock_Cursor *cur;
|
||||||
static Evas_Textblock_Cursor *cur2;
|
static Evas_Textblock_Cursor *cur2;
|
||||||
if (o_text)
|
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_text_append(cur, "*");
|
||||||
evas_textblock_cursor_char_delete(cur);
|
evas_textblock_cursor_char_delete(cur);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ static void _loop(double t, int f)
|
||||||
if (!cur2)
|
if (!cur2)
|
||||||
{
|
{
|
||||||
if (o_text)
|
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_last(cur2);
|
||||||
evas_textblock_cursor_paragraph_char_first(cur2);
|
evas_textblock_cursor_paragraph_char_first(cur2);
|
||||||
}
|
}
|
||||||
|
|
16
src/bin/ui.c
16
src/bin/ui.c
|
@ -276,12 +276,10 @@ _ui_all(void)
|
||||||
ui_loop();
|
ui_loop();
|
||||||
if (async_render)
|
if (async_render)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
|
||||||
|
|
||||||
if (evas)
|
if (evas)
|
||||||
eo_do(evas,
|
eo_do(evas,
|
||||||
evas_canvas_sync(),
|
evas_canvas_sync(),
|
||||||
evas_canvas_render_async(&ret));
|
evas_canvas_render_async());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -293,12 +291,10 @@ _ui_all(void)
|
||||||
counted at all. */
|
counted at all. */
|
||||||
if (async_render)
|
if (async_render)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
|
||||||
|
|
||||||
if (evas)
|
if (evas)
|
||||||
eo_do(evas,
|
eo_do(evas,
|
||||||
evas_canvas_sync(),
|
evas_canvas_sync(),
|
||||||
evas_canvas_render_async(&ret));
|
evas_canvas_render_async());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -415,12 +411,10 @@ _ui_num(int n)
|
||||||
engine_loop();
|
engine_loop();
|
||||||
if (async_render)
|
if (async_render)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
|
||||||
|
|
||||||
if (evas)
|
if (evas)
|
||||||
eo_do(evas,
|
eo_do(evas,
|
||||||
evas_canvas_sync(),
|
evas_canvas_sync(),
|
||||||
evas_canvas_render_async(&ret));
|
evas_canvas_render_async());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -432,12 +426,10 @@ _ui_num(int n)
|
||||||
counted at all. */
|
counted at all. */
|
||||||
if (async_render)
|
if (async_render)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
|
||||||
|
|
||||||
if (evas)
|
if (evas)
|
||||||
eo_do(evas,
|
eo_do(evas,
|
||||||
evas_canvas_sync(),
|
evas_canvas_sync(),
|
||||||
evas_canvas_render_async(&ret));
|
evas_canvas_render_async());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue