fix examples build for latest efl

devs/lauromoura/csharp_app
Mike Blumenkrantz 4 years ago
parent 780ebf91c5
commit d16b7e48bc
  1. 2
      apps/c/life/src/life_main.c
  2. 6
      apps/c/texteditor/src/texteditor_main.c
  3. 6
      reference/c/ui/src/focus_main.c
  4. 4
      reference/c/ui/src/ui_container.c
  5. 4
      reference/c/ui/src/ui_sizing.c
  6. 2
      reference/c/ui/src/ui_translation.c
  7. 8
      tutorial/c/hello-gui/src/gui_main.c
  8. 2
      tutorial/c/lifecycle_ui/src/lifecycle_main.c
  9. 36
      unsorted/elementary/efl_ui_list_example_1.c

@ -76,7 +76,7 @@ _life_win_setup(void)
life_render_init(win);
life_render_refresh(win);
efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_RESIZE, _life_win_resize, NULL);
efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _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);

@ -59,7 +59,7 @@ _gui_toolbar_setup(Efl_Ui_Box *parent)
bar = efl_add(EFL_UI_BOX_CLASS, parent,
efl_pack(parent, efl_added),
efl_gfx_size_hint_weight_set(efl_added, 1, 0),
efl_gfx_hint_weight_set(efl_added, 1, 0),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
_toolbar_new = _gui_toolbar_button_add(bar, "New", "document-new", _gui_new_clicked_cb);
@ -67,7 +67,7 @@ _gui_toolbar_setup(Efl_Ui_Box *parent)
// spacer box
efl_add(EFL_UI_BOX_CLASS, parent,
efl_pack(bar, efl_added),
efl_gfx_size_hint_weight_set(efl_added, 10, 0));
efl_gfx_hint_weight_set(efl_added, 10, 0));
_gui_toolbar_button_add(bar, "Quit", "application-exit", _gui_quit_cb);
_gui_toolbar_refresh();
@ -98,7 +98,7 @@ _gui_setup()
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
_gui_toolbar_setup(box);

@ -40,7 +40,7 @@ _gui_setup()
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_set(efl_added, "Label"),
@ -51,7 +51,7 @@ _gui_setup()
hbox = efl_add(EFL_UI_BOX_CLASS, box,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.1),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
efl_pack(box, efl_added));
about = efl_add(EFL_UI_BUTTON_CLASS, hbox,
@ -70,7 +70,7 @@ _gui_setup()
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_clicked_cb, efl_added));
efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, about);
efl_ui_focus_util_focus(about);
}
EAPI_MAIN void

@ -71,7 +71,7 @@ _ui_boxes_setup(Efl_Ui_Win *win)
efl_pack(box, efl_added));
if (i == 2)
efl_gfx_size_hint_max_set(button, EINA_SIZE2D(100, 50));
efl_gfx_hint_size_max_set(button, EINA_SIZE2D(100, 50));
}
return box;
@ -96,7 +96,7 @@ _ui_panes_setup(Efl_Ui_Win *win)
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Quit"),
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(150, 30)),
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(150, 30)),
efl_content_set(efl_part(horiz_split, "second"), efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));

@ -45,12 +45,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Small"),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(50, 50)));
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(50, 50)));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Big Button"),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
}

@ -55,7 +55,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_ui_l10n_text_set(efl_added, "Quit", _TEXT_DOMAIN),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));

@ -26,18 +26,18 @@ _gui_setup()
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
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_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_gfx_hint_weight_set(efl_added, 1.0, 0.9),
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
efl_pack(box, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, box,
efl_text_set(efl_added, "Quit"),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.1),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
efl_pack(box, efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));

@ -24,7 +24,7 @@ _gui_setup()
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Quit"),
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_clicked_cb, efl_added));
}

