summaryrefslogtreecommitdiff
path: root/apps/csharp/life/src/life_main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/csharp/life/src/life_main.cs')
-rw-r--r--apps/csharp/life/src/life_main.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs
index a287f6c..1b9e129 100644
--- a/apps/csharp/life/src/life_main.cs
+++ b/apps/csharp/life/src/life_main.cs
@@ -6,19 +6,19 @@ public class LifeWindow : Efl.Csharp.Application
6 private LifeRender lifeRender; 6 private LifeRender lifeRender;
7 private Efl.Ui.Win win; 7 private Efl.Ui.Win win;
8 8
9 void ResizeEvt(object sender, EventArgs ev) 9 void ResizeEvent(object sender, EventArgs ev)
10 { 10 {
11 lifeRender.RenderLayout((Efl.Ui.Win)sender); 11 lifeRender.RenderLayout((Efl.Ui.Win)sender);
12 } 12 }
13 13
14 void QuitEvt(object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args ev) 14 void QuitEvent(object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs ev)
15 { 15 {
16 // quit the mainloop 16 // quit the mainloop
17 if (ev.arg == false) 17 if (ev.arg == false)
18 Efl.App.AppMain.Quit(0); 18 Efl.App.AppMain.Quit(0);
19 } 19 }
20 20
21 void TouchEvt(object sender, Efl.Input.IInterfacePointerDownEvt_Args ev) 21 void TouchEvent(object sender, Efl.Input.IInterfacePointerDownEventArgs ev)
22 { 22 {
23 int cellx, celly; 23 int cellx, celly;
24 var position = ev.arg.GetPosition(); 24 var position = ev.arg.GetPosition();
@@ -29,7 +29,7 @@ public class LifeWindow : Efl.Csharp.Application
29 lifeRender.RenderCell(win, cellx, celly); 29 lifeRender.RenderCell(win, cellx, celly);
30 } 30 }
31 31
32 void KeyDownEvt(object sender, Efl.Input.IInterfaceKeyDownEvt_Args ev) 32 void KeyDownEvent(object sender, Efl.Input.IInterfaceKeyDownEventArgs ev)
33 { 33 {
34 if (ev.arg.GetKeySym() == "space") 34 if (ev.arg.GetKeySym() == "space")
35 lifeBoard.TogglePause(win); 35 lifeBoard.TogglePause(win);
@@ -42,7 +42,7 @@ public class LifeWindow : Efl.Csharp.Application
42 win.SetAutohide(true); 42 win.SetAutohide(true);
43 43
44 // when the user clicks "close" on a window there is a request to hide 44 // when the user clicks "close" on a window there is a request to hide
45 ((Efl.Gfx.IEntity)win).VisibilityChangedEvt += QuitEvt; 45 ((Efl.Gfx.IEntity)win).VisibilityChangedEvent += QuitEvent;
46 46
47 Eina.Size2D sz; 47 Eina.Size2D sz;
48 sz.W = (int)(10 * LifeBoard.Width * win.GetScale()); 48 sz.W = (int)(10 * LifeBoard.Width * win.GetScale());
@@ -52,9 +52,9 @@ public class LifeWindow : Efl.Csharp.Application
52 lifeRender = new LifeRender(win, lifeBoard); 52 lifeRender = new LifeRender(win, lifeBoard);
53 lifeRender.Refresh(win); 53 lifeRender.Refresh(win);
54 54
55 ((Efl.Gfx.IEntity)win).SizeChangedEvt += ResizeEvt; 55 ((Efl.Gfx.IEntity)win).SizeChangedEvent += ResizeEvent;
56 ((Efl.Input.IInterface)win).PointerDownEvt += TouchEvt; 56 ((Efl.Input.IInterface)win).PointerDownEvent += TouchEvent;
57 ((Efl.Input.IInterface)win).KeyDownEvt += KeyDownEvt; 57 ((Efl.Input.IInterface)win).KeyDownEvent += KeyDownEvent;
58 58
59 win.SetSize(sz); 59 win.SetSize(sz);
60 60