Fixing compiles errors from examples, c and c#.

Summary: Change from efl broke the compilation of examples, updating names to the new changes.

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Differential Revision: https://phab.enlightenment.org/D9581
devs/lauromoura/cv
Bruno da Silva Belo 3 years ago committed by Felipe Magno de Almeida
parent e8245fe5dd
commit fa93b9f7c0
  1. 2
      apps/c/life/src/life_main.c
  2. 2
      apps/c/texteditor/src/texteditor_main.c
  3. 2
      apps/csharp/life/src/life_main.cs
  4. 12
      apps/csharp/texteditor/src/texteditor_main.cs
  5. 4
      reference/c/ui/src/focus_main.c
  6. 2
      reference/c/ui/src/ui_container.c
  7. 2
      reference/c/ui/src/ui_translation.c
  8. 6
      reference/csharp/ui/src/focus_main.cs
  9. 2
      reference/csharp/ui/src/ui_container.cs
  10. 2
      reference/csharp/ui/src/ui_custom_widget.cs
  11. 2
      tutorial/c/hello-gui/src/gui_main.c
  12. 2
      tutorial/c/lifecycle_ui/src/lifecycle_main.c
  13. 2
      tutorial/csharp/hello-gui/src/gui_main.cs

@ -48,7 +48,7 @@ _life_win_key_down(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
win = event->object;
if (!strcmp(efl_input_key_get(ev), "space"))
if (!strcmp(efl_input_key_sym_get(ev), "space"))
life_board_pause_toggle(win);
}