@ -115,15 +115,15 @@ elm_main(int argc, char **argv)
wbox = efl_add(EFL_UI_BOX_CLASS, win);
efl_ui_direction_set(wbox, EFL_UI_DIR_VERTICAL);
efl_gfx_size_hint_weight_set(wbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
efl_gfx_size_hint_align_set(wbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
efl_gfx_hint_weight_set(wbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
efl_gfx_hint_align_set(wbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
if ((argv[1] != NULL) &&
(!strcmp(argv[1], "empty")))
emptystyle = EINA_TRUE;
priv_d.list = list = efl_add(EFL_UI_LIST_CLASS, wbox);
efl_gfx_size_hint_weight_set(list, EFL_GFX_SIZE_HINT_EXPAND, 0.9);
efl_gfx_hint_weight_set(list, EFL_GFX_SIZE_HINT_EXPAND, 0.9);
efl_event_callback_add(list, EFL_UI_EVENT_SELECTED, _list_selected, NULL);
efl_event_callback_add(list, EFL_UI_EVENT_UNSELECTED, _list_unselected, NULL);
@ -145,7 +145,7 @@ elm_main(int argc, char **argv)
efl_ui_direction_set(ibox, EFL_UI_DIR_HORIZONTAL);
txt = efl_add(EFL_UI_TEXT_CLASS, ibox);
efl_gfx_size_hint_weight_set(txt, 0.95, EFL_GFX_SIZE_HINT_EXPAND);
efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_SIZE_HINT_EXPAND);
efl_text_halign_set(txt, 0.2);
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
snprintf(buf, sizeof(buf), "empty style item [%d]", i);
@ -153,7 +153,7 @@ elm_main(int argc, char **argv)
efl_pack_end(ibox, txt);
check = efl_add(EFL_UI_CHECK_CLASS, ibox);
efl_gfx_size_hint_weight_set(check, 0.05, EFL_GFX_SIZE_HINT_EXPAND);
efl_gfx_hint_weight_set(check, 0.05, EFL_GFX_SIZE_HINT_EXPAND);
efl_pack_end(ibox, check);
if (i % 2)
@ -223,7 +223,7 @@ elm_main(int argc, char **argv)
/*select mode */
txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
efl_gfx_size_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
efl_gfx_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
efl_text_halign_set(txt, 0.02);
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
efl_text_set(txt, "Select Mode");
@ -231,7 +231,7 @@ elm_main(int argc, char **argv)
bbox = efl_add(EFL_UI_BOX_CLASS, wbox);
efl_ui_direction_set(bbox, EFL_UI_DIR_HORIZONTAL);
efl_gfx_size_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
efl_gfx_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
select_radio = radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
efl_text_set(radio, "SINGLE");
@ -260,7 +260,7 @@ elm_main(int argc, char **argv)
/* scroll mode */
txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
efl_gfx_size_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
efl_gfx_hint_weight_set(txt, EFL_GFX_SIZE_HINT_EXPAND, 0.01);
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
efl_text_halign_set(txt, 0.02);
efl_text_set(txt, "Item Scroll");
@ -268,27 +268,27 @@ elm_main(int argc, char **argv)
priv_d.slider = slider = efl_add(EFL_UI_SLIDER_CLASS, wbox);
efl_ui_direction_set(slider, EFL_UI_DIR_HORIZONTAL);
efl_gfx_size_hint_weight_set(slider, 0.0, 0.05);
efl_gfx_size_hint_align_set(slider, 0.5, 0.5);
efl_gfx_size_hint_min_set(slider, EINA_SIZE2D(380, 20));
efl_gfx_hint_weight_set(slider, 0.0, 0.05);
efl_gfx_hint_align_set(slider, 0.5, 0.5);
efl_gfx_hint_size_min_set(slider, EINA_SIZE2D(380, 20));
efl_ui_range_min_max_set(slider, 0.0, 1.0);
efl_pack_end(wbox, slider);
bbox = efl_add(EFL_UI_BOX_CLASS, wbox);
efl_ui_direction_set(bbox, EFL_UI_DIR_HORIZONTAL);
efl_gfx_size_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
efl_gfx_hint_weight_set(bbox, EFL_GFX_SIZE_HINT_EXPAND, 0.05);
rbox = efl_add(EFL_UI_BOX_CLASS, bbox);
efl_ui_direction_set(rbox, EFL_UI_DIR_VERTICAL);
anim_radio = radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
efl_gfx_size_hint_align_set(radio, 0.5, 0.5);
efl_gfx_hint_align_set(radio, 0.5, 0.5);
efl_text_set(radio, "ANIMATION OFF");
efl_ui_radio_state_value_set(radio, 0);
efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _anim_radio_changed, NULL);
efl_pack_end(rbox, radio);
radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
efl_gfx_size_hint_align_set(radio, 0.5, 0.5);
efl_gfx_hint_align_set(radio, 0.5, 0.5);
efl_text_set(radio, "ANIMATION ON");
efl_ui_radio_state_value_set(radio, 1);
efl_ui_radio_group_add(radio, anim_radio);
@ -301,15 +301,15 @@ elm_main(int argc, char **argv)
scrl_btn = efl_add(EFL_UI_BUTTON_CLASS, rbox);
efl_text_set(scrl_btn, "Scroll Item");
efl_gfx_size_hint_align_set(scrl_btn, 0.5, 0.5);
efl_gfx_size_hint_min_set(scrl_btn, EINA_SIZE2D(200, 25));
efl_gfx_hint_align_set(scrl_btn, 0.5, 0.5);
efl_gfx_hint_size_min_set(scrl_btn, EINA_SIZE2D(200, 25));
efl_event_callback_add(scrl_btn, EFL_UI_EVENT_CLICKED, _scrl_btn_clicked, NULL);
efl_pack_end(rbox, scrl_btn);
scrl_btn = efl_add(EFL_UI_BUTTON_CLASS, rbox);
efl_text_set(scrl_btn, "Scroll Item Align");
efl_gfx_size_hint_align_set(scrl_btn, 0.5, 0.5);
efl_gfx_size_hint_min_set(scrl_btn, EINA_SIZE2D(200, 25));
efl_gfx_hint_align_set(scrl_btn, 0.5, 0.5);
efl_gfx_hint_size_min_set(scrl_btn, EINA_SIZE2D(200, 25));
efl_event_callback_add(scrl_btn, EFL_UI_EVENT_CLICKED, _scrl_align_btn_clicked, NULL);
efl_pack_end(rbox, scrl_btn);

Loading…
Cancel
Save