aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-09-12 15:01:45 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-12 15:04:11 +0200
commit242ed076f3836f60bf84a32f2ded77879f3bd860 (patch)
treef35b0f06c6052f298a56dea987d5a0302b42528e
parentmono-examples: Do not initialize the UI component if it is not needed (diff)
downloadexamples-242ed076f3836f60bf84a32f2ded77879f3bd860.tar.gz
csharp: Basic components for all tests without Ui.
Summary: Uiless tests use basic components. Make test terminate again. Reviewers: lauromoura, felipealmeida, segfaultxavi Reviewed By: segfaultxavi Subscribers: brunobelo, felipealmeida, lauromoura Differential Revision: https://phab.enlightenment.org/D9916
-rw-r--r--reference/csharp/eina/src/eina_array.cs2
-rw-r--r--reference/csharp/eina/src/eina_hash.cs2
-rw-r--r--reference/csharp/eina/src/eina_iterator.cs2
-rw-r--r--reference/csharp/eina/src/eina_list.cs2
-rw-r--r--reference/csharp/eina/src/eina_log.cs2
-rw-r--r--reference/csharp/eina/src/eina_value.cs2
-rw-r--r--tutorial/csharp/eo-intro/src/eo_intro_main.cs2
-rw-r--r--tutorial/csharp/hello-world/src/hello-world.cs9
8 files changed, 16 insertions, 7 deletions
diff --git a/reference/csharp/eina/src/eina_array.cs b/reference/csharp/eina/src/eina_array.cs
index dffb394b..3864bded 100644
--- a/reference/csharp/eina/src/eina_array.cs
+++ b/reference/csharp/eina/src/eina_array.cs
@@ -76,7 +76,7 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/reference/csharp/eina/src/eina_hash.cs b/reference/csharp/eina/src/eina_hash.cs
index 07b23199..ee8e6019 100644
--- a/reference/csharp/eina/src/eina_hash.cs
+++ b/reference/csharp/eina/src/eina_hash.cs
@@ -131,6 +131,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/reference/csharp/eina/src/eina_iterator.cs b/reference/csharp/eina/src/eina_iterator.cs
index 498c3e5a..c8d29f8b 100644
--- a/reference/csharp/eina/src/eina_iterator.cs
+++ b/reference/csharp/eina/src/eina_iterator.cs
@@ -80,6 +80,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/reference/csharp/eina/src/eina_list.cs b/reference/csharp/eina/src/eina_list.cs
index 059f4d79..8f2956be 100644
--- a/reference/csharp/eina/src/eina_list.cs
+++ b/reference/csharp/eina/src/eina_list.cs
@@ -70,6 +70,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/reference/csharp/eina/src/eina_log.cs b/reference/csharp/eina/src/eina_log.cs
index f671c9af..159853dd 100644
--- a/reference/csharp/eina/src/eina_log.cs
+++ b/reference/csharp/eina/src/eina_log.cs
@@ -64,6 +64,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/reference/csharp/eina/src/eina_value.cs b/reference/csharp/eina/src/eina_value.cs
index 328a9dad..3e82e2c7 100644
--- a/reference/csharp/eina/src/eina_value.cs
+++ b/reference/csharp/eina/src/eina_value.cs
@@ -67,6 +67,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/tutorial/csharp/eo-intro/src/eo_intro_main.cs b/tutorial/csharp/eo-intro/src/eo_intro_main.cs
index a928b91f..b5ee7730 100644
--- a/tutorial/csharp/eo-intro/src/eo_intro_main.cs
+++ b/tutorial/csharp/eo-intro/src/eo_intro_main.cs
@@ -49,6 +49,6 @@ public class Example : Efl.Csharp.Application
public static void Main()
{
var example = new Example();
- example.Launch();
+ example.Launch(Efl.Csharp.Components.Basic);
}
}
diff --git a/tutorial/csharp/hello-world/src/hello-world.cs b/tutorial/csharp/hello-world/src/hello-world.cs
index a7b04575..2eac0bfe 100644
--- a/tutorial/csharp/hello-world/src/hello-world.cs
+++ b/tutorial/csharp/hello-world/src/hello-world.cs
@@ -2,6 +2,14 @@ using System;
public class Example : Efl.Csharp.Application
{
+ // Callback to quit the application
+ public static void QuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e)
+ {
+ // Exit the EFL main loop
+ if (e.arg == false)
+ Efl.App.AppMain.Quit(0);
+ }
+
protected override void OnInitialize(string[] args)
{
// Create a window and initialize it
@@ -14,6 +22,7 @@ public class Example : Efl.Csharp.Application
// Window size must be explicitly set, otherwise it will be invisible
// due to its lack of content.
win.SetSize(new Eina.Size2D(360, 240));
+ win.VisibilityChangedEvent += QuitCb;
}
#if WIN32