@ -41,7 +41,7 @@ _gui_toolbar_button_add(Efl_Ui_Box *toolbar, const char *name,
button = efl_add(EFL_UI_BUTTON_CLASS, toolbar,
efl_text_set(efl_added, name),
efl_pack(toolbar, efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
func, efl_added));
efl_add(EFL_UI_IMAGE_CLASS, toolbar,

@ -31,7 +31,7 @@ public class LifeWindow : Efl.Csharp.Application
void KeyDownEvt(object sender, Efl.Input.IInterfaceKeyDownEvt_Args ev)
{
if (ev.arg.GetKey() == "space")
if (ev.arg.GetKeySym() == "space")
lifeBoard.TogglePause(win);
}

@ -61,7 +61,7 @@ public class TextEditor : Efl.Csharp.Application
{
var popup = new Efl.Ui.TextAlertPopup (win);
popup.SetText(message);
popup.SetExpandable(new Eina.Size2D(200, 200));
popup.SetHintSizeMax(new Eina.Size2D(200, 200));
popup.SetButton(Efl.Ui.AlertPopupButton.Positive, "OK", null);
popup.ButtonClickedEvt +=
(object sender, Efl.Ui.AlertPopupButtonClickedEvt_Args ea) => {
@ -72,7 +72,7 @@ public class TextEditor : Efl.Csharp.Application
// Adds a button to the toolbar, with the given text, icon and click event handler
private Efl.Ui.Button GUIToolbarButtonAdd(Efl.Ui.Box toolbar, string name,
string iconName, EventHandler<Efl.Ui.IClickableClickedEvt_Args> func)
string iconName, EventHandler<Efl.Input.IClickableClickedEvt_Args> func)
{
var button = new Efl.Ui.Button(toolbar);
button.SetText(name);
@ -102,7 +102,7 @@ public class TextEditor : Efl.Csharp.Application
// "New" button
toolbarButtonNew = GUIToolbarButtonAdd(bar, "New", "document-new",
(object sender, Efl.Ui.IClickableClickedEvt_Args ea) => {
(object sender, Efl.Input.IClickableClickedEvt_Args ea) => {
// When this button is clicked, remove content and refresh toolbar
editorTextBox.SetText("");
GUIToolbarRefresh();
@ -110,7 +110,7 @@ public class TextEditor : Efl.Csharp.Application
// "Save" button
toolbarButtonSave = GUIToolbarButtonAdd(bar, "Save", "document-save",
(object sender, Efl.Ui.IClickableClickedEvt_Args ea) => {
(object sender, Efl.Input.IClickableClickedEvt_Args ea) => {
// When this button is clicked, try to save content and refresh toolbar
try {
System.IO.File.WriteAllText(filename, editorTextBox.GetText());
@ -125,7 +125,7 @@ public class TextEditor : Efl.Csharp.Application
// "Load" button
toolbarButtonLoad = GUIToolbarButtonAdd(bar, "Load", "document-open",
(object sender, Efl.Ui.IClickableClickedEvt_Args ea) => {
(object sender, Efl.Input.IClickableClickedEvt_Args ea) => {
// When this button is clicked, try to load content and refresh toolbar
try {
editorTextBox.SetText(System.IO.File.ReadAllText(filename));
@ -147,7 +147,7 @@ public class TextEditor : Efl.Csharp.Application
bar.Pack(box);
// "Quit" button
GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { Efl.Ui.Config.Exit(); } );
GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, Efl.Input.IClickableClickedEvt_Args e) => { Efl.Ui.Config.Exit(); } );
}
// Builds the user interface for the text editor

@ -58,7 +58,7 @@ _gui_setup()
efl_pack(hbox, efl_added),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
_focus_changed, NULL),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_about_clicked_cb, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, hbox,
@ -66,7 +66,7 @@ _gui_setup()
efl_pack(hbox, efl_added),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
_focus_changed, NULL),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_clicked_cb, efl_added));
efl_ui_focus_util_focus(about);

@ -97,7 +97,7 @@ _ui_panes_setup(Efl_Ui_Win *win)
efl_text_set(efl_added, "Quit"),
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,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_cb, efl_added));
}

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

@ -18,7 +18,7 @@ public class Example : Efl.Csharp.Application
if (e.arg == false)
Efl.Ui.Config.Exit();
};
// Create the main box container
var vbox = new Efl.Ui.Box(win);
@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application
var button = new Efl.Ui.Button(hbox);
button.SetText("Focus mover");
button.FocusChangedEvt += FocusChangedCb;
button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => {
button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => {
Console.WriteLine("Clicked Focus Mover");
// Manually transfer focus to the first check box
Efl.Ui.Focus.Util.Focus(first_checkbox);
@ -57,7 +57,7 @@ public class Example : Efl.Csharp.Application
button = new Efl.Ui.Button(hbox);
button.SetText("Quit");
button.FocusChangedEvt += FocusChangedCb;
button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => {
button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => {
Console.WriteLine("Clicked Quit");
Efl.Ui.Config.Exit();
};

@ -98,7 +98,7 @@ public class Example : Efl.Csharp.Application
Efl.Ui.Button quit_btn = new Efl.Ui.Button(win);
quit_btn.SetText("Quit");
quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30));
quit_btn.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => {
quit_btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => {
// Exit the EFL main loop
Efl.Ui.Config.Exit();
};

@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application
// Instantiate our custom button widget
MyButton btn = new MyButton(win, 99);
btn.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => {
btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => {
// When the button is clicked, change its text
MyButton b = (MyButton)sender;
b.SetText("Hello!");

@ -41,7 +41,7 @@ _gui_setup()
efl_text_set(efl_added, "Quit"),
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,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_cb, efl_added));
}

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

@ -48,7 +48,7 @@ public class Example : Efl.Csharp.Application
button.SetText("Quit");
button.SetHintWeight(1.0, 0.1);
// Set the method to be called when the button is pressed
button.ClickedEvt += (object sender, Efl.Ui.IClickableClickedEvt_Args e) => { Efl.App.AppMain.Quit(0); };
button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { Efl.App.AppMain.Quit(0); };
// Add the button to the box container
box.Pack(button);
}

Loading…
Cancel
Save