summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-04-23 12:27:50 +0200
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-05-01 13:21:12 -0400
commit4a8b562a40dfffb96288f56346cd2b140079ea0e (patch)
tree3407e70f70928464307b51adbb52ac5944709f74
parent09923d92c2936c086b738c6001c53ebd17e36f13 (diff)
Update examples after EFL API rename
Differential Revision: https://phab.enlightenment.org/D6002
-rw-r--r--apps/c/life/src/life_main.c8
-rw-r--r--apps/c/life/src/life_render.c8
-rw-r--r--apps/c/texteditor/src/texteditor_main.c2
-rw-r--r--reference/c/ui/src/ui_container.c2
-rw-r--r--reference/c/ui/src/ui_sizing.c2
-rw-r--r--reference/c/ui/src/ui_translation.c2
-rw-r--r--tutorial/c/focus/src/focus_main.c2
-rw-r--r--tutorial/c/hello-gui/src/gui_main.c2
8 files changed, 14 insertions, 14 deletions
diff --git a/apps/c/life/src/life_main.c b/apps/c/life/src/life_main.c
index ba0b4653..03769724 100644
--- a/apps/c/life/src/life_main.c
+++ b/apps/c/life/src/life_main.c
@@ -69,18 +69,18 @@ _life_win_setup(void)
69 // when the user clicks "close" on a window there is a request to delete 69 // when the user clicks "close" on a window there is a request to delete
70 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _life_win_quit, NULL); 70 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _life_win_quit, NULL);
71 71
72 w = 10 * LIFE_BOARD_WIDTH * efl_gfx_scale_get(win); 72 w = 10 * LIFE_BOARD_WIDTH * efl_gfx_entity_scale_get(win);
73 h = 10 * LIFE_BOARD_HEIGHT * efl_gfx_scale_get(win); 73 h = 10 * LIFE_BOARD_HEIGHT * efl_gfx_entity_scale_get(win);
74 74
75 life_board_init(); 75 life_board_init();
76 life_render_init(win); 76 life_render_init(win);
77 life_render_refresh(win); 77 life_render_refresh(win);
78 78
79 efl_event_callback_add(win, EFL_GFX_EVENT_RESIZE, _life_win_resize, NULL); 79 efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_RESIZE, _life_win_resize, NULL);
80 efl_event_callback_add(win, EFL_EVENT_POINTER_DOWN, _life_win_touch, NULL); 80 efl_event_callback_add(win, EFL_EVENT_POINTER_DOWN, _life_win_touch, NULL);
81 efl_event_callback_add(win, EFL_EVENT_KEY_DOWN, _life_win_key_down, NULL); 81 efl_event_callback_add(win, EFL_EVENT_KEY_DOWN, _life_win_key_down, NULL);
82 82
83 efl_gfx_size_set(win, EINA_SIZE2D(w, h)); 83 efl_gfx_entity_size_set(win, EINA_SIZE2D(w, h));
84 84
85 return win; 85 return win;
86} 86}
diff --git a/apps/c/life/src/life_render.c b/apps/c/life/src/life_render.c
index 9fd2da82..098a9008 100644
--- a/apps/c/life/src/life_render.c
+++ b/apps/c/life/src/life_render.c
@@ -29,7 +29,7 @@ life_render_cell_for_coords(Efl_Ui_Win *win, Eina_Position2D coord,
29{ 29{
30 Eina_Size2D size; 30 Eina_Size2D size;
31 31
32 size = efl_gfx_size_get(win); 32 size = efl_gfx_entity_size_get(win);
33 33
34 if (x) 34 if (x)
35 *x = coord.x / ((double) size.w / LIFE_BOARD_WIDTH); 35 *x = coord.x / ((double) size.w / LIFE_BOARD_WIDTH);
@@ -51,7 +51,7 @@ life_render_layout(Efl_Ui_Win *win)
51 Evas_Object *rect; 51 Evas_Object *rect;
52 int x, y; 52 int x, y;
53 53
54 size = efl_gfx_size_get(win); 54 size = efl_gfx_entity_size_get(win);
55 cw = (double) size.w / LIFE_BOARD_WIDTH; 55 cw = (double) size.w / LIFE_BOARD_WIDTH;
56 ch = (double) size.h / LIFE_BOARD_HEIGHT; 56 ch = (double) size.h / LIFE_BOARD_HEIGHT;
57 57
@@ -61,8 +61,8 @@ life_render_layout(Efl_Ui_Win *win)
61 rect = _life_cells[life_render_index_for_position(x, y)]; 61 rect = _life_cells[life_render_index_for_position(x, y)];
62 62
63 // the little +1 here will avoid tearing as we layout non-multiple sizes 63 // the little +1 here will avoid tearing as we layout non-multiple sizes
64 efl_gfx_size_set(rect, EINA_SIZE2D(cw + 1, ch + 1)); 64 efl_gfx_entity_size_set(rect, EINA_SIZE2D(cw + 1, ch + 1));
65 efl_gfx_position_set(rect, EINA_POSITION2D(x * cw, y * ch)); 65 efl_gfx_entity_position_set(rect, EINA_POSITION2D(x * cw, y * ch));
66 } 66 }
67} 67}
68 68
diff --git a/apps/c/texteditor/src/texteditor_main.c b/apps/c/texteditor/src/texteditor_main.c
index 3a7e428b..ef80c106 100644
--- a/apps/c/texteditor/src/texteditor_main.c
+++ b/apps/c/texteditor/src/texteditor_main.c
@@ -105,7 +105,7 @@ _gui_setup()
105 _editor = efl_add(EFL_UI_TEXT_CLASS, box, 105 _editor = efl_add(EFL_UI_TEXT_CLASS, box,
106 efl_text_font_set(efl_added, "Mono", 14), 106 efl_text_font_set(efl_added, "Mono", 14),
107 efl_text_multiline_set(efl_added, EINA_TRUE), 107 efl_text_multiline_set(efl_added, EINA_TRUE),
108 efl_ui_text_interactive_editable_set(efl_added, EINA_TRUE), 108 efl_text_interactive_editable_set(efl_added, EINA_TRUE),
109 efl_ui_text_scrollable_set(efl_added, EINA_TRUE), 109 efl_ui_text_scrollable_set(efl_added, EINA_TRUE),
110 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL), 110 efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
111 efl_pack(box, efl_added)); 111 efl_pack(box, efl_added));
diff --git a/reference/c/ui/src/ui_container.c b/reference/c/ui/src/ui_container.c
index b18d10d3..c98555f8 100644
--- a/reference/c/ui/src/ui_container.c
+++ b/reference/c/ui/src/ui_container.c
@@ -117,7 +117,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
117 117
118 _ui_panes_setup(win); 118 _ui_panes_setup(win);
119 119
120 efl_gfx_size_set(win, EINA_SIZE2D(350, 250)); 120 efl_gfx_entity_size_set(win, EINA_SIZE2D(350, 250));
121} 121}
122EFL_MAIN() 122EFL_MAIN()
123 123
diff --git a/reference/c/ui/src/ui_sizing.c b/reference/c/ui/src/ui_sizing.c
index 8815466e..72dfa18e 100644
--- a/reference/c/ui/src/ui_sizing.c
+++ b/reference/c/ui/src/ui_sizing.c
@@ -52,7 +52,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
52 efl_pack_end(box, efl_added), 52 efl_pack_end(box, efl_added),
53 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100))); 53 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)));
54 54
55 efl_gfx_size_set(win, EINA_SIZE2D(320, 320)); 55 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
56} 56}
57EFL_MAIN() 57EFL_MAIN()
58 58
diff --git a/reference/c/ui/src/ui_translation.c b/reference/c/ui/src/ui_translation.c
index 8b4dc4cc..92956e10 100644
--- a/reference/c/ui/src/ui_translation.c
+++ b/reference/c/ui/src/ui_translation.c
@@ -60,7 +60,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
60 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, 60 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
61 _gui_quit_cb, efl_added)); 61 _gui_quit_cb, efl_added));
62 62
63 efl_gfx_size_set(win, EINA_SIZE2D(320, 320)); 63 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
64} 64}
65EFL_MAIN() 65EFL_MAIN()
66 66
diff --git a/tutorial/c/focus/src/focus_main.c b/tutorial/c/focus/src/focus_main.c
index d522f153..c527d8ae 100644
--- a/tutorial/c/focus/src/focus_main.c
+++ b/tutorial/c/focus/src/focus_main.c
@@ -44,7 +44,7 @@ _gui_setup()
44 44
45 efl_add(EFL_UI_TEXT_CLASS, box, 45 efl_add(EFL_UI_TEXT_CLASS, box,
46 efl_text_set(efl_added, "Label"), 46 efl_text_set(efl_added, "Label"),
47 efl_ui_text_interactive_editable_set(efl_added, EINA_FALSE), 47 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
48 efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, 48 efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
49 _focus_changed, NULL), 49 _focus_changed, NULL),
50 efl_pack(box, efl_added)); 50 efl_pack(box, efl_added));
diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c
index 69b8b075..f24af583 100644
--- a/tutorial/c/hello-gui/src/gui_main.c
+++ b/tutorial/c/hello-gui/src/gui_main.c
@@ -30,7 +30,7 @@ _gui_setup()
30 30
31 efl_add(EFL_UI_TEXT_CLASS, box, 31 efl_add(EFL_UI_TEXT_CLASS, box,
32 efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"), 32 efl_text_markup_set(efl_added, "Hello World.<br>This is an <b>Efl.Ui</b> application!"),
33 efl_ui_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), 33 efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
34 efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.9), 34 efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.9),
35 efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5), 35 efl_gfx_size_hint_align_set(efl_added, 0.5, 0.5),
36 efl_pack(box, efl_added)); 36 efl_pack(box, efl_added));