summaryrefslogtreecommitdiff
path: root/reference
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-09-06 16:01:45 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-06 16:01:45 +0200
commit5472a77fb3ace3fa3dba7ae4c4770314412d5e55 (patch)
treed8cefe8c79195557178db6f8904e32d7dab45f15 /reference
parent17609ba6bf8bea42e121f742fceea77308e50d5d (diff)
mono-examples: adapt to latest bindings syntax
Diffstat (limited to 'reference')
-rw-r--r--reference/csharp/core/src/core_event.cs4
-rw-r--r--reference/csharp/core/src/core_idler.cs8
-rw-r--r--reference/csharp/core/src/core_poll.cs8
-rw-r--r--reference/csharp/snippets/Efl.Ui.Win.cs4
-rw-r--r--reference/csharp/ui/src/focus_main.cs12
-rw-r--r--reference/csharp/ui/src/ui_container.cs4
-rw-r--r--reference/csharp/ui/src/ui_custom_widget.cs4
-rw-r--r--reference/csharp/ui/src/ui_sizing.cs2
8 files changed, 23 insertions, 23 deletions
diff --git a/reference/csharp/core/src/core_event.cs b/reference/csharp/core/src/core_event.cs
index bb617bd1..43a5d679 100644
--- a/reference/csharp/core/src/core_event.cs
+++ b/reference/csharp/core/src/core_event.cs
@@ -22,14 +22,14 @@ public class Example : Efl.Csharp.Application
22 mainloop.SetName("Mainloop"); 22 mainloop.SetName("Mainloop");
23 23
24 // This event gets triggered continuously 24 // This event gets triggered continuously
25 mainloop.PollHighEvt += PollCb; 25 mainloop.PollHighEvent += PollCb;
26 26
27 // This timer will control events fired by the main loop 27 // This timer will control events fired by the main loop
28 var timer = new Efl.LoopTimer(mainloop, 0.1); 28 var timer = new Efl.LoopTimer(mainloop, 0.1);
29 timer.SetName("Timer"); 29 timer.SetName("Timer");
30 // To count number of timer triggers 30 // To count number of timer triggers
31 int tick_count = 0; 31 int tick_count = 0;
32 timer.TimerTickEvt += (object sender, EventArgs e) => { 32 timer.TimerTickEvent += (object sender, EventArgs e) => {
33 string message = "Tick {0} from {1}: "; 33 string message = "Tick {0} from {1}: ";
34 // Depending on the number of timer ticks, it does a different thing 34 // Depending on the number of timer ticks, it does a different thing
35 switch (tick_count) { 35 switch (tick_count) {
diff --git a/reference/csharp/core/src/core_idler.cs b/reference/csharp/core/src/core_idler.cs
index 224511b8..458a15d0 100644
--- a/reference/csharp/core/src/core_idler.cs
+++ b/reference/csharp/core/src/core_idler.cs
@@ -17,19 +17,19 @@ public class Example : Efl.Csharp.Application
17 var mainloop = Efl.App.AppMain; 17 var mainloop = Efl.App.AppMain;
18 18
19 // Register to all Idle events 19 // Register to all Idle events
20 mainloop.IdleEnterEvt += (object sender, EventArgs e) => { 20 mainloop.IdleEnterEvent += (object sender, EventArgs e) => {
21 Console.WriteLine("IDLE ENTER: Entering idle state."); 21 Console.WriteLine("IDLE ENTER: Entering idle state.");
22 }; 22 };
23 mainloop.IdleEvt += (object sender, EventArgs e) => { 23 mainloop.IdleEvent += (object sender, EventArgs e) => {
24 Console.WriteLine("IDLE: Executing idler callback while in idle state."); 24 Console.WriteLine("IDLE: Executing idler callback while in idle state.");
25 }; 25 };
26 mainloop.IdleExitEvt += (object sender, EventArgs e) => { 26 mainloop.IdleExitEvent += (object sender, EventArgs e) => {
27 Console.WriteLine("IDLE EXIT: Leaving idle state."); 27 Console.WriteLine("IDLE EXIT: Leaving idle state.");
28 }; 28 };
29 29
30 // Use a timer to exit the application 30 // Use a timer to exit the application
31 var timer = new Efl.LoopTimer(mainloop, 0.02); 31 var timer = new Efl.LoopTimer(mainloop, 0.02);
32 timer.TimerTickEvt += (object sender, EventArgs e) => { 32 timer.TimerTickEvent += (object sender, EventArgs e) => {
33 Console.WriteLine("TIMER: timer callback called, exiting."); 33 Console.WriteLine("TIMER: timer callback called, exiting.");
34 mainloop.Quit(0); 34 mainloop.Quit(0);
35 }; 35 };
diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs
index 0032223d..9f233c19 100644
--- a/reference/csharp/core/src/core_poll.cs
+++ b/reference/csharp/core/src/core_poll.cs
@@ -16,19 +16,19 @@ public class Example : Efl.Csharp.Application
16 var mainloop = Efl.App.AppMain; 16 var mainloop = Efl.App.AppMain;
17 17
18 // Register to all Poll events 18 // Register to all Poll events
19 mainloop.PollLowEvt += (object sender, EventArgs e) => { 19 mainloop.PollLowEvent += (object sender, EventArgs e) => {
20 Console.Write("L"); 20 Console.Write("L");
21 }; 21 };
22 mainloop.PollMediumEvt += (object sender, EventArgs e) => { 22 mainloop.PollMediumEvent += (object sender, EventArgs e) => {
23 Console.Write("M"); 23 Console.Write("M");
24 }; 24 };
25 mainloop.PollHighEvt += (object sender, EventArgs e) => { 25 mainloop.PollHighEvent += (object sender, EventArgs e) => {
26 Console.Write("."); 26 Console.Write(".");
27 }; 27 };
28 28
29 // Use a timer to exit the application 29 // Use a timer to exit the application
30 var timer = new Efl.LoopTimer(mainloop, 30); 30 var timer = new Efl.LoopTimer(mainloop, 30);
31 timer.TimerTickEvt += (object sender, EventArgs e) => { 31 timer.TimerTickEvent += (object sender, EventArgs e) => {
32 Console.WriteLine("\nTIMER: timer callback called, exiting."); 32 Console.WriteLine("\nTIMER: timer callback called, exiting.");
33 mainloop.Quit(0); 33 mainloop.Quit(0);
34 }; 34 };
diff --git a/reference/csharp/snippets/Efl.Ui.Win.cs b/reference/csharp/snippets/Efl.Ui.Win.cs
index 59ede8bc..c4712e77 100644
--- a/reference/csharp/snippets/Efl.Ui.Win.cs
+++ b/reference/csharp/snippets/Efl.Ui.Win.cs
@@ -1,6 +1,6 @@
1var win = new Efl.Ui.Win(Efl.App.AppMain); 1var win = new Efl.Ui.Win(Efl.App.AppMain);
2win.SetText("Hello World"); 2win.SetText("Hello World");
3win.SetAutohide(true); 3win.SetAutohide(true);
4win.VisibilityChangedEvt += 4win.VisibilityChangedEvent +=
5 (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => {}; 5 (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {};
6 6
diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs
index 4ced2a8d..ae943ba5 100644
--- a/reference/csharp/ui/src/focus_main.cs
+++ b/reference/csharp/ui/src/focus_main.cs
@@ -13,7 +13,7 @@ public class Example : Efl.Csharp.Application
13 var win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); 13 var win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
14 win.SetText("Focus example"); 14 win.SetText("Focus example");
15 win.SetAutohide(true); 15 win.SetAutohide(true);
16 win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => { 16 win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {
17 // Exit the EFL main loop 17 // Exit the EFL main loop
18 if (e.arg == false) 18 if (e.arg == false)
19 Efl.Ui.Config.Exit(); 19 Efl.Ui.Config.Exit();
@@ -32,7 +32,7 @@ public class Example : Efl.Csharp.Application
32 checkbox.SetText("Check " + i); 32 checkbox.SetText("Check " + i);
33 checkbox.SetHintFill(false, false); 33 checkbox.SetHintFill(false, false);
34 checkbox.SetHintAlign(0.5, 0.5); 34 checkbox.SetHintAlign(0.5, 0.5);
35 checkbox.FocusChangedEvt += FocusChangedCb; 35 checkbox.FocusChangedEvent += FocusChangedCb;
36 vbox.Pack(checkbox); 36 vbox.Pack(checkbox);
37 if (i == 0) first_checkbox = checkbox; 37 if (i == 0) first_checkbox = checkbox;
38 }; 38 };
@@ -45,8 +45,8 @@ public class Example : Efl.Csharp.Application
45 // Create a "Focus Mover" button 45 // Create a "Focus Mover" button
46 var button = new Efl.Ui.Button(hbox); 46 var button = new Efl.Ui.Button(hbox);
47 button.SetText("Focus mover"); 47 button.SetText("Focus mover");
48 button.FocusChangedEvt += FocusChangedCb; 48 button.FocusChangedEvent += FocusChangedCb;
49 button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { 49 button.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => {
50 Console.WriteLine("Clicked Focus Mover"); 50 Console.WriteLine("Clicked Focus Mover");
51 // Manually transfer focus to the first check box 51 // Manually transfer focus to the first check box
52 Efl.Ui.Focus.Util.Focus(first_checkbox); 52 Efl.Ui.Focus.Util.Focus(first_checkbox);
@@ -56,8 +56,8 @@ public class Example : Efl.Csharp.Application
56 // Create a Quit button 56 // Create a Quit button
57 button = new Efl.Ui.Button(hbox); 57 button = new Efl.Ui.Button(hbox);
58 button.SetText("Quit"); 58 button.SetText("Quit");
59 button.FocusChangedEvt += FocusChangedCb; 59 button.FocusChangedEvent += FocusChangedCb;
60 button.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { 60 button.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => {
61 Console.WriteLine("Clicked Quit"); 61 Console.WriteLine("Clicked Quit");
62 Efl.Ui.Config.Exit(); 62 Efl.Ui.Config.Exit();
63 }; 63 };
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs
index c3f05daa..9d987e17 100644
--- a/reference/csharp/ui/src/ui_container.cs
+++ b/reference/csharp/ui/src/ui_container.cs
@@ -63,7 +63,7 @@ public class Example : Efl.Csharp.Application
63 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); 63 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
64 win.SetText("Container demo"); 64 win.SetText("Container demo");
65 win.SetAutohide(true); 65 win.SetAutohide(true);
66 win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => { 66 win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {
67 // Exit the EFL main loop 67 // Exit the EFL main loop
68 if (e.arg == false) 68 if (e.arg == false)
69 Efl.Ui.Config.Exit(); 69 Efl.Ui.Config.Exit();
@@ -98,7 +98,7 @@ public class Example : Efl.Csharp.Application
98 Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); 98 Efl.Ui.Button quit_btn = new Efl.Ui.Button(win);
99 quit_btn.SetText("Quit"); 99 quit_btn.SetText("Quit");
100 quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30)); 100 quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30));
101 quit_btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { 101 quit_btn.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => {
102 // Exit the EFL main loop 102 // Exit the EFL main loop
103 Efl.Ui.Config.Exit(); 103 Efl.Ui.Config.Exit();
104 }; 104 };
diff --git a/reference/csharp/ui/src/ui_custom_widget.cs b/reference/csharp/ui/src/ui_custom_widget.cs
index 03e57afd..6cc14d2c 100644
--- a/reference/csharp/ui/src/ui_custom_widget.cs
+++ b/reference/csharp/ui/src/ui_custom_widget.cs
@@ -36,7 +36,7 @@ public class Example : Efl.Csharp.Application
36 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); 36 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
37 win.SetText("Custom widget demo"); 37 win.SetText("Custom widget demo");
38 win.SetAutohide(true); 38 win.SetAutohide(true);
39 win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => { 39 win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {
40 // Exit the EFL main loop when the window is closed 40 // Exit the EFL main loop when the window is closed
41 if (e.arg == false) 41 if (e.arg == false)
42 Efl.Ui.Config.Exit(); 42 Efl.Ui.Config.Exit();
@@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application
46 46
47 // Instantiate our custom button widget 47 // Instantiate our custom button widget
48 MyButton btn = new MyButton(win, 99); 48 MyButton btn = new MyButton(win, 99);
49 btn.ClickedEvt += (object sender, Efl.Input.IClickableClickedEvt_Args e) => { 49 btn.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => {
50 // When the button is clicked, change its text 50 // When the button is clicked, change its text
51 MyButton b = (MyButton)sender; 51 MyButton b = (MyButton)sender;
52 b.SetText("Hello!"); 52 b.SetText("Hello!");
diff --git a/reference/csharp/ui/src/ui_sizing.cs b/reference/csharp/ui/src/ui_sizing.cs
index e1574c88..23e0f2d1 100644
--- a/reference/csharp/ui/src/ui_sizing.cs
+++ b/reference/csharp/ui/src/ui_sizing.cs
@@ -16,7 +16,7 @@ public class Example : Efl.Csharp.Application
16 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); 16 Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
17 win.SetText("Size Control"); 17 win.SetText("Size Control");
18 win.SetAutohide(true); 18 win.SetAutohide(true);
19 win.VisibilityChangedEvt += (object sender, Efl.Gfx.IEntityVisibilityChangedEvt_Args e) => { 19 win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {
20 // Exit the EFL main loop 20 // Exit the EFL main loop
21 if (e.arg == false) 21 if (e.arg == false)
22 Efl.Ui.Config.Exit(); 22 Efl.Ui.Config.Exit();