summaryrefslogtreecommitdiff
path: root/reference/csharp
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 /reference/csharp
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 'reference/csharp')
-rw-r--r--reference/csharp/core/src/core_event.cs14
-rw-r--r--reference/csharp/core/src/core_idler.cs10
-rw-r--r--reference/csharp/core/src/core_poll.cs10
-rw-r--r--reference/csharp/eina/src/eina_array.cs12
-rw-r--r--reference/csharp/eina/src/eina_hash.cs16
-rw-r--r--reference/csharp/eina/src/eina_iterator.cs22
-rw-r--r--reference/csharp/eina/src/eina_list.cs10
-rw-r--r--reference/csharp/eina/src/eina_log.cs14
-rw-r--r--reference/csharp/eina/src/eina_value.cs14
-rw-r--r--reference/csharp/ui/src/focus_main.cs34
-rw-r--r--reference/csharp/ui/src/ui_container.cs52
-rw-r--r--reference/csharp/ui/src/ui_sizing.cs24
12 files changed, 116 insertions, 116 deletions
diff --git a/reference/csharp/core/src/core_event.cs b/reference/csharp/core/src/core_event.cs
index 40bbb65..385357f 100644
--- a/reference/csharp/core/src/core_event.cs
+++ b/reference/csharp/core/src/core_event.cs
@@ -12,7 +12,7 @@ public class Example
12 // Polling callback 12 // Polling callback
13 private static void PollCb(object sender, EventArgs e) 13 private static void PollCb(object sender, EventArgs e)
14 { 14 {
15 Console.WriteLine(" Poll from {0}", ((efl.IObject)sender).GetName()); 15 Console.WriteLine(" Poll from {0}", ((Efl.Object)sender).GetName());
16 } 16 }
17 17
18#if WIN32 18#if WIN32
@@ -21,17 +21,17 @@ public class Example
21 public static void Main() 21 public static void Main()
22 { 22 {
23 // Initialize EFL and all UI components 23 // Initialize EFL and all UI components
24 efl.All.Init(); 24 Efl.All.Init();
25 25
26 // Retrieve the application's main loop 26 // Retrieve the application's main loop
27 var mainloop = efl.App.GetLoopMain(); 27 var mainloop = Efl.App.GetLoopMain();
28 mainloop.SetName("Mainloop"); 28 mainloop.SetName("Mainloop");
29 29
30 // This event gets triggered continuously 30 // This event gets triggered continuously
31 mainloop.PollHighEvt += PollCb; 31 mainloop.PollHighEvt += PollCb;
32 32
33 // This timer will control events fired by the main loop 33 // This timer will control events fired by the main loop
34 new efl.Loop_Timer(mainloop, (efl.ILoop_Timer etimer) => { 34 new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
35 etimer.SetName("Timer"); 35 etimer.SetName("Timer");
36 // Trigger every 100ms 36 // Trigger every 100ms
37 etimer.SetInterval(0.1); 37 etimer.SetInterval(0.1);
@@ -51,10 +51,10 @@ public class Example
51 break; 51 break;
52 default: 52 default:
53 message += "Quitting"; 53 message += "Quitting";
54 mainloop.Quit(new eina.Value(0)); 54 mainloop.Quit(new Eina.Value(0));
55 break; 55 break;
56 } 56 }
57 Console.WriteLine(message, tick_count, ((efl.IObject)sender).GetName()); 57 Console.WriteLine(message, tick_count, ((Efl.Object)sender).GetName());
58 tick_count++; 58 tick_count++;
59 }; 59 };
60 }); 60 });
@@ -65,7 +65,7 @@ public class Example
65 mainloop.Begin(); 65 mainloop.Begin();
66 66
67 // Shutdown EFL 67 // Shutdown EFL
68 efl.All.Shutdown(); 68 Efl.All.Shutdown();
69 69
70 Console.WriteLine("Application is over"); 70 Console.WriteLine("Application is over");
71 } 71 }
diff --git a/reference/csharp/core/src/core_idler.cs b/reference/csharp/core/src/core_idler.cs
index 3657d8f..c25b31f 100644
--- a/reference/csharp/core/src/core_idler.cs
+++ b/reference/csharp/core/src/core_idler.cs
@@ -17,10 +17,10 @@ public class Example
17 public static void Main() 17 public static void Main()
18 { 18 {
19 // Initialize EFL and all UI components 19 // Initialize EFL and all UI components
20 efl.All.Init(); 20 Efl.All.Init();
21 21
22 // Retrieve the application's main loop 22 // Retrieve the application's main loop
23 var mainloop = efl.App.GetLoopMain(); 23 var mainloop = Efl.App.GetLoopMain();
24 24
25 // Register to all Idle events 25 // Register to all Idle events
26 mainloop.IdleEnterEvt += (object sender, EventArgs e) => { 26 mainloop.IdleEnterEvt += (object sender, EventArgs e) => {
@@ -34,12 +34,12 @@ public class Example
34 }; 34 };
35 35
36 // Use a timer to exit the application 36 // Use a timer to exit the application
37 new efl.Loop_Timer(mainloop, (efl.ILoop_Timer etimer) => { 37 new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
38 // Trigger after 10ms 38 // Trigger after 10ms
39 etimer.SetInterval(0.01); 39 etimer.SetInterval(0.01);
40 etimer.TickEvt += (object sender, EventArgs e) => { 40 etimer.TickEvt += (object sender, EventArgs e) => {
41 Console.WriteLine("TIMER: timer callback called, exiting."); 41 Console.WriteLine("TIMER: timer callback called, exiting.");
42 mainloop.Quit(new eina.Value(0)); 42 mainloop.Quit(new Eina.Value(0));
43 }; 43 };
44 }); 44 });
45 45
@@ -47,6 +47,6 @@ public class Example
47 mainloop.Begin(); 47 mainloop.Begin();
48 48
49 // Shutdown EFL 49 // Shutdown EFL
50 efl.All.Shutdown(); 50 Efl.All.Shutdown();
51 } 51 }
52} 52}
diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs
index a05e7b9..6caf5c3 100644
--- a/reference/csharp/core/src/core_poll.cs
+++ b/reference/csharp/core/src/core_poll.cs
@@ -16,10 +16,10 @@ public class Example
16 public static void Main() 16 public static void Main()
17 { 17 {
18 // Initialize EFL and all UI components 18 // Initialize EFL and all UI components
19 efl.All.Init(); 19 Efl.All.Init();
20 20
21 // Retrieve the application's main loop 21 // Retrieve the application's main loop
22 var mainloop = efl.App.GetLoopMain(); 22 var mainloop = Efl.App.GetLoopMain();
23 23
24 // Register to all Poll events 24 // Register to all Poll events
25 mainloop.PollLowEvt += (object sender, EventArgs e) => { 25 mainloop.PollLowEvt += (object sender, EventArgs e) => {
@@ -33,12 +33,12 @@ public class Example
33 }; 33 };
34 34
35 // Use a timer to exit the application 35 // Use a timer to exit the application
36 new efl.Loop_Timer(mainloop, (efl.ILoop_Timer etimer) => { 36 new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
37 // Trigger after 30s 37 // Trigger after 30s
38 etimer.SetInterval(30); 38 etimer.SetInterval(30);
39 etimer.TickEvt += (object sender, EventArgs e) => { 39 etimer.TickEvt += (object sender, EventArgs e) => {
40 Console.WriteLine("\nTIMER: timer callback called, exiting."); 40 Console.WriteLine("\nTIMER: timer callback called, exiting.");
41 mainloop.Quit(new eina.Value(0)); 41 mainloop.Quit(new Eina.Value(0));
42 }; 42 };
43 }); 43 });
44 44
@@ -46,6 +46,6 @@ public class Example
46 mainloop.Begin(); 46 mainloop.Begin();
47 47
48 // Shutdown EFL 48 // Shutdown EFL
49 efl.All.Shutdown(); 49 Efl.All.Shutdown();
50 } 50 }
51} 51}
diff --git a/reference/csharp/eina/src/eina_array.cs b/reference/csharp/eina/src/eina_array.cs
index a81085f..9cf9d54 100644
--- a/reference/csharp/eina/src/eina_array.cs
+++ b/reference/csharp/eina/src/eina_array.cs
@@ -1,8 +1,8 @@
1/* 1/*
2 * Eina Array examples. 2 * Eina Array examples.
3 * 3 *
4 * These examples demonstrate how to work with eina_array data and methods. 4 * These examples demonstrate how to work with Eina_array data and methods.
5 * We use a simple array of strings to initialise our eina_array before 5 * We use a simple array of strings to initialise our Eina_array before
6 * performing various mutations and printing the results. 6 * performing various mutations and printing the results.
7 */ 7 */
8 8
@@ -10,7 +10,7 @@ using System;
10 10
11public class Example 11public class Example
12{ 12{
13 static eina.Array<string> CreateArray() 13 static Eina.Array<string> CreateArray()
14 { 14 {
15 // some content to populate our array 15 // some content to populate our array
16 string[] names = 16 string[] names =
@@ -22,7 +22,7 @@ public class Example
22 }; 22 };
23 23
24 // set up an array with a growth step to give a little headroom 24 // set up an array with a growth step to give a little headroom
25 var array = new eina.Array<string>(25u); 25 var array = new Eina.Array<string>(25u);
26 26
27 foreach (string name in names) 27 foreach (string name in names)
28 array.Push(name); 28 array.Push(name);
@@ -40,7 +40,7 @@ public class Example
40 40
41 public static void Main() 41 public static void Main()
42 { 42 {
43 efl.All.Init(); 43 Efl.All.Init();
44 44
45 var array = CreateArray(); 45 var array = CreateArray();
46 46
@@ -69,7 +69,7 @@ public class Example
69 69
70 array.Dispose(); 70 array.Dispose();
71 71
72 efl.All.Shutdown(); 72 Efl.All.Shutdown();
73 } 73 }
74} 74}
75 75
diff --git a/reference/csharp/eina/src/eina_hash.cs b/reference/csharp/eina/src/eina_hash.cs
index b85bfaf..19c3db0 100644
--- a/reference/csharp/eina/src/eina_hash.cs
+++ b/reference/csharp/eina/src/eina_hash.cs
@@ -1,7 +1,7 @@
1/* 1/*
2 * Eina Hash examples. 2 * Eina Hash examples.
3 * 3 *
4 * These examples demonstrate how to work with eina_hash data and methods. 4 * These examples demonstrate how to work with Eina_hash data and methods.
5 * 5 *
6 * We have two main hash objects here, firstly an int keyed hash with some 6 * We have two main hash objects here, firstly an int keyed hash with some
7 * dummy content. 7 * dummy content.
@@ -14,10 +14,10 @@ using System.Collections.Generic;
14 14
15public class Example 15public class Example
16{ 16{
17 static eina.Hash<Int32, string> CreateHash() 17 static Eina.Hash<Int32, string> CreateHash()
18 { 18 {
19 // let's create a simple hash with integers as keys 19 // let's create a simple hash with integers as keys
20 var hash = new eina.Hash<Int32, string>(); 20 var hash = new Eina.Hash<Int32, string>();
21 21
22 // Add initial entries to our hash 22 // Add initial entries to our hash
23 for (int i = 0; i < 10; ++i) 23 for (int i = 0; i < 10; ++i)
@@ -53,7 +53,7 @@ public class Example
53 Console.WriteLine($" Name: {key}\tNumber {data}\n"); 53 Console.WriteLine($" Name: {key}\tNumber {data}\n");
54 } 54 }
55 55
56 static void PrintPhonebook(eina.Hash<string, string> book) 56 static void PrintPhonebook(Eina.Hash<string, string> book)
57 { 57 {
58 int count = book.Population(); 58 int count = book.Population();
59 Console.WriteLine($"Complete phone book ({count}):"); 59 Console.WriteLine($"Complete phone book ({count}):");
@@ -65,7 +65,7 @@ public class Example
65 Console.WriteLine(""); 65 Console.WriteLine("");
66 } 66 }
67 67
68 static eina.Hash<string, string> CreatePhonebook() 68 static Eina.Hash<string, string> CreatePhonebook()
69 { 69 {
70 string[] names = 70 string[] names =
71 { 71 {
@@ -79,7 +79,7 @@ public class Example
79 }; 79 };
80 80
81 // create hash of strings to strings 81 // create hash of strings to strings
82 var hash = new eina.Hash<string, string>(); 82 var hash = new Eina.Hash<string, string>();
83 83
84 // Add initial entries to our hash 84 // Add initial entries to our hash
85 for (int i = 0; i < 4; ++i) 85 for (int i = 0; i < 4; ++i)
@@ -119,11 +119,11 @@ public class Example
119 119
120 public static void Main() 120 public static void Main()
121 { 121 {
122 efl.All.Init(); 122 Efl.All.Init();
123 123
124 HashDemo(); 124 HashDemo();
125 PhonebookDemo(); 125 PhonebookDemo();
126 126
127 efl.All.Shutdown(); 127 Efl.All.Shutdown();
128 } 128 }
129} 129}
diff --git a/reference/csharp/eina/src/eina_iterator.cs b/reference/csharp/eina/src/eina_iterator.cs
index 7033abf..54f02ff 100644
--- a/reference/csharp/eina/src/eina_iterator.cs
+++ b/reference/csharp/eina/src/eina_iterator.cs
@@ -2,8 +2,8 @@
2/* 2/*
3 * Eina Iterator examples. 3 * Eina Iterator examples.
4 * 4 *
5 * These examples demonstrate how to work with eina_iterator methods. 5 * These examples demonstrate how to work with Eina_iterator methods.
6 * Both an eina_list and an eina_array are created and an iterator obtained 6 * Both an Eina_list and an Eina_array are created and an iterator obtained
7 * for both. You can see how we can use iterators irrespective of the source 7 * for both. You can see how we can use iterators irrespective of the source
8 * and also that there are different ways to work with iterating content. 8 * and also that there are different ways to work with iterating content.
9 */ 9 */
@@ -12,7 +12,7 @@ using System;
12 12
13public class Example 13public class Example
14{ 14{
15 static void PrintIterator(eina.Iterator<string> it) 15 static void PrintIterator(Eina.Iterator<string> it)
16 { 16 {
17 Console.WriteLine("--iterator start--"); 17 Console.WriteLine("--iterator start--");
18 foreach(string s in it) 18 foreach(string s in it)
@@ -20,7 +20,7 @@ public class Example
20 Console.WriteLine("-- iterator end --"); 20 Console.WriteLine("-- iterator end --");
21 } 21 }
22 22
23 static eina.Array<string> CreateArray() 23 static Eina.Array<string> CreateArray()
24 { 24 {
25 string[] strings = 25 string[] strings =
26 { 26 {
@@ -30,7 +30,7 @@ public class Example
30 "boomer" 30 "boomer"
31 }; 31 };
32 32
33 var array = new eina.Array<string>(4u); 33 var array = new Eina.Array<string>(4u);
34 34
35 foreach (string s in strings) 35 foreach (string s in strings)
36 array.Push(s); 36 array.Push(s);
@@ -38,7 +38,7 @@ public class Example
38 return array; 38 return array;
39 } 39 }
40 40
41 static eina.List<string> CreateList() 41 static Eina.List<string> CreateList()
42 { 42 {
43 string[] more_strings = { 43 string[] more_strings = {
44 "sentence strings", 44 "sentence strings",
@@ -47,7 +47,7 @@ public class Example
47 "then grab your gun and bring the cat in" 47 "then grab your gun and bring the cat in"
48 }; 48 };
49 49
50 var list = new eina.List<string>(); 50 var list = new Eina.List<string>();
51 51
52 foreach (string s in more_strings) 52 foreach (string s in more_strings)
53 list.Append(s); 53 list.Append(s);
@@ -57,22 +57,22 @@ public class Example
57 57
58 public static void Main() 58 public static void Main()
59 { 59 {
60 efl.All.Init(); 60 Efl.All.Init();
61 61
62 // create an eina.Array and iterate through it's contents 62 // create an Eina.Array and iterate through it's contents
63 var array = CreateArray(); 63 var array = CreateArray();
64 var it = array.GetIterator(); 64 var it = array.GetIterator();
65 PrintIterator(it); 65 PrintIterator(it);
66 it.Dispose(); 66 it.Dispose();
67 array.Dispose(); 67 array.Dispose();
68 68
69 // perform the same iteration with an eina.List 69 // perform the same iteration with an Eina.List
70 var list = CreateList(); 70 var list = CreateList();
71 it = list.GetIterator(); 71 it = list.GetIterator();
72 PrintIterator(it); 72 PrintIterator(it);
73 it.Dispose(); 73 it.Dispose();
74 list.Dispose(); 74 list.Dispose();
75 75
76 efl.All.Shutdown(); 76 Efl.All.Shutdown();
77 } 77 }
78} 78}
diff --git a/reference/csharp/eina/src/eina_list.cs b/reference/csharp/eina/src/eina_list.cs
index b1ddfef..ecdf7d3 100644
--- a/reference/csharp/eina/src/eina_list.cs
+++ b/reference/csharp/eina/src/eina_list.cs
@@ -2,7 +2,7 @@
2/* 2/*
3 * Eina List examples. 3 * Eina List examples.
4 * 4 *
5 * These examples demonstrate how to work with eina_list data and methods. 5 * These examples demonstrate how to work with Eina_list data and methods.
6 * We create a simple list of names by appending strings to an empty list 6 * We create a simple list of names by appending strings to an empty list
7 * and then run various mutations and print each result. 7 * and then run various mutations and print each result.
8 */ 8 */
@@ -12,9 +12,9 @@ using System.Linq;
12 12
13public class Example 13public class Example
14{ 14{
15 static eina.List<string> CreateList() 15 static Eina.List<string> CreateList()
16 { 16 {
17 var list = new eina.List<string>(); 17 var list = new Eina.List<string>();
18 18
19 list.Append("Adama"); 19 list.Append("Adama");
20 list.Append("Baltar"); 20 list.Append("Baltar");
@@ -25,7 +25,7 @@ public class Example
25 25
26 public static void Main() 26 public static void Main()
27 { 27 {
28 efl.All.Init(); 28 Efl.All.Init();
29 29
30 var list = CreateList(); 30 var list = CreateList();
31 31
@@ -66,6 +66,6 @@ public class Example
66 66
67 list.Dispose(); 67 list.Dispose();
68 68
69 efl.All.Shutdown(); 69 Efl.All.Shutdown();
70 } 70 }
71} 71}
diff --git a/reference/csharp/eina/src/eina_log.cs b/reference/csharp/eina/src/eina_log.cs
index ca8cce8..0e8664b 100644
--- a/reference/csharp/eina/src/eina_log.cs
+++ b/reference/csharp/eina/src/eina_log.cs
@@ -13,14 +13,14 @@ public class Example
13 static double Divide(int num, int denom) 13 static double Divide(int num, int denom)
14 { 14 {
15 if (denom == 0) 15 if (denom == 0)
16 eina.Log.Critical("Attempt to divide by 0\n"); 16 Eina.Log.Critical("Attempt to divide by 0\n");
17 else 17 else
18 { 18 {
19 if (denom < 0) 19 if (denom < 0)
20 eina.Log.Warning("Possible undesirable effect, divide by negative number"); 20 Eina.Log.Warning("Possible undesirable effect, divide by negative number");
21 21
22 double ret = ((double) num / denom); 22 double ret = ((double) num / denom);
23 eina.Log.Info($"{num} / {denom} = {ret}\n"); 23 Eina.Log.Info($"{num} / {denom} = {ret}\n");
24 return ret; 24 return ret;
25 } 25 }
26 26
@@ -39,24 +39,24 @@ public class Example
39 Console.WriteLine("Executing with default logging"); 39 Console.WriteLine("Executing with default logging");
40 Divides(); 40 Divides();
41 41
42 eina.Log.GlobalLevelSet(eina.Log.Level.Warning); 42 Eina.Log.GlobalLevelSet(Eina.Log.Level.Warning);
43 Console.WriteLine("Executing with Warning level"); // same as EINA_LOG_LEVEL = 2 43 Console.WriteLine("Executing with Warning level"); // same as EINA_LOG_LEVEL = 2
44 Divides(); 44 Divides();
45 45
46 eina.Log.GlobalLevelSet(eina.Log.Level.Info); 46 Eina.Log.GlobalLevelSet(Eina.Log.Level.Info);
47 Console.WriteLine("Executing with Info on"); // same as EINA_LOG_LEVEL = 3 47 Console.WriteLine("Executing with Info on"); // same as EINA_LOG_LEVEL = 3
48 Divides(); 48 Divides();
49 } 49 }
50 50
51 public static void Main() 51 public static void Main()
52 { 52 {
53 efl.All.Init(); 53 Efl.All.Init();
54 54
55 LogLevels(); 55 LogLevels();
56 56
57 // TODO: missing 57 // TODO: missing
58 //LogCustom(); 58 //LogCustom();
59 59
60 efl.All.Shutdown(); 60 Efl.All.Shutdown();
61 } 61 }
62} 62}
diff --git a/reference/csharp/eina/src/eina_value.cs b/reference/csharp/eina/src/eina_value.cs
index 0822798..c4765e4 100644
--- a/reference/csharp/eina/src/eina_value.cs
+++ b/reference/csharp/eina/src/eina_value.cs
@@ -1,7 +1,7 @@
1/* 1/*
2 * Eina Value examples. 2 * Eina Value examples.
3 * 3 *
4 * These examples demonstrate how to work with eina_value data and methods. 4 * These examples demonstrate how to work with Eina_value data and methods.
5 * Eina_Value is a way to represent and pass data of varying types and to 5 * Eina_Value is a way to represent and pass data of varying types and to
6 * convert efficiently between them. 6 * convert efficiently between them.
7 * Eina_Value can even define structs for managing more complex requirements. 7 * Eina_Value can even define structs for managing more complex requirements.
@@ -16,7 +16,7 @@ public class Example
16 int i; 16 int i;
17 17
18 // Setting up an integer value type 18 // Setting up an integer value type
19 var int_val = new eina.Value(eina.ValueType.Int32); 19 var int_val = new Eina.Value(Eina.ValueType.Int32);
20 int_val.Set(123); 20 int_val.Set(123);
21 int_val.Get(out i); 21 int_val.Get(out i);
22 Console.WriteLine("int_val value is {0}", i); 22 Console.WriteLine("int_val value is {0}", i);
@@ -31,7 +31,7 @@ public class Example
31 string str; 31 string str;
32 32
33 // Setting up an string value type 33 // Setting up an string value type
34 var str_val = new eina.Value(eina.ValueType.String); 34 var str_val = new Eina.Value(Eina.ValueType.String);
35 str_val.Set("My string"); 35 str_val.Set("My string");
36 str_val.Get(out str); 36 str_val.Get(out str);
37 Console.WriteLine("str_val value is \"{0}\"", str); 37 Console.WriteLine("str_val value is \"{0}\"", str);
@@ -44,8 +44,8 @@ public class Example
44 static void ValueConvert() 44 static void ValueConvert()
45 { 45 {
46 // Set up string and int types to convert between 46 // Set up string and int types to convert between
47 var str_val = new eina.Value(eina.ValueType.String); 47 var str_val = new Eina.Value(Eina.ValueType.String);
48 var int_val = new eina.Value(eina.ValueType.Int32); 48 var int_val = new Eina.Value(Eina.ValueType.Int32);
49 49
50 // Convert from int to string: 50 // Convert from int to string:
51 int i1; 51 int i1;
@@ -68,7 +68,7 @@ public class Example
68 68
69 public static void Main() 69 public static void Main()
70 { 70 {
71 efl.All.Init(); 71 Efl.All.Init();
72 72
73 ValueInt(); 73 ValueInt();
74 Console.WriteLine(""); 74 Console.WriteLine("");
@@ -79,6 +79,6 @@ public class Example
79 ValueConvert(); 79 ValueConvert();
80 Console.WriteLine(""); 80 Console.WriteLine("");
81 81
82 efl.All.Shutdown(); 82 Efl.All.Shutdown();
83 } 83 }
84} 84}
diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs
index f5a87a5..5cf6463 100644
--- a/reference/csharp/ui/src/focus_main.cs
+++ b/reference/csharp/ui/src/focus_main.cs
@@ -4,7 +4,7 @@ public class Example
4{ 4{
5 public static void FocusChangedCb(object sender, EventArgs e) 5 public static void FocusChangedCb(object sender, EventArgs e)
6 { 6 {
7 Console.WriteLine($"Focus for object {((efl.IText)sender).GetText()} changed to {((efl.ui.IWidget)sender).GetFocus()}"); 7 Console.WriteLine($"Focus for object {((Efl.Text)sender).GetText()} changed to {((Efl.Ui.Widget)sender).GetFocus()}");
8 } 8 }
9 9
10#if WIN32 10#if WIN32
@@ -13,29 +13,29 @@ public class Example
13 public static void Main() 13 public static void Main()
14 { 14 {
15 // Initialize EFL and all UI components 15 // Initialize EFL and all UI components
16 efl.All.Init(efl.Components.Ui); 16 Efl.All.Init(Efl.Components.Ui);
17 17
18 // Create a window and initialize it 18 // Create a window and initialize it
19 var win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { 19 var win = new Efl.Ui.Win(null, (Efl.Ui.Win ewin) => {
20 ewin.SetWinType(efl.ui.Win_Type.Basic); 20 ewin.SetWinType(Efl.Ui.WinType.Basic);
21 ewin.SetText("Focus example"); 21 ewin.SetText("Focus example");
22 ewin.SetAutohide(true); 22 ewin.SetAutohide(true);
23 ewin.HideEvt += (object sender, EventArgs e) => { 23 ewin.HideEvt += (object sender, EventArgs e) => {
24 // Exit the EFL main loop 24 // Exit the EFL main loop
25 efl.ui.Config.Exit(); 25 Efl.Ui.Config.Exit();
26 }; 26 };
27 }); 27 });
28 28
29 // Create the main box container 29 // Create the main box container
30 var vbox = new efl.ui.Box(win, (efl.ui.IBox ebox) => { 30 var vbox = new Efl.Ui.Box(win, (Efl.Ui.Box ebox) => {
31 ebox.SetHintMin(new eina.Size2D(360, 240)); 31 ebox.SetHintMin(new Eina.Size2D(360, 240));
32 win.SetContent(ebox); 32 win.SetContent(ebox);
33 }); 33 });
34 34
35 // Create some check boxes 35 // Create some check boxes
36 efl.ui.ICheck first_checkbox = null; 36 Efl.Ui.Check first_checkbox = null;
37 for (int i = 0; i< 5; i++) { 37 for (int i = 0; i< 5; i++) {
38 var checkbox = new efl.ui.Check(vbox, (efl.ui.ICheck echeck) => { 38 var checkbox = new Efl.Ui.Check(vbox, (Efl.Ui.Check echeck) => {
39 echeck.SetText("Check " + i); 39 echeck.SetText("Check " + i);
40 echeck.SetHintAlign(0.5, 0.5); 40 echeck.SetHintAlign(0.5, 0.5);
41 echeck.FocusChangedEvt += FocusChangedCb; 41 echeck.FocusChangedEvt += FocusChangedCb;
@@ -45,30 +45,30 @@ public class Example
45 }; 45 };
46 46
47 // Create an horizontal box to contain the two buttons 47 // Create an horizontal box to contain the two buttons
48 var hbox = new efl.ui.Box(vbox, (efl.ui.IBox ebox) => { 48 var hbox = new Efl.Ui.Box(vbox, (Efl.Ui.Box ebox) => {
49 ebox.SetDirection(efl.ui.Dir.Horizontal); 49 ebox.SetDirection(Efl.Ui.Dir.Horizontal);
50 vbox.DoPack(ebox); 50 vbox.DoPack(ebox);
51 }); 51 });
52 52
53 // Create a "Focus Mover" button 53 // Create a "Focus Mover" button
54 new efl.ui.Button(hbox, (efl.ui.IButton ebutton) => { 54 new Efl.Ui.Button(hbox, (Efl.Ui.Button ebutton) => {
55 ebutton.SetText("Focus mover"); 55 ebutton.SetText("Focus mover");
56 ebutton.FocusChangedEvt += FocusChangedCb; 56 ebutton.FocusChangedEvt += FocusChangedCb;
57 ebutton.ClickedEvt += (object sender, EventArgs e) => { 57 ebutton.ClickedEvt += (object sender, EventArgs e) => {
58 Console.WriteLine("Clicked Focus Mover"); 58 Console.WriteLine("Clicked Focus Mover");
59 // Manually transfer focus to the first check box 59 // Manually transfer focus to the first check box
60 efl.ui.focus.Util.Focus(first_checkbox); 60 Efl.Ui.Focus.Util.Focus(first_checkbox);
61 }; 61 };
62 hbox.DoPack(ebutton); 62 hbox.DoPack(ebutton);
63 }); 63 });
64 64
65 // Create a Quit button 65 // Create a Quit button
66 new efl.ui.Button(hbox, (efl.ui.IButton ebutton) => { 66 new Efl.Ui.Button(hbox, (Efl.Ui.Button ebutton) => {
67 ebutton.SetText("Quit"); 67 ebutton.SetText("Quit");
68 ebutton.FocusChangedEvt += FocusChangedCb; 68 ebutton.FocusChangedEvt += FocusChangedCb;
69 ebutton.ClickedEvt += (object sender, EventArgs e) => { 69 ebutton.ClickedEvt += (object sender, EventArgs e) => {
70 Console.WriteLine("Clicked Quit"); 70 Console.WriteLine("Clicked Quit");
71 efl.ui.Config.Exit(); 71 Efl.Ui.Config.Exit();
72 }; 72 };
73 hbox.DoPack(ebutton); 73 hbox.DoPack(ebutton);
74 }); 74 });
@@ -77,10 +77,10 @@ public class Example
77 win.SetFocusHighlightEnabled(true); 77 win.SetFocusHighlightEnabled(true);
78 78
79 // Start the EFL main loop 79 // Start the EFL main loop
80 efl.ui.Config.Run(); 80 Efl.Ui.Config.Run();
81 81
82 // Shutdown EFL 82 // Shutdown EFL
83 efl.All.Shutdown(); 83 Efl.All.Shutdown();
84 } 84 }
85} 85}
86 86
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs
index fe5cc97..81e883b 100644
--- a/reference/csharp/ui/src/ui_container.cs
+++ b/reference/csharp/ui/src/ui_container.cs
@@ -10,9 +10,9 @@ using System;
10public class Example 10public class Example
11{ 11{
12 // Create a box container full of buttons 12 // Create a box container full of buttons
13 static efl.ui.IBox CreateBox(efl.ui.IWin win) 13 static Efl.Ui.Box CreateBox(Efl.Ui.Win win)
14 { 14 {
15 efl.ui.IBox box = new efl.ui.Box(win, (efl.ui.IBox ebox) => { 15 Efl.Ui.Box box = new Efl.Ui.Box(win, (Efl.Ui.Box ebox) => {
16 // Set distance between contained elements 16 // Set distance between contained elements
17 ebox.SetPackPadding(5, 0, true); 17 ebox.SetPackPadding(5, 0, true);
18 }); 18 });
@@ -20,12 +20,12 @@ public class Example
20 for (int i = 1; i <= 4; ++i) 20 for (int i = 1; i <= 4; ++i)
21 { 21 {
22 // Add 4 buttons, one below the other 22 // Add 4 buttons, one below the other
23 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 23 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
24 ebutton.SetText($"Boxed {i}"); 24 ebutton.SetText($"Boxed {i}");
25 if (i == 2) 25 if (i == 2)
26 { 26 {
27 // Button 2 has its maximum size limited, so it will be smaller 27 // Button 2 has its maximum size limited, so it will be smaller
28 ebutton.SetHintMax(new eina.Size2D(100,50)); 28 ebutton.SetHintMax(new Eina.Size2D(100,50));
29 } 29 }
30 box.DoPack(ebutton); 30 box.DoPack(ebutton);
31 }); 31 });
@@ -35,25 +35,25 @@ public class Example
35 } 35 }
36 36
37 // Create a simple table layout 37 // Create a simple table layout
38 static efl.ui.ITable CreateTable(efl.ui.IWin win) 38 static Efl.Ui.Table CreateTable(Efl.Ui.Win win)
39 { 39 {
40 efl.ui.ITable table = new efl.ui.Table(win, (efl.ui.ITable etable) => { 40 Efl.Ui.Table table = new Efl.Ui.Table(win, (Efl.Ui.Table etable) => {
41 // Table with two columns, that get filled left to right, and then top to bottom 41 // Table with two columns, that get filled left to right, and then top to bottom
42 etable.SetTableColumns(2); 42 etable.SetTableColumns(2);
43 etable.SetTableDirection(efl.ui.Dir.Right, efl.ui.Dir.Down); 43 etable.SetTableDirection(Efl.Ui.Dir.Right, Efl.Ui.Dir.Down);
44 }); 44 });
45 45
46 for (int i = 1; i <= 4; ++i) 46 for (int i = 1; i <= 4; ++i)
47 { 47 {
48 // Add 4 buttons, following the defined table flow 48 // Add 4 buttons, following the defined table flow
49 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 49 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
50 ebutton.SetText($"Table {i}"); 50 ebutton.SetText($"Table {i}");
51 table.DoPack(ebutton); 51 table.DoPack(ebutton);
52 }); 52 });
53 } 53 }
54 54
55 // Last button spans two table cells 55 // Last button spans two table cells
56 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 56 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
57 ebutton.SetText("Long Button"); 57 ebutton.SetText("Long Button");
58 table.PackTable(ebutton, 0, 2, 2, 1); 58 table.PackTable(ebutton, 0, 2, 2, 1);
59 }); 59 });
@@ -67,62 +67,62 @@ public class Example
67 public static void Main() 67 public static void Main()
68 { 68 {
69 // Initialize EFL and all UI components 69 // Initialize EFL and all UI components
70 efl.All.Init(efl.Components.Ui); 70 Efl.All.Init(Efl.Components.Ui);
71 71
72 // Create a window and initialize it 72 // Create a window and initialize it
73 efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { 73 Efl.Ui.Win win = new Efl.Ui.Win(null, (Efl.Ui.Win ewin) => {
74 ewin.SetWinType(efl.ui.Win_Type.Basic); 74 ewin.SetWinType(Efl.Ui.WinType.Basic);
75 ewin.SetText("Container demo"); 75 ewin.SetText("Container demo");
76 ewin.SetAutohide(true); 76 ewin.SetAutohide(true);
77 ewin.HideEvt += (object sender, EventArgs e) => { 77 ewin.HideEvt += (object sender, EventArgs e) => {
78 // Exit the EFL main loop 78 // Exit the EFL main loop
79 efl.ui.Config.Exit(); 79 Efl.Ui.Config.Exit();
80 }; 80 };
81 }); 81 });
82 // Give the window an initial size so there is room to resize the panes. 82 // Give the window an initial size so there is room to resize the panes.
83 // Otherwise, all widgets are tightly packed 83 // Otherwise, all widgets are tightly packed
84 win.SetSize(new eina.Size2D(350,250)); 84 win.SetSize(new Eina.Size2D(350,250));
85 85
86 // Create a vertically-split panes container 86 // Create a vertically-split panes container
87 efl.ui.IPanes vsplit = new efl.ui.Panes(win, (efl.ui.IPanes epanes) => { 87 Efl.Ui.Panes vsplit = new Efl.Ui.Panes(win, (Efl.Ui.Panes epanes) => {
88 epanes.SetSplitRatio(0.75); 88 epanes.SetSplitRatio(0.75);
89 win.SetContent(epanes); 89 win.SetContent(epanes);
90 }); 90 });
91 91
92 // Create some boxes and set them as the content of the first pane of the container 92 // Create some boxes and set them as the content of the first pane of the container
93 var box = CreateBox(win); 93 var box = CreateBox(win);
94 efl.Content.static_cast(vsplit.GetPart("first")).SetContent(box); 94 Efl.ContentConcrete.static_cast(vsplit.GetPart("first")).SetContent(box);
95 95
96 // Create a second, horizontally-split panes container and set it as the content of 96 // Create a second, horizontally-split panes container and set it as the content of
97 // the second pane of the first container 97 // the second pane of the first container
98 efl.ui.IPanes hsplit = new efl.ui.Panes(win, (efl.ui.IPanes epanes) => { 98 Efl.Ui.Panes hsplit = new Efl.Ui.Panes(win, (Efl.Ui.Panes epanes) => {
99 epanes.SetDirection(efl.ui.Dir.Horizontal); 99 epanes.SetDirection(Efl.Ui.Dir.Horizontal);
100 epanes.SetSplitRatio(0.85); 100 epanes.SetSplitRatio(0.85);
101 }); 101 });
102 efl.Content.static_cast(vsplit.GetPart("second")).SetContent(hsplit); 102 Efl.ContentConcrete.static_cast(vsplit.GetPart("second")).SetContent(hsplit);
103 103
104 // Create a table and set it as the content of the first pane of the horizontal 104 // Create a table and set it as the content of the first pane of the horizontal
105 // container 105 // container
106 var table = CreateTable(win); 106 var table = CreateTable(win);
107 efl.Content.static_cast(hsplit.GetPart("first")).SetContent(table); 107 Efl.ContentConcrete.static_cast(hsplit.GetPart("first")).SetContent(table);
108 108
109 // Create a button and set it as the content of the second pane of the horizontal 109 // Create a button and set it as the content of the second pane of the horizontal
110 // container 110 // container
111 efl.ui.IButton quit_btn = new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 111 Efl.Ui.Button quit_btn = new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
112 ebutton.SetText("Quit"); 112 ebutton.SetText("Quit");
113 ebutton.SetHintMax(new eina.Size2D(150, 30)); 113 ebutton.SetHintMax(new Eina.Size2D(150, 30));
114 ebutton.ClickedEvt += (object sender, EventArgs e) => { 114 ebutton.ClickedEvt += (object sender, EventArgs e) => {
115 // Exit the EFL main loop 115 // Exit the EFL main loop
116 efl.ui.Config.Exit(); 116 Efl.Ui.Config.Exit();
117 }; 117 };
118 }); 118 });
119 efl.Content.static_cast(hsplit.GetPart("second")).SetContent(quit_btn); 119 Efl.ContentConcrete.static_cast(hsplit.GetPart("second")).SetContent(quit_btn);
120 120
121 // Start the EFL main loop 121 // Start the EFL main loop
122 efl.ui.Config.Run(); 122 Efl.Ui.Config.Run();
123 123
124 // Shutdown EFL 124 // Shutdown EFL
125 efl.All.Shutdown(); 125 Efl.All.Shutdown();
126 } 126 }
127} 127}
128 128
diff --git a/reference/csharp/ui/src/ui_sizing.cs b/reference/csharp/ui/src/ui_sizing.cs
index b56cf48..dd6e5ff 100644
--- a/reference/csharp/ui/src/ui_sizing.cs
+++ b/reference/csharp/ui/src/ui_sizing.cs
@@ -16,49 +16,49 @@ public class Example
16 public static void Main() 16 public static void Main()
17 { 17 {
18 // Initialize EFL and all UI components 18 // Initialize EFL and all UI components
19 efl.All.Init(efl.Components.Ui); 19 Efl.All.Init(Efl.Components.Ui);
20 20
21 // Create a window and initialize it 21 // Create a window and initialize it
22 efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => { 22 Efl.Ui.Win win = new Efl.Ui.Win(null, (Efl.Ui.Win ewin) => {
23 ewin.SetWinType(efl.ui.Win_Type.Basic); 23 ewin.SetWinType(Efl.Ui.WinType.Basic);
24 ewin.SetText("Size Control"); 24 ewin.SetText("Size Control");
25 ewin.SetAutohide(true); 25 ewin.SetAutohide(true);
26 ewin.HideEvt += (object sender, EventArgs e) => { 26 ewin.HideEvt += (object sender, EventArgs e) => {
27 // Exit the EFL main loop 27 // Exit the EFL main loop
28 efl.ui.Config.Exit(); 28 Efl.Ui.Config.Exit();
29 }; 29 };
30 }); 30 });
31 31
32 // Create a box container 32 // Create a box container
33 efl.ui.IBox box = new efl.ui.Box(win, (efl.ui.IBox ebox) => { 33 Efl.Ui.Box box = new Efl.Ui.Box(win, (Efl.Ui.Box ebox) => {
34 win.SetContent(ebox); 34 win.SetContent(ebox);
35 }); 35 });
36 36
37 // Create a regular button (without size hints) 37 // Create a regular button (without size hints)
38 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 38 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
39 ebutton.SetText("Button"); 39 ebutton.SetText("Button");
40 box.DoPack(ebutton); 40 box.DoPack(ebutton);
41 }); 41 });
42 42
43 // Create a small button (max size is limited) 43 // Create a small button (max size is limited)
44 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 44 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
45 ebutton.SetText("Small"); 45 ebutton.SetText("Small");
46 ebutton.SetHintMax(new eina.Size2D(50,50)); 46 ebutton.SetHintMax(new Eina.Size2D(50,50));
47 box.DoPack(ebutton); 47 box.DoPack(ebutton);
48 }); 48 });
49 49
50 // Create a big button (min size is limited) 50 // Create a big button (min size is limited)
51 new efl.ui.Button(win, (efl.ui.IButton ebutton) => { 51 new Efl.Ui.Button(win, (Efl.Ui.Button ebutton) => {
52 ebutton.SetText("Big button"); 52 ebutton.SetText("Big button");
53 ebutton.SetHintMin(new eina.Size2D(100,100)); 53 ebutton.SetHintMin(new Eina.Size2D(100,100));
54 box.DoPack(ebutton); 54 box.DoPack(ebutton);
55 }); 55 });
56 56
57 // Start the EFL main loop 57 // Start the EFL main loop
58 efl.ui.Config.Run(); 58 Efl.Ui.Config.Run();
59 59
60 // Shutdown EFL 60 // Shutdown EFL
61 efl.All.Shutdown(); 61 Efl.All.Shutdown();
62 } 62 }
63} 63}
64 64