Update examples after EFL API rename

Differential Revision: https://phab.enlightenment.org/D6002
devs/lauromoura/fix-csharp-life
Xavi Artigas 5 years ago committed by Mike Blumenkrantz
parent 09923d92c2
commit 4a8b562a40
  1. 8
      apps/c/life/src/life_main.c
  2. 8
      apps/c/life/src/life_render.c
  3. 2
      apps/c/texteditor/src/texteditor_main.c
  4. 2
      reference/c/ui/src/ui_container.c
  5. 2
      reference/c/ui/src/ui_sizing.c
  6. 2
      reference/c/ui/src/ui_translation.c
  7. 2
      tutorial/c/focus/src/focus_main.c
  8. 2
      tutorial/c/hello-gui/src/gui_main.c

@ -69,18 +69,18 @@ _life_win_setup(void)
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _life_win_quit, NULL);
w = 10 * LIFE_BOARD_WIDTH * efl_gfx_scale_get(win);
h = 10 * LIFE_BOARD_HEIGHT * efl_gfx_scale_get(win);
w = 10 * LIFE_BOARD_WIDTH * efl_gfx_entity_scale_get(win);
h = 10 * LIFE_BOARD_HEIGHT * efl_gfx_entity_scale_get(win);
life_board_init();
life_render_init(win);
life_render_refresh(win);
efl_event_callback_add(win, EFL_GFX_EVENT_RESIZE, _life_win_resize, NULL);
efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_RESIZE, _life_win_resize, NULL);
efl_event_callback_add(win, EFL_EVENT_POINTER_DOWN, _life_win_touch, NULL);
efl_event_callback_add(win, EFL_EVENT_KEY_DOWN, _life_win_key_down, NULL);
efl_gfx_size_set(win, EINA_SIZE2D(w, h));
efl_gfx_entity_size_set(win, EINA_SIZE2D(w, h));
return win;
}

@ -29,7 +29,7 @@ life_render_cell_for_coords(Efl_Ui_Win *win, Eina_Position2D coord,
{
Eina_Size2D size;
size = efl_gfx_size_get(win);
size = efl_gfx_entity_size_get(win);
if (x)
*x = coord.x / ((double) size.w / LIFE_BOARD_WIDTH);
@ -51,7 +51,7 @@ life_render_layout(Efl_Ui_Win *win)
Evas_Object *rect;
int x, y;
size = efl_gfx_size_get(win);
size = efl_gfx_entity_size_get(win);
cw = (double) size.w / LIFE_BOARD_WIDTH;
ch = (double) size.h / LIFE_BOARD_HEIGHT;
@ -61,8 +61,8 @@ life_render_layout(Efl_Ui_Win *win)
rect = _life_cells[life_render_index_for_position(x, y)];
// the little +1 here will avoid tearing as we layout non-multiple sizes
efl_gfx_size_set(rect, EINA_SIZE2D(cw + 1, ch + 1));
efl_gfx_position_set(rect, EINA_POSITION2D(x * cw, y * ch));
efl_gfx_entity_size_set(rect, EINA_SIZE2D(cw + 1, ch + 1));
efl_gfx_entity_position_set(rect, EINA_POSITION2D(x * cw, y * ch));
}
}

@ -105,7 +105,7 @@ _gui_setup()
_editor = efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_font_set(efl_added, "Mono", 14),
efl_text_multiline_set(efl_added, EINA_TRUE),
efl_ui_text_interactive_editable_set(efl_added, EINA_TRUE),
efl_text_interactive_editable_set(efl_added, EINA_TRUE),
efl_ui_text_scrollable_set(efl_added, EINA_TRUE),
efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
efl_pack(box, efl_added));

@ -117,7 +117,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
_ui_panes_setup(win);
efl_gfx_size_set(win, EINA_SIZE2D(350, 250));
efl_gfx_entity_size_set(win, EINA_SIZE2D(350, 250));
}
EFL_MAIN()

@ -52,7 +52,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_pack_end(box, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_size_set(win, EINA_SIZE2D(320, 320));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
}
EFL_MAIN()

@ -60,7 +60,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));
efl_gfx_size_set(win, EINA_SIZE2D(320, 320));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
}
EFL_MAIN()

@ -44,7 +44,7 @@ _gui_setup()
efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_set(efl_added, "Label"),
efl_ui_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
_focus_changed, NULL),
efl_pack(box, efl_added));

@ -30,7 +30,7 @@ _gui_setup()
efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"),
efl_ui_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.9),
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
efl_pack(box, efl_added));

Loading…
Cancel
Save