diff --git a/tutorial/csharp/focus/src/focus_main.cs b/tutorial/csharp/focus/src/focus_main.cs index c8e34f87..741acb45 100644 --- a/tutorial/csharp/focus/src/focus_main.cs +++ b/tutorial/csharp/focus/src/focus_main.cs @@ -15,52 +15,51 @@ public class Example public static void FocusChangedCb(object sender, EventArgs e) { - Console.WriteLine($"Focus for object {((efl.Text)sender).GetText()} changed to {((efl.ui.Widget)sender).GetFocus()}"); + Console.WriteLine($"Focus for object {((efl.IText)sender).GetText()} changed to {((efl.ui.IWidget)sender).GetFocus()}"); } public static void Main() { efl.All.Init(efl.Components.Ui); - efl.ui.Win win = new efl.ui.WinConcrete(null, (efl.ui.Win ewin) => { - ewin.SetWinType(efl.ui.win.Type.Basic); + efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { + ewin.SetWinType(efl.ui.Win_Type.Basic); ewin.SetText("Hello World"); ewin.SetAutohide(true); }); - win.HIDE += QuitCb; + win.HideEvt += QuitCb; - efl.ui.Box box = new efl.ui.BoxConcrete(win); + efl.ui.IBox box = new efl.ui.Box(win); eina.Size2D sz; sz.W = 360; sz.H = 240; box.SetHintMin(sz); win.SetContent(box); - efl.ui.Text text = new efl.ui.TextConcrete(box); + efl.ui.IText text = new efl.ui.Text(box); text.SetText("Label"); text.SetEditable(false); - text.FOCUS_CHANGED += FocusChangedCb; - box.Pack(text); + text.FocusChangedEvt += FocusChangedCb; + box.DoPack(text); - efl.ui.Box hbox = new efl.ui.BoxConcrete(box); + efl.ui.IBox hbox = new efl.ui.Box(box); hbox.SetDirection(efl.ui.Dir.Horizontal); hbox.SetHintWeight(1.0, 0.1); - box.Pack(hbox); + box.DoPack(hbox); - efl.ui.Button about = new efl.ui.ButtonConcrete(hbox); + efl.ui.IButton about = new efl.ui.Button(hbox); about.SetText("About"); - about.FOCUS_CHANGED += FocusChangedCb; - about.CLICKED += AboutCb; - hbox.Pack(about); + about.FocusChangedEvt += FocusChangedCb; + about.ClickedEvt += AboutCb; + hbox.DoPack(about); - efl.ui.Button quit = new efl.ui.ButtonConcrete(hbox); + efl.ui.IButton quit = new efl.ui.Button(hbox); quit.SetText("Quit"); - quit.FOCUS_CHANGED += FocusChangedCb; - quit.CLICKED += QuitCb; - hbox.Pack(quit); + quit.FocusChangedEvt += FocusChangedCb; + quit.ClickedEvt += QuitCb; + hbox.DoPack(quit); - // TODO: Create public references to classes - // efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, about); + efl.ui.focus.Util.Focus(about); efl.ui.Config.Run(); diff --git a/tutorial/csharp/hello-gui/src/gui_main.cs b/tutorial/csharp/hello-gui/src/gui_main.cs index c5aef560..bd88fbd6 100644 --- a/tutorial/csharp/hello-gui/src/gui_main.cs +++ b/tutorial/csharp/hello-gui/src/gui_main.cs @@ -11,16 +11,16 @@ public class Example { efl.All.Init(efl.Components.Ui); - efl.ui.Win win = new efl.ui.WinConcrete(null, (efl.ui.Win ewin) => { - ewin.SetWinType(efl.ui.win.Type.Basic); + efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { + ewin.SetWinType(efl.ui.Win_Type.Basic); ewin.SetText("Hello World"); ewin.SetAutohide(true); }); // when the user clicks "close" on a window there is a request to hide - win.HIDE += QuitCb; + win.HideEvt += QuitCb; - efl.ui.Box box = new efl.ui.BoxConcrete(win); + efl.ui.IBox box = new efl.ui.Box(win); eina.Size2D sz; sz.W = 360; sz.H = 240; @@ -28,22 +28,22 @@ public class Example win.SetContent(box); - efl.ui.Text text = new efl.ui.TextConcrete(box); + efl.ui.IText text = new efl.ui.Text(box); // text.SetMarkup("Hello World.
This is an Efl.Ui application!"); // TODO: Correct .eo inheritance text.SetText("Hello World. This is an Efl.Ui application!"); text.SetSelectionAllowed(false); text.SetHintWeight(1.0, 0.9); text.SetHintAlign(0.5, 0.5); - box.Pack(text); + box.DoPack(text); - efl.ui.Button button = new efl.ui.ButtonConcrete(box); + efl.ui.IButton button = new efl.ui.Button(box); button.SetText("Quit"); button.SetHintWeight(1.0, 0.1); - button.CLICKED += QuitCb; + button.ClickedEvt += QuitCb; - box.Pack(button); + box.DoPack(button); efl.ui.Config.Run();