aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-08-24 02:31:54 -0700
committerapache <apache@e5-web1.enlightenment.org>2018-08-24 02:31:54 -0700
commit066a740d60073593e2e3600056876f1ab46f1deb (patch)
treee2fab62be0ca5867bfd0f1a309e5141a7e9c3a66
parentWiki page start.md changed with summary [Added Hello World C#] by Xavi Artigas (diff)
downloadwww-content-066a740d60073593e2e3600056876f1ab46f1deb.tar.gz
Wiki page hello-world-cs.md changed with summary [Set window parent] by Xavi Artigas
-rw-r--r--pages/develop/tutorials/csharp/hello-world-cs.md.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/pages/develop/tutorials/csharp/hello-world-cs.md.txt b/pages/develop/tutorials/csharp/hello-world-cs.md.txt
index 4eba59d28..b99f1fe02 100644
--- a/pages/develop/tutorials/csharp/hello-world-cs.md.txt
+++ b/pages/develop/tutorials/csharp/hello-world-cs.md.txt
@@ -33,7 +33,7 @@ public class Example
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) => {
+ efl.ui.IWin win = new efl.ui.Win(efl.App.GetLoopMain(), (efl.ui.IWin ewin) => {
// Set the window's title
ewin.SetText("Hello World");
// Request that the window is automatically hidden when the "close"
@@ -113,7 +113,7 @@ In the tutorial code:
```csharp
// Create a window and initialize it
- efl.ui.IWin win = new efl.ui.Win(null, (efl.ui.IWin ewin) => {
+ efl.ui.IWin win = new efl.ui.Win(efl.App.GetLoopMain(), (efl.ui.IWin ewin) => {
// Set the window's title
ewin.SetText("Hello World");
// Request that the window is automatically hidden when the "close"
@@ -122,7 +122,9 @@ In the tutorial code:
});
```
-Observe how the window is created with a `null` parent and the initialization method is a lambda function which:
+Observe how the window is created as a child of `efl.App.GetLoopMain()`, the application's main loop. This ensures that the window will receive all messages coming from the application.
+
+Also, note the initialization method, a lambda function which:
* Sets the window title to `Hello World`.
* Sets the `autohide` flag to true. This means that the window will automatically be hidden when the user closes it. The default behavior for an app when all its windows are hidden is to quit.
@@ -182,4 +184,4 @@ The following tutorial adds some text and a button to the UI, and shows how to r
: Instructions for having EFL ready to work from C#.
[Tutorial Code Examples](https://git.enlightenment.org/tools/examples.git/tree/tutorial/csharp)
-: C# Source code for the tutorials. \ No newline at end of file
+: C# Source code for the tutorials.