csharp: Changes after adding I to interfaces

Summary:
 Ref T7751
 Depends on D8397 in the EFL repo

Reviewers: segfaultxavi, vitor.sousa, felipealmeida

Reviewed By: segfaultxavi

Tags: #efl_language_bindings

Maniphest Tasks: T7751

Differential Revision: https://phab.enlightenment.org/D8398
This commit is contained in:
Lauro Moura 2019-03-22 09:13:15 +01:00 committed by Xavi Artigas
parent 82dd23ba02
commit 735b848660
6 changed files with 17 additions and 17 deletions

View File

@ -10,14 +10,14 @@ public class LifeWindow
lifeRender.RenderLayout((Efl.Ui.Win)sender); lifeRender.RenderLayout((Efl.Ui.Win)sender);
} }
void QuitEvt(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args ev) void QuitEvt(object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args ev)
{ {
// quit the mainloop // quit the mainloop
if (ev.arg == false) if (ev.arg == false)
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();
} }
void TouchEvt(object sender, Efl.Input.InterfacePointerDownEvt_Args ev) void TouchEvt(object sender, Efl.Input.IInterfacePointerDownEvt_Args ev)
{ {
int cellx, celly; int cellx, celly;
Efl.Ui.Win win = (Efl.Ui.Win)sender; Efl.Ui.Win win = (Efl.Ui.Win)sender;
@ -29,7 +29,7 @@ public class LifeWindow
lifeRender.RenderCell(win, cellx, celly); lifeRender.RenderCell(win, cellx, celly);
} }
void KeyDownEvt(object sender, Efl.Input.InterfaceKeyDownEvt_Args ev) void KeyDownEvt(object sender, Efl.Input.IInterfaceKeyDownEvt_Args ev)
{ {
Efl.Ui.Win win = (Efl.Ui.Win)sender; Efl.Ui.Win win = (Efl.Ui.Win)sender;
if (ev.arg.GetKey() == "space") if (ev.arg.GetKey() == "space")
@ -43,7 +43,7 @@ public class LifeWindow
win.SetAutohide(true); win.SetAutohide(true);
// when the user clicks "close" on a window there is a request to hide // when the user clicks "close" on a window there is a request to hide
((Efl.Gfx.Entity)win).VisibilityChangedEvt += QuitEvt; ((Efl.Gfx.IEntity)win).VisibilityChangedEvt += QuitEvt;
Eina.Size2D sz; Eina.Size2D sz;
sz.W = (int)(10 * LifeBoard.Width * win.GetScale()); sz.W = (int)(10 * LifeBoard.Width * win.GetScale());
@ -53,9 +53,9 @@ public class LifeWindow
lifeRender = new LifeRender(win, lifeBoard); lifeRender = new LifeRender(win, lifeBoard);
lifeRender.Refresh(win); lifeRender.Refresh(win);
((Efl.Gfx.Entity)win).SizeChangedEvt += ResizeEvt; ((Efl.Gfx.IEntity)win).SizeChangedEvt += ResizeEvt;
((Efl.Input.Interface)win).PointerDownEvt += TouchEvt; ((Efl.Input.IInterface)win).PointerDownEvt += TouchEvt;
((Efl.Input.Interface)win).KeyDownEvt += KeyDownEvt; ((Efl.Input.IInterface)win).KeyDownEvt += KeyDownEvt;
win.SetSize(sz); win.SetSize(sz);

View File

@ -32,7 +32,7 @@ public class TextEditor
"texteditor_example.txt"); "texteditor_example.txt");
// Quits the application // Quits the application
private void GUIQuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args ea) private void GUIQuitCb(object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args ea)
{ {
if (ea.arg == false) if (ea.arg == false)
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();

View File

@ -4,7 +4,7 @@ public class Example
{ {
public static void FocusChangedCb(object sender, EventArgs e) 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.Widget)sender).GetFocus()}");
} }
#if WIN32 #if WIN32
@ -20,7 +20,7 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic); win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Focus example"); win.SetText("Focus example");
win.SetAutohide(true); win.SetAutohide(true);
win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => { win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop // Exit the EFL main loop
if (e.arg == false) if (e.arg == false)
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();

View File

@ -70,7 +70,7 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic); win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Container demo"); win.SetText("Container demo");
win.SetAutohide(true); win.SetAutohide(true);
win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => { win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop // Exit the EFL main loop
if (e.arg == false) if (e.arg == false)
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();
@ -86,19 +86,19 @@ public class Example
// Create some boxes and set them as the content of the first pane of the container // Create some boxes and set them as the content of the first pane of the container
var box = CreateBox(win); var box = CreateBox(win);
Efl.ContentConcrete.static_cast(vsplit.GetPart("first")).SetContent(box); Efl.IContentConcrete.static_cast(vsplit.GetPart("first")).SetContent(box);
// Create a second, horizontally-split panes container and set it as the content of // Create a second, horizontally-split panes container and set it as the content of
// the second pane of the first container // the second pane of the first container
Efl.Ui.Panes hsplit = new Efl.Ui.Panes(win); Efl.Ui.Panes hsplit = new Efl.Ui.Panes(win);
hsplit.SetDirection(Efl.Ui.Dir.Horizontal); hsplit.SetDirection(Efl.Ui.Dir.Horizontal);
hsplit.SetSplitRatio(0.85); hsplit.SetSplitRatio(0.85);
Efl.ContentConcrete.static_cast(vsplit.GetPart("second")).SetContent(hsplit); Efl.IContentConcrete.static_cast(vsplit.GetPart("second")).SetContent(hsplit);
// Create a table and set it as the content of the first pane of the horizontal // Create a table and set it as the content of the first pane of the horizontal
// container // container
var table = CreateTable(win); var table = CreateTable(win);
Efl.ContentConcrete.static_cast(hsplit.GetPart("first")).SetContent(table); Efl.IContentConcrete.static_cast(hsplit.GetPart("first")).SetContent(table);
// Create a button and set it as the content of the second pane of the horizontal // Create a button and set it as the content of the second pane of the horizontal
// container // container
@ -109,7 +109,7 @@ public class Example
// Exit the EFL main loop // Exit the EFL main loop
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();
}; };
Efl.ContentConcrete.static_cast(hsplit.GetPart("second")).SetContent(quit_btn); Efl.IContentConcrete.static_cast(hsplit.GetPart("second")).SetContent(quit_btn);
// Start the EFL main loop // Start the EFL main loop
Efl.Ui.Config.Run(); Efl.Ui.Config.Run();

View File

@ -23,7 +23,7 @@ public class Example
win.SetWinType(Efl.Ui.WinType.Basic); win.SetWinType(Efl.Ui.WinType.Basic);
win.SetText("Size Control"); win.SetText("Size Control");
win.SetAutohide(true); win.SetAutohide(true);
win.VisibilityChangedEvt += (object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) => { win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => {
// Exit the EFL main loop // Exit the EFL main loop
if (e.arg == false) if (e.arg == false)
Efl.Ui.Config.Exit(); Efl.Ui.Config.Exit();

View File

@ -3,7 +3,7 @@ using System;
public class Example public class Example
{ {
// Callback to quit the application // Callback to quit the application
public static void QuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args e) public static void QuitCb(object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e)
{ {
// Exit the EFL main loop // Exit the EFL main loop
if (e.arg == false) if (e.arg == false)