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