summaryrefslogtreecommitdiff
path: root/unsorted
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-11-06 10:39:14 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2018-12-19 16:51:15 +0100
commitd74a4df9946b69f769cd0ad40d4414c90d19a515 (patch)
tree7d4de6983ac9b319085fd84f559d2f592fc215b3 /unsorted
parent656b746be7ffb834a31d0a693071f9eebba186c6 (diff)
csharp examples: Adapt to new classes syntax
Summary: Mainly use PascalCase Namespaces and Classes and proper event names. Test Plan: Check all examples still build. Reviewers: lauromoura, vitor.sousa, felipealmeida, bu5hm4n Reviewed By: bu5hm4n Differential Revision: https://phab.enlightenment.org/D7479
Diffstat (limited to 'unsorted')
-rw-r--r--unsorted/ecore/efl_loop_callback_add_event.cs10
-rw-r--r--unsorted/ecore/efl_loop_timer_example.cs12
-rw-r--r--unsorted/efl_mono/EoInherit01.cs6
-rw-r--r--unsorted/efl_mono/FunctionPointer01.cs4
-rw-r--r--unsorted/eina/EinaArray01.cs4
-rw-r--r--unsorted/eina/EinaBinbuf01.cs4
-rw-r--r--unsorted/eina/EinaError01.cs34
-rw-r--r--unsorted/eina/EinaHash01.cs4
-rw-r--r--unsorted/elementary/efl_ui_slider_mono.cs32
-rw-r--r--unsorted/elementary/efl_ui_unit_converter.cs52
-rw-r--r--unsorted/evas/evas_mono_box.cs18
-rw-r--r--unsorted/evas/evas_mono_image.cs20
-rw-r--r--unsorted/evas/evas_mono_image2.cs14
-rw-r--r--unsorted/evas/evas_mono_rectangle.cs16
-rw-r--r--unsorted/evas/evas_mono_table.cs24
-rw-r--r--unsorted/evas/evas_mono_text.cs20
16 files changed, 137 insertions, 137 deletions
diff --git a/unsorted/ecore/efl_loop_callback_add_event.cs b/unsorted/ecore/efl_loop_callback_add_event.cs
index fe81bfd9..f0a52628 100644
--- a/unsorted/ecore/efl_loop_callback_add_event.cs
+++ b/unsorted/ecore/efl_loop_callback_add_event.cs
@@ -4,18 +4,18 @@ using System.Runtime.CompilerServices;
4 4
5class TestMain 5class TestMain
6{ 6{
7 /* private efl.Loop loop; */ 7 /* private Efl.Loop loop; */
8 8
9 public TestMain(efl.Loop loop) 9 public TestMain(Efl.Loop loop)
10 { 10 {
11 /* this.loop = loop; */ 11 /* this.loop = loop; */
12 } 12 }
13 13
14 static void Main(string[] args) 14 static void Main(string[] args)
15 { 15 {
16 efl.All.Init(); 16 Efl.All.Init();
17 17
18 efl.Loop loop = new efl.LoopConcrete(); 18 Efl.Loop loop = new Efl.LoopConcrete();
19 19
20 TestMain listener = new TestMain(loop); 20 TestMain listener = new TestMain(loop);
21 21
@@ -26,7 +26,7 @@ class TestMain
26 26
27 loop.IDLE += listener.on_idle_enter; // Will trigger CALLBACK_ADD 27 loop.IDLE += listener.on_idle_enter; // Will trigger CALLBACK_ADD
28 28
29 efl.All.Shutdown(); 29 Efl.All.Shutdown();
30 } 30 }
31 31
32 public void on_idle_enter(object sender, EventArgs e) 32 public void on_idle_enter(object sender, EventArgs e)
diff --git a/unsorted/ecore/efl_loop_timer_example.cs b/unsorted/ecore/efl_loop_timer_example.cs
index dd6b2b86..5e10a8a0 100644
--- a/unsorted/ecore/efl_loop_timer_example.cs
+++ b/unsorted/ecore/efl_loop_timer_example.cs
@@ -4,10 +4,10 @@ using System.Runtime.CompilerServices;
4 4
5class TestMain 5class TestMain
6{ 6{
7 private efl.Loop loop; 7 private Efl.Loop loop;
8 private int count; 8 private int count;
9 9
10 public TestMain(efl.Loop loop) 10 public TestMain(Efl.Loop loop)
11 { 11 {
12 this.loop = loop; 12 this.loop = loop;
13 this.count = 0; 13 this.count = 0;
@@ -15,10 +15,10 @@ class TestMain
15 15
16 static void Main(string[] args) 16 static void Main(string[] args)
17 { 17 {
18 efl.All.Init(); 18 Efl.All.Init();
19 19
20 efl.Loop loop = new efl.LoopConcrete(); 20 Efl.Loop loop = new Efl.LoopConcrete();
21 efl.loop.Timer timer = new efl.loop.TimerConcrete(loop); 21 Efl.loop.Timer timer = new Efl.loop.TimerConcrete(loop);
22 22
23 TestMain listener = new TestMain(loop); 23 TestMain listener = new TestMain(loop);
24 24
@@ -32,7 +32,7 @@ class TestMain
32 32
33 loop.begin(); 33 loop.begin();
34 34
35 efl.All.Shutdown(); 35 Efl.All.Shutdown();
36 } 36 }
37 37
38 public void on_tick(object sender, EventArgs e) 38 public void on_tick(object sender, EventArgs e)
diff --git a/unsorted/efl_mono/EoInherit01.cs b/unsorted/efl_mono/EoInherit01.cs
index cf35ca5f..42a24d5b 100644
--- a/unsorted/efl_mono/EoInherit01.cs
+++ b/unsorted/efl_mono/EoInherit01.cs
@@ -2,7 +2,7 @@ using static System.Console;
2 2
3class PlusTenNumberWrapper : example.NumberwrapperInherit 3class PlusTenNumberWrapper : example.NumberwrapperInherit
4{ 4{
5 public PlusTenNumberWrapper(efl.IObject parent = null) 5 public PlusTenNumberWrapper(Efl.Object parent = null)
6 : base(parent) 6 : base(parent)
7 {} 7 {}
8 8
@@ -20,8 +20,8 @@ public class ExampleEoInherit01
20{ 20{
21 public static void Main() 21 public static void Main()
22 { 22 {
23 eina.Config.Init(); 23 Eina.Config.Init();
24 efl.eo.Config.Init(); 24 Efl.eo.Config.Init();
25 25
26 var inheritObj = new PlusTenNumberWrapper(); 26 var inheritObj = new PlusTenNumberWrapper();
27 27
diff --git a/unsorted/efl_mono/FunctionPointer01.cs b/unsorted/efl_mono/FunctionPointer01.cs
index c32f53cd..3a5faa0c 100644
--- a/unsorted/efl_mono/FunctionPointer01.cs
+++ b/unsorted/efl_mono/FunctionPointer01.cs
@@ -12,8 +12,8 @@ public class ExampleFunctionPointer01
12 12
13 public static void Main() 13 public static void Main()
14 { 14 {
15 eina.Config.Init(); 15 Eina.Config.Init();
16 efl.eo.Config.Init(); 16 Efl.eo.Config.Init();
17 17
18 var obj = new example.Numberwrapper(); 18 var obj = new example.Numberwrapper();
19 19
diff --git a/unsorted/eina/EinaArray01.cs b/unsorted/eina/EinaArray01.cs
index 4ac4a778..944c0bd3 100644
--- a/unsorted/eina/EinaArray01.cs
+++ b/unsorted/eina/EinaArray01.cs
@@ -4,7 +4,7 @@ public class ExampleEinaArray01
4{ 4{
5 public static void Main() 5 public static void Main()
6 { 6 {
7 eina.Config.Init(); 7 Eina.Config.Init();
8 8
9 var strings = new string[]{ 9 var strings = new string[]{
10 "helo", "hera", "starbuck", "kat", "boomer", 10 "helo", "hera", "starbuck", "kat", "boomer",
@@ -13,7 +13,7 @@ public class ExampleEinaArray01
13 "skulls", "bulldog", "flat top", "hammerhead", "gonzo" 13 "skulls", "bulldog", "flat top", "hammerhead", "gonzo"
14 }; 14 };
15 15
16 var array = new eina.Array<string>(20U); 16 var array = new Eina.Array<string>(20U);
17 17
18 // Push new elements 18 // Push new elements
19 foreach (string s in strings) 19 foreach (string s in strings)
diff --git a/unsorted/eina/EinaBinbuf01.cs b/unsorted/eina/EinaBinbuf01.cs
index 39561687..5482328e 100644
--- a/unsorted/eina/EinaBinbuf01.cs
+++ b/unsorted/eina/EinaBinbuf01.cs
@@ -4,11 +4,11 @@ public class ExampleEinaBinbuf01
4{ 4{
5 public static void Main() 5 public static void Main()
6 { 6 {
7 eina.Config.Init(); 7 Eina.Config.Init();
8 8
9 var bytes = new byte[]{0, 1, 2, 3, 4, 5, 6}; 9 var bytes = new byte[]{0, 1, 2, 3, 4, 5, 6};
10 10
11 var bb = new eina.Binbuf(); 11 var bb = new Eina.Binbuf();
12 12
13 // Append initial bytes 13 // Append initial bytes
14 bb.Append(bytes); 14 bb.Append(bytes);
diff --git a/unsorted/eina/EinaError01.cs b/unsorted/eina/EinaError01.cs
index 61af9950..2acd47d2 100644
--- a/unsorted/eina/EinaError01.cs
+++ b/unsorted/eina/EinaError01.cs
@@ -3,73 +3,73 @@ using static System.Console;
3public class ExampleEinaError01 3public class ExampleEinaError01
4{ 4{
5 private static bool RegisteredErrors = false; 5 private static bool RegisteredErrors = false;
6 private static eina.Error MyErrorNegative; 6 private static Eina.Error MyErrorNegative;
7 private static eina.Error MyErrorNull; 7 private static Eina.Error MyErrorNull;
8 8
9 private static void testFunc(int n, string s) 9 private static void testFunc(int n, string s)
10 { 10 {
11 if (!RegisteredErrors) 11 if (!RegisteredErrors)
12 { 12 {
13 MyErrorNegative = eina.Error.Register("Negative number"); 13 MyErrorNegative = Eina.Error.Register("Negative number");
14 MyErrorNull = eina.Error.Register("NULL pointer"); 14 MyErrorNull = Eina.Error.Register("NULL pointer");
15 RegisteredErrors = true; 15 RegisteredErrors = true;
16 } 16 }
17 17
18 if (n < 0) 18 if (n < 0)
19 { 19 {
20 eina.Error.Set(MyErrorNegative); 20 Eina.Error.Set(MyErrorNegative);
21 return; 21 return;
22 } 22 }
23 23
24 if (s == null) 24 if (s == null)
25 { 25 {
26 eina.Error.Set(MyErrorNull); 26 Eina.Error.Set(MyErrorNull);
27 return; 27 return;
28 } 28 }
29 } 29 }
30 30
31 public static void Main() 31 public static void Main()
32 { 32 {
33 eina.Config.Init(); 33 Eina.Config.Init();
34 efl.eo.Config.Init(); 34 Efl.eo.Config.Init();
35 35
36 // Handling Eina_Error with exception 36 // Handling Eina_Error with exception
37 try 37 try
38 { 38 {
39 testFunc(-1, "abc"); 39 testFunc(-1, "abc");
40 eina.Error.RaiseIfOccurred(); 40 Eina.Error.RaiseIfOccurred();
41 } 41 }
42 catch(efl.EflException e) 42 catch(Efl.EflException e)
43 { 43 {
44 WriteLine($"Caught error: {e.Message}"); 44 WriteLine($"Caught error: {e.Message}");
45 } 45 }
46 46
47 // Handling Eina_Error directly 47 // Handling Eina_Error directly
48 testFunc(42, null); 48 testFunc(42, null);
49 eina.Error err = eina.Error.Get(); 49 Eina.Error err = Eina.Error.Get();
50 if (err != 0) 50 if (err != 0)
51 { 51 {
52 WriteLine($"Error set: {err.Message}"); 52 WriteLine($"Error set: {err.Message}");
53 } 53 }
54 eina.Error.Clear(); 54 Eina.Error.Clear();
55 55
56 // No error set 56 // No error set
57 try 57 try
58 { 58 {
59 testFunc(42, "abc"); 59 testFunc(42, "abc");
60 60
61 eina.Error.RaiseIfOccurred(); 61 Eina.Error.RaiseIfOccurred();
62 62
63 err = eina.Error.Get(); 63 err = Eina.Error.Get();
64 WriteLine($"Really no error? {err == eina.Error.NO_ERROR}."); 64 WriteLine($"Really no error? {err == Eina.Error.NO_ERROR}.");
65 } 65 }
66 catch 66 catch
67 { 67 {
68 WriteLine("Unspected error!!!"); 68 WriteLine("Unspected error!!!");
69 } 69 }
70 70
71 WriteLine("No error message is empty string: \"{0}\"", eina.Error.NO_ERROR.Message); 71 WriteLine("No error message is empty string: \"{0}\"", Eina.Error.NO_ERROR.Message);
72 WriteLine("No error message is empty string: \"{0}\"", eina.Error.MsgGet(0)); 72 WriteLine("No error message is empty string: \"{0}\"", Eina.Error.MsgGet(0));
73 } 73 }
74} 74}
75 75
diff --git a/unsorted/eina/EinaHash01.cs b/unsorted/eina/EinaHash01.cs
index a645dde1..31f3c152 100644
--- a/unsorted/eina/EinaHash01.cs
+++ b/unsorted/eina/EinaHash01.cs
@@ -4,9 +4,9 @@ public class ExampleEinaHash01
4{ 4{
5 public static void Main() 5 public static void Main()
6 { 6 {
7 eina.Config.Init(); 7 Eina.Config.Init();
8 8
9 var phone_book = new eina.Hash<string, string>(); 9 var phone_book = new Eina.Hash<string, string>();
10 10
11 // Add initial entries to our hash 11 // Add initial entries to our hash
12 phone_book.Add("Wolfgang Amadeus Mozart", "+01 23 456-78910"); 12 phone_book.Add("Wolfgang Amadeus Mozart", "+01 23 456-78910");
diff --git a/unsorted/elementary/efl_ui_slider_mono.cs b/unsorted/elementary/efl_ui_slider_mono.cs
index 62b3504f..c6787edf 100644
--- a/unsorted/elementary/efl_ui_slider_mono.cs
+++ b/unsorted/elementary/efl_ui_slider_mono.cs
@@ -2,20 +2,20 @@ using System;
2 2
3public class Example 3public class Example
4{ 4{
5 public static efl.ui.IButton CreateButton(efl.IObject parent, 5 public static Efl.Ui.Button CreateButton(Efl.Object parent,
6 string text, 6 string text,
7 int w, int h, 7 int w, int h,
8 EventHandler callback) { 8 EventHandler callback) {
9 efl.ui.IButton button = new efl.ui.Button(parent); 9 Efl.Ui.Button button = new Efl.Ui.Button(parent);
10 button.SetText(text); 10 button.SetText(text);
11 button.SetSize(new eina.Size2D(w, h)); 11 button.SetSize(new Eina.Size2D(w, h));
12 12
13 button.ClickedEvt += callback; 13 button.ClickedEvt += callback;
14 14
15 return button; 15 return button;
16 } 16 }
17 17
18 public static void Formatter(eina.Strbuf buf, eina.Value val){ 18 public static void Formatter(Eina.Strbuf buf, Eina.Value val){
19 double ratio; 19 double ratio;
20 if (val.Get(out ratio)) { 20 if (val.Get(out ratio)) {
21 buf.Append($"{(int)(ratio*100)}%"); 21 buf.Append($"{(int)(ratio*100)}%");
@@ -34,27 +34,27 @@ public class Example
34 int W = 120; 34 int W = 120;
35 int H = 30; 35 int H = 30;
36 36
37 efl.All.Init(efl.Components.Ui); 37 Efl.All.Init(Efl.Components.Ui);
38 38
39 efl.ui.Win win = new efl.ui.Win(null); 39 Efl.Ui.Win win = new Efl.Ui.Win(null);
40 win.SetText("Hello, C#!!"); 40 win.SetText("Hello, C#!!");
41 win.SetAutohide(true); 41 win.SetAutohide(true);
42 42
43 efl.ui.Box_Flow box = new efl.ui.Box_Flow(win); 43 Efl.Ui.Box_Flow box = new Efl.Ui.Box_Flow(win);
44 44
45 efl.ui.IButton button = CreateButton(box, "Click to exit", 120, 30, 45 Efl.Ui.Button button = CreateButton(box, "Click to exit", 120, 30,
46 (object sender, EventArgs e) => { 46 (object sender, EventArgs e) => {
47 efl.ui.Config.Exit(); 47 Efl.Ui.Config.Exit();
48 }); 48 });
49 49
50 box.DoPack(button); 50 box.DoPack(button);
51 51
52 efl.ui.Progressbar bar = new efl.ui.Progressbar(box); 52 Efl.Ui.Progressbar bar = new Efl.Ui.Progressbar(box);
53 bar.SetSize(new eina.Size2D(W, H)); 53 bar.SetSize(new Eina.Size2D(W, H));
54 bar.SetFormatCb(Formatter); 54 bar.SetFormatCb(Formatter);
55 55
56 efl.ui.ISlider slider = new efl.ui.Slider(box); 56 Efl.Ui.Slider slider = new Efl.Ui.Slider(box);
57 slider.SetSize(new eina.Size2D(W, H)); 57 slider.SetSize(new Eina.Size2D(W, H));
58 58
59 slider.ChangedEvt += (object sender, EventArgs e) => { 59 slider.ChangedEvt += (object sender, EventArgs e) => {
60 bar.SetRangeValue(slider.GetRangeValue()); 60 bar.SetRangeValue(slider.GetRangeValue());
@@ -66,12 +66,12 @@ public class Example
66 button.SetVisible(true); 66 button.SetVisible(true);
67 box.SetVisible(true); 67 box.SetVisible(true);
68 68
69 win.SetSize(new eina.Size2D(W, 3 * H)); 69 win.SetSize(new Eina.Size2D(W, 3 * H));
70 win.SetVisible(true); 70 win.SetVisible(true);
71 71
72 efl.ui.Config.Run(); 72 Efl.Ui.Config.Run();
73 73
74 efl.All.Shutdown(); 74 Efl.All.Shutdown();
75 } 75 }
76 76
77} 77}
diff --git a/unsorted/elementary/efl_ui_unit_converter.cs b/unsorted/elementary/efl_ui_unit_converter.cs
index 09c9b24d..ed5b434a 100644
--- a/unsorted/elementary/efl_ui_unit_converter.cs
+++ b/unsorted/elementary/efl_ui_unit_converter.cs
@@ -14,16 +14,16 @@ public class Example
14 return miles * KMS_PER_MILE; 14 return miles * KMS_PER_MILE;
15 } 15 }
16 16
17 private static void ShowErrorPopup(efl.ui.Win win, string message) 17 private static void ShowErrorPopup(Efl.Ui.Win win, string message)
18 { 18 {
19 efl.ui.IPopup_Alert popup = new efl.ui.Popup_Alert(win); 19 Efl.Ui.Popup_Alert popup = new Efl.Ui.Popup_Alert(win);
20 efl.ui.Text popup_text = new efl.ui.Text(popup); 20 Efl.Ui.Text popup_text = new Efl.Ui.Text(popup);
21 popup_text.SetText($"Error: {message}"); 21 popup_text.SetText($"Error: {message}");
22 popup.SetContent(popup_text); 22 popup.SetContent(popup_text);
23 popup.SetVisible(true); 23 popup.SetVisible(true);
24 popup.SetButton(efl.ui.Popup_Alert_Button.Positive, "Ok"); 24 popup.SetButton(Efl.Ui.Popup_Alert_Button.Positive, "Ok");
25 popup.SetSize(new eina.Size2D(150, 30)); 25 popup.SetSize(new Eina.Size2D(150, 30));
26 popup.ButtonClickedEvt += (object sender, efl.ui.Popup_Alert.ButtonClickedEvt_Args e) => { 26 popup.ButtonClickedEvt += (object sender, Efl.Ui.Popup_Alert.ButtonClickedEvt_Args e) => {
27 popup.SetParent(null); 27 popup.SetParent(null);
28 popup.Invalidate(); 28 popup.Invalidate();
29 }; 29 };
@@ -37,34 +37,34 @@ public class Example
37 public static void Main() { 37 public static void Main() {
38 int W = 120; 38 int W = 120;
39 int H = 30; 39 int H = 30;
40 eina.Size2D size = new eina.Size2D(W, H); 40 Eina.Size2D size = new Eina.Size2D(W, H);
41 41
42 efl.All.Init(efl.Components.Ui); 42 Efl.All.Init(Efl.Components.Ui);
43 43
44 efl.ui.Win win = new efl.ui.Win(null); 44 Efl.Ui.Win win = new Efl.Ui.Win(null);
45 win.SetText("C# Unit Converter"); 45 win.SetText("C# Unit Converter");
46 win.SetAutohide(true); 46 win.SetAutohide(true);
47 47
48 efl.ui.Box_Flow box = new efl.ui.Box_Flow(win); 48 Efl.Ui.Box_Flow box = new Efl.Ui.Box_Flow(win);
49 box.SetDirection(efl.ui.Dir.Horizontal); 49 box.SetDirection(Efl.Ui.Dir.Horizontal);
50 50
51 efl.ui.Box_Flow miles_box = new efl.ui.Box_Flow(box); 51 Efl.Ui.Box_Flow miles_box = new Efl.Ui.Box_Flow(box);
52 miles_box.SetDirection(efl.ui.Dir.Down); 52 miles_box.SetDirection(Efl.Ui.Dir.Down);
53 53
54 box.DoPack(miles_box); 54 box.DoPack(miles_box);
55 55
56 efl.ui.Text miles_label = new efl.ui.Text(miles_box); 56 Efl.Ui.Text miles_label = new Efl.Ui.Text(miles_box);
57 miles_label.SetText("Miles:"); 57 miles_label.SetText("Miles:");
58 miles_label.SetSize(size); 58 miles_label.SetSize(size);
59 miles_label.SetVisible(true); 59 miles_label.SetVisible(true);
60 60
61 efl.ui.Text_Editable miles_input = new efl.ui.Text_Editable(miles_box); 61 Efl.Ui.Text_Editable miles_input = new Efl.Ui.Text_Editable(miles_box);
62 miles_input.SetText(""); 62 miles_input.SetText("");
63 miles_input.SetScrollable(true); 63 miles_input.SetScrollable(true);
64 miles_input.SetSize(size); 64 miles_input.SetSize(size);
65 miles_input.SetVisible(true); 65 miles_input.SetVisible(true);
66 66
67 efl.ui.IButton miles_button = new efl.ui.Button(miles_box); 67 Efl.Ui.Button miles_button = new Efl.Ui.Button(miles_box);
68 miles_button.SetText("To Km"); 68 miles_button.SetText("To Km");
69 miles_button.SetSize(size); 69 miles_button.SetSize(size);
70 miles_button.SetVisible(true); 70 miles_button.SetVisible(true);
@@ -74,23 +74,23 @@ public class Example
74 miles_box.DoPack(miles_button); 74 miles_box.DoPack(miles_button);
75 75
76 76
77 efl.ui.Box_Flow kms_box = new efl.ui.Box_Flow(box); 77 Efl.Ui.Box_Flow kms_box = new Efl.Ui.Box_Flow(box);
78 kms_box.SetDirection(efl.ui.Dir.Down); 78 kms_box.SetDirection(Efl.Ui.Dir.Down);
79 79
80 box.DoPack(kms_box); 80 box.DoPack(kms_box);
81 81
82 efl.ui.Text kms_label = new efl.ui.Text(kms_box); 82 Efl.Ui.Text kms_label = new Efl.Ui.Text(kms_box);
83 kms_label.SetText("Kilometers:"); 83 kms_label.SetText("Kilometers:");
84 kms_label.SetSize(size); 84 kms_label.SetSize(size);
85 kms_label.SetVisible(true); 85 kms_label.SetVisible(true);
86 86
87 efl.ui.Text_Editable kms_input = new efl.ui.Text_Editable(kms_box); 87 Efl.Ui.Text_Editable kms_input = new Efl.Ui.Text_Editable(kms_box);
88 kms_input.SetText(""); 88 kms_input.SetText("");
89 kms_input.SetScrollable(true); 89 kms_input.SetScrollable(true);
90 kms_input.SetSize(size); 90 kms_input.SetSize(size);
91 kms_input.SetVisible(true); 91 kms_input.SetVisible(true);
92 92
93 efl.ui.IButton kms_button = new efl.ui.Button(kms_box); 93 Efl.Ui.Button kms_button = new Efl.Ui.Button(kms_box);
94 kms_button.SetText("To Miles"); 94 kms_button.SetText("To Miles");
95 kms_button.SetSize(size); 95 kms_button.SetSize(size);
96 kms_button.SetVisible(true); 96 kms_button.SetVisible(true);
@@ -134,17 +134,17 @@ public class Example
134 kms_box.SetVisible(true); 134 kms_box.SetVisible(true);
135 miles_box.SetVisible(true); 135 miles_box.SetVisible(true);
136 136
137 box.SetPosition(new eina.Position2D(20, 30)); 137 box.SetPosition(new Eina.Position2D(20, 30));
138 box.SetVisible(true); 138 box.SetVisible(true);
139 139
140 win.SetPosition(new eina.Position2D(200, 200)); 140 win.SetPosition(new Eina.Position2D(200, 200));
141 141
142 win.SetSize(new eina.Size2D(400, 120)); 142 win.SetSize(new Eina.Size2D(400, 120));
143 win.SetVisible(true); 143 win.SetVisible(true);
144 144
145 efl.ui.Config.Run(); 145 Efl.Ui.Config.Run();
146 146
147 efl.All.Shutdown(); 147 Efl.All.Shutdown();
148 } 148 }
149 149
150} 150}
diff --git a/unsorted/evas/evas_mono_box.cs b/unsorted/evas/evas_mono_box.cs
index 97c161c5..c3ddfee8 100644
--- a/unsorted/evas/evas_mono_box.cs
+++ b/unsorted/evas/evas_mono_box.cs
@@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
4 4
5public class MyBox : evas.BoxInherit 5public class MyBox : evas.BoxInherit
6{ 6{
7 public MyBox(efl.IObject parent) : base(parent) {} 7 public MyBox(Efl.Object parent) : base(parent) {}
8 8
9 [DllImport("evas")] static extern void evas_obj_box_layout_vertical(IntPtr obj, IntPtr data, IntPtr privdata); 9 [DllImport("evas")] static extern void evas_obj_box_layout_vertical(IntPtr obj, IntPtr data, IntPtr privdata);
10 [DllImport("evas")] static extern void evas_obj_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata); 10 [DllImport("evas")] static extern void evas_obj_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
@@ -30,21 +30,21 @@ class TestMain
30{ 30{
31 static void Main(string[] args) 31 static void Main(string[] args)
32 { 32 {
33 efl.All.Init(); 33 Efl.All.Init();
34 34
35 efl.Loop loop = new efl.Loop(); 35 Efl.Loop loop = new Efl.Loop();
36 36
37 37
38 EcoreEvas ecore_evas = new EcoreEvas(); 38 EcoreEvas ecore_evas = new EcoreEvas();
39 39
40 efl.canvas.IObject canvas = ecore_evas.canvas; 40 Efl.Canvas.Object canvas = ecore_evas.canvas;
41 canvas.SetVisible(true); 41 canvas.SetVisible(true);
42 42
43 efl.IObject parent = canvas.GetParent(); 43 Efl.Object parent = canvas.GetParent();
44 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero); 44 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
45 45
46 evas.IBox box = new MyBox(canvas); 46 evas.IBox box = new MyBox(canvas);
47 eina.Size2D size = new eina.Size2D(); 47 Eina.Size2D size = new Eina.Size2D();
48 48
49 size.W = 320; 49 size.W = 320;
50 size.H = 240; 50 size.H = 240;
@@ -52,7 +52,7 @@ class TestMain
52 box.SetSize(size); 52 box.SetSize(size);
53 box.SetVisible(true); 53 box.SetVisible(true);
54 54
55 efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas); 55 Efl.Canvas.Rectangle rect = new Efl.Canvas.Rectangle(canvas);
56 rect.SetColor(0, 0, 255, 255); 56 rect.SetColor(0, 0, 255, 255);
57 size.W = 320; 57 size.W = 320;
58 size.H = 120; 58 size.H = 120;
@@ -60,7 +60,7 @@ class TestMain
60 rect.SetVisible(true); 60 rect.SetVisible(true);
61 box.Append(rect); 61 box.Append(rect);
62 62
63 efl.canvas.Rectangle rect2 = new efl.canvas.Rectangle(canvas); 63 Efl.Canvas.Rectangle rect2 = new Efl.Canvas.Rectangle(canvas);
64 rect2.SetColor(0, 255, 0, 255); 64 rect2.SetColor(0, 255, 0, 255);
65 rect2.SetSize(size); 65 rect2.SetSize(size);
66 rect2.SetVisible(true); 66 rect2.SetVisible(true);
@@ -68,6 +68,6 @@ class TestMain
68 68
69 loop.Begin(); 69 loop.Begin();
70 70
71 efl.All.Shutdown(); 71 Efl.All.Shutdown();
72 } 72 }
73} 73}
diff --git a/unsorted/evas/evas_mono_image.cs b/unsorted/evas/evas_mono_image.cs
index 47f9b360..d241ce8e 100644
--- a/unsorted/evas/evas_mono_image.cs
+++ b/unsorted/evas/evas_mono_image.cs
@@ -21,20 +21,20 @@ class TestMain
21 21
22 static void Main(string[] args) 22 static void Main(string[] args)
23 { 23 {
24 efl.All.Init(); 24 Efl.All.Init();
25 25
26 efl.Loop loop = new efl.Loop(); 26 Efl.Loop loop = new Efl.Loop();
27 27
28 EcoreEvas ecore_evas = new EcoreEvas(); 28 EcoreEvas ecore_evas = new EcoreEvas();
29 eina.Size2D size = new eina.Size2D(); 29 Eina.Size2D size = new Eina.Size2D();
30 30
31 efl.canvas.IObject canvas = ecore_evas.canvas; 31 Efl.Canvas.Object canvas = ecore_evas.canvas;
32 canvas.SetVisible(true); 32 canvas.SetVisible(true);
33 33
34 efl.IObject parent = canvas.GetParent(); 34 Efl.Object parent = canvas.GetParent();
35 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero); 35 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
36 36
37 efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas); 37 Efl.Canvas.Rectangle bg = new Efl.Canvas.Rectangle(canvas);
38 bg.SetColor(255, 255, 255, 255); 38 bg.SetColor(255, 255, 255, 255);
39 size.W = WIDTH; 39 size.W = WIDTH;
40 size.H = HEIGHT; 40 size.H = HEIGHT;
@@ -47,10 +47,10 @@ class TestMain
47 47
48 /* FIXME evas-image uses error handling code from 48 /* FIXME evas-image uses error handling code from
49 * evas_object_image_load_error_get, which seems to be not available 49 * evas_object_image_load_error_get, which seems to be not available
50 * efl.image.load.State state = image.load_error_get(); */ 50 * Efl.image.load.State state = image.load_error_get(); */
51 51
52 // FIXME missing move 52 // FIXME missing move
53 eina.Rect rect = new eina.Rect(); 53 Eina.Rect rect = new Eina.Rect();
54 54
55 rect.X = 0; 55 rect.X = 0;
56 rect.Y = 0; 56 rect.Y = 0;
@@ -76,12 +76,12 @@ class TestMain
76 76
77 /* bg.key_focus_set(true); */ 77 /* bg.key_focus_set(true); */
78 /* bg.event_callback_priority_add(evas.Callback_Type.Key_down, */ 78 /* bg.event_callback_priority_add(evas.Callback_Type.Key_down, */
79 /* efl.Callback_Priority.Default, */ 79 /* Efl.Callback_Priority.Default, */
80 /* callback, null); */ 80 /* callback, null); */
81 81
82 loop.Begin(); 82 loop.Begin();
83 83
84 efl.All.Shutdown(); 84 Efl.All.Shutdown();
85 } 85 }
86 86
87 public void on_key_down(object sender, EventArgs e) 87 public void on_key_down(object sender, EventArgs e)
diff --git a/unsorted/evas/evas_mono_image2.cs b/unsorted/evas/evas_mono_image2.cs
index 1f0e52ac..f239199f 100644
--- a/unsorted/evas/evas_mono_image2.cs
+++ b/unsorted/evas/evas_mono_image2.cs
@@ -10,19 +10,19 @@ class TestMain
10 10
11 static void Main(string[] args) 11 static void Main(string[] args)
12 { 12 {
13 efl.All.Init(); 13 Efl.All.Init();
14 14
15 efl.Loop loop = new efl.Loop(); 15 Efl.Loop loop = new Efl.Loop();
16 16
17 EcoreEvas ecore_evas = new EcoreEvas(); 17 EcoreEvas ecore_evas = new EcoreEvas();
18 18
19 eina.Size2D size = new eina.Size2D(); 19 Eina.Size2D size = new Eina.Size2D();
20 eina.Position2D pos = new eina.Position2D(); 20 Eina.Position2D pos = new Eina.Position2D();
21 21
22 efl.canvas.IObject canvas = ecore_evas.canvas; 22 Efl.Canvas.Object canvas = ecore_evas.canvas;
23 canvas.SetVisible(true); 23 canvas.SetVisible(true);
24 24
25 efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas); 25 Efl.Canvas.Rectangle bg = new Efl.Canvas.Rectangle(canvas);
26 bg.SetColor(255, 255, 255, 255); 26 bg.SetColor(255, 255, 255, 255);
27 pos.X = 0; 27 pos.X = 0;
28 pos.Y = 0; 28 pos.Y = 0;
@@ -66,7 +66,7 @@ class TestMain
66 noise_img.SetVisible(true); 66 noise_img.SetVisible(true);
67 Console.WriteLine("Creating noise image with sizez %d, %d", WIDTH/4, HEIGHT/4); 67 Console.WriteLine("Creating noise image with sizez %d, %d", WIDTH/4, HEIGHT/4);
68 68
69 efl.canvas.Proxy proxy_img = new efl.canvas.Proxy(canvas); 69 Efl.Canvas.Proxy proxy_img = new Efl.Canvas.Proxy(canvas);
70 proxy_img.SetSource(noise_img); 70 proxy_img.SetSource(noise_img);
71 pos.X = WIDTH / 2; 71 pos.X = WIDTH / 2;
72 pos.Y = HEIGHT / 2; 72 pos.Y = HEIGHT / 2;
diff --git a/unsorted/evas/evas_mono_rectangle.cs b/unsorted/evas/evas_mono_rectangle.cs
index c31c2478..0b363a76 100644
--- a/unsorted/evas/evas_mono_rectangle.cs
+++ b/unsorted/evas/evas_mono_rectangle.cs
@@ -12,25 +12,25 @@ class TestMain
12 { 12 {
13 int color_index = 0; 13 int color_index = 0;
14 14
15 efl.All.Init(); 15 Efl.All.Init();
16 16
17 efl.Loop loop = new efl.Loop(); 17 Efl.Loop loop = new Efl.Loop();
18 EcoreEvas ecore_evas = new EcoreEvas(); 18 EcoreEvas ecore_evas = new EcoreEvas();
19 efl.canvas.IObject canvas = ecore_evas.canvas; 19 Efl.Canvas.Object canvas = ecore_evas.canvas;
20 canvas.SetVisible(true); 20 canvas.SetVisible(true);
21 21
22 efl.IObject parent = canvas.GetParent(); 22 Efl.Object parent = canvas.GetParent();
23 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero); 23 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
24 24
25 efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas); 25 Efl.Canvas.Rectangle rect = new Efl.Canvas.Rectangle(canvas);
26 rect.SetColor(colors[0, 0], colors[0, 1], colors[0, 2], 255); 26 rect.SetColor(colors[0, 0], colors[0, 1], colors[0, 2], 255);
27 eina.Size2D size = new eina.Size2D(); 27 Eina.Size2D size = new Eina.Size2D();
28 size.W = 640; 28 size.W = 640;
29 size.H = 480; 29 size.H = 480;
30 rect.SetSize(size); 30 rect.SetSize(size);
31 rect.SetVisible(true); 31 rect.SetVisible(true);
32 32
33 canvas.KeyDownEvt += (object sender, efl.input.Interface.KeyDownEvt_Args e) => { 33 canvas.KeyDownEvt += (object sender, Efl.Input.Interface.KeyDownEvt_Args e) => {
34 color_index = (color_index + 1) % 3; 34 color_index = (color_index + 1) % 3;
35 Console.WriteLine("Key Down"); 35 Console.WriteLine("Key Down");
36 Console.WriteLine("Got key obj at {0}", e.arg.raw_handle.ToString("X")); 36 Console.WriteLine("Got key obj at {0}", e.arg.raw_handle.ToString("X"));
@@ -42,6 +42,6 @@ class TestMain
42 42
43 loop.Begin(); 43 loop.Begin();
44 44
45 efl.All.Shutdown(); 45 Efl.All.Shutdown();
46 } 46 }
47} 47}
diff --git a/unsorted/evas/evas_mono_table.cs b/unsorted/evas/evas_mono_table.cs
index db329b22..7dfb56b9 100644
--- a/unsorted/evas/evas_mono_table.cs
+++ b/unsorted/evas/evas_mono_table.cs
@@ -9,25 +9,25 @@ class TestMain
9 9
10 static void Main(string[] args) 10 static void Main(string[] args)
11 { 11 {
12 efl.All.Init(); 12 Efl.All.Init();
13 13
14 efl.Loop loop = new efl.Loop(); 14 Efl.Loop loop = new Efl.Loop();
15 15
16 EcoreEvas ecore_evas = new EcoreEvas(); 16 EcoreEvas ecore_evas = new EcoreEvas();
17 17
18 eina.Size2D size = new eina.Size2D(); 18 Eina.Size2D size = new Eina.Size2D();
19 size.W = WIDTH; 19 size.W = WIDTH;
20 size.H = HEIGHT; 20 size.H = HEIGHT;
21 21
22 eina.Size2D hint = new eina.Size2D(); 22 Eina.Size2D hint = new Eina.Size2D();
23 23
24 efl.canvas.IObject canvas = ecore_evas.canvas; 24 Efl.Canvas.Object canvas = ecore_evas.canvas;
25 canvas.SetVisible(true); 25 canvas.SetVisible(true);
26 26
27 efl.IObject parent = canvas.GetParent(); 27 Efl.Object parent = canvas.GetParent();
28 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero); 28 System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
29 29
30 efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas); 30 Efl.Canvas.Rectangle bg = new Efl.Canvas.Rectangle(canvas);
31 bg.SetColor(255, 255, 255, 255); 31 bg.SetColor(255, 255, 255, 255);
32 bg.SetSize(size); 32 bg.SetSize(size);
33 bg.SetVisible(true); 33 bg.SetVisible(true);
@@ -39,7 +39,7 @@ class TestMain
39 table.SetSize(size); 39 table.SetSize(size);
40 table.SetVisible(true); 40 table.SetVisible(true);
41 41
42 efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas); 42 Efl.Canvas.Rectangle rect = new Efl.Canvas.Rectangle(canvas);
43 rect.SetColor(255, 0, 0, 255); 43 rect.SetColor(255, 0, 0, 255);
44 hint.W = 100; 44 hint.W = 100;
45 hint.H = 50; 45 hint.H = 50;
@@ -47,7 +47,7 @@ class TestMain
47 rect.SetVisible(true); 47 rect.SetVisible(true);
48 table.Pack(rect, 1, 1, 2, 1); 48 table.Pack(rect, 1, 1, 2, 1);
49 49
50 rect = new efl.canvas.Rectangle(canvas); 50 rect = new Efl.Canvas.Rectangle(canvas);
51 rect.SetColor(0, 255, 0, 255); 51 rect.SetColor(0, 255, 0, 255);
52 hint.W = 50; 52 hint.W = 50;
53 hint.H = 100; 53 hint.H = 100;
@@ -55,7 +55,7 @@ class TestMain
55 rect.SetVisible(true); 55 rect.SetVisible(true);
56 table.Pack(rect, 1, 2, 1, 2); 56 table.Pack(rect, 1, 2, 1, 2);
57 57
58 rect = new efl.canvas.Rectangle(canvas); 58 rect = new Efl.Canvas.Rectangle(canvas);
59 rect.SetColor(0, 0, 255, 255); 59 rect.SetColor(0, 0, 255, 255);
60 hint.W = 50; 60 hint.W = 50;
61 hint.H = 50; 61 hint.H = 50;
@@ -63,7 +63,7 @@ class TestMain
63 rect.SetVisible(true); 63 rect.SetVisible(true);
64 table.Pack(rect, 2, 2, 1, 1); 64 table.Pack(rect, 2, 2, 1, 1);
65 65
66 rect = new efl.canvas.Rectangle(canvas); 66 rect = new Efl.Canvas.Rectangle(canvas);
67 rect.SetColor(255, 255, 0, 255); 67 rect.SetColor(255, 255, 0, 255);
68 rect.SetHintMin(hint); 68 rect.SetHintMin(hint);
69 rect.SetVisible(true); 69 rect.SetVisible(true);
@@ -71,7 +71,7 @@ class TestMain
71 71
72 loop.Begin(); 72 loop.Begin();
73 73
74 efl.All.Shutdown(); 74 Efl.All.Shutdown();
75 } 75 }
76} 76}
77 77
diff --git a/unsorted/evas/evas_mono_text.cs b/unsorted/evas/evas_mono_text.cs
index a1532a45..eb7e4191 100644
--- a/unsorted/evas/evas_mono_text.cs
+++ b/unsorted/evas/evas_mono_text.cs
@@ -22,19 +22,19 @@ class TestMain
22 static int HEIGHT = 240; 22 static int HEIGHT = 240;
23 23
24 private EcoreEvas ecore_evas; 24 private EcoreEvas ecore_evas;
25 private efl.canvas.IObject canvas; 25 private Efl.Canvas.Object canvas;
26 private efl.canvas.IRectangle bg; 26 private Efl.Canvas.Rectangle bg;
27 private evas.Text text; 27 private evas.Text text;
28 private evas.Image border; 28 private evas.Image border;
29 29
30 public TestMain(String border_file) { 30 public TestMain(String border_file) {
31 ecore_evas = new EcoreEvas(); 31 ecore_evas = new EcoreEvas();
32 eina.Size2D size = new eina.Size2D(); 32 Eina.Size2D size = new Eina.Size2D();
33 eina.Position2D position = new eina.Position2D(); 33 Eina.Position2D position = new Eina.Position2D();
34 canvas = ecore_evas.canvas; 34 canvas = ecore_evas.canvas;
35 canvas.SetVisible(true); 35 canvas.SetVisible(true);
36 36
37 bg = new efl.canvas.Rectangle(canvas); 37 bg = new Efl.Canvas.Rectangle(canvas);
38 bg.SetColor(255, 255, 255, 255); 38 bg.SetColor(255, 255, 255, 255);
39 position.X = 0; 39 position.X = 0;
40 position.Y = 0; 40 position.Y = 0;
@@ -65,7 +65,7 @@ class TestMain
65 text.SetPosition(position); 65 text.SetPosition(position);
66 text.SetVisible(true); 66 text.SetVisible(true);
67 67
68 efl.font.Size font_size = 0; 68 Efl.font.Size font_size = 0;
69 String font = String.Empty; 69 String font = String.Empty;
70 text.GetFont(out font, out font_size); 70 text.GetFont(out font, out font_size);
71 Console.WriteLine("Adding text object with font {0} and size {1}", font, size); 71 Console.WriteLine("Adding text object with font {0} and size {1}", font, size);
@@ -87,7 +87,7 @@ class TestMain
87 87
88 } 88 }
89 89
90 private void On_KeyDown(object sender, efl.input.Interface.KeyDownEvt_Args e) 90 private void On_KeyDown(object sender, Efl.Input.Interface.KeyDownEvt_Args e)
91 { 91 {
92 var key = e.arg.GetKey(); 92 var key = e.arg.GetKey();
93 93
@@ -107,19 +107,19 @@ class TestMain
107 107
108 static void Main(string[] args) 108 static void Main(string[] args)
109 { 109 {
110 efl.All.Init(); 110 Efl.All.Init();
111 111
112 String border_path = "./src/examples/evas/resources/images/red.png"; 112 String border_path = "./src/examples/evas/resources/images/red.png";
113 113
114 if (args.Length >= 1) 114 if (args.Length >= 1)
115 border_path = args[0]; 115 border_path = args[0];
116 116
117 efl.Loop loop = new efl.Loop(); 117 Efl.Loop loop = new Efl.Loop();
118 TestMain t = new TestMain(border_path); 118 TestMain t = new TestMain(border_path);
119 119
120 loop.Begin(); 120 loop.Begin();
121 121
122 efl.All.Shutdown(); 122 Efl.All.Shutdown();
123 } 123 }
124} 124}
125 125