summaryrefslogtreecommitdiff
path: root/pages/develop/tutorials
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-04-30 03:49:43 -0700
committerapache <apache@e5-web1.enlightenment.org>2018-04-30 03:49:43 -0700
commita86956cfa8e946ea58873b74c55f53943b27f121 (patch)
tree88c797754c9c2f483a0a2013265ad518389763bf /pages/develop/tutorials
parent0fe8bd499910050aaf4ab36599ca10a33d086f6f (diff)
Wiki page hello-world-gui.md changed with summary [Adapt to new efl_add / efl_add_ref API] by Xavi Artigas
Diffstat (limited to 'pages/develop/tutorials')
-rw-r--r--pages/develop/tutorials/c/hello-world-gui.md.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt
index 5b4620b31..44c79be7d 100644
--- a/pages/develop/tutorials/c/hello-world-gui.md.txt
+++ b/pages/develop/tutorials/c/hello-world-gui.md.txt
@@ -103,7 +103,7 @@ So far ``_gui_setup`` is empty. Create a window by adding the following lines wi
103[...] 103[...]
104 Eo *win; 104 Eo *win;
105 105
106 win = efl_add(EFL_UI_WIN_CLASS, NULL, 106 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
107 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 107 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
108 efl_text_set(efl_added, "Hello World"), 108 efl_text_set(efl_added, "Hello World"),
109 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 109 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@@ -112,7 +112,7 @@ So far ``_gui_setup`` is empty. Create a window by adding the following lines wi
112 112
113As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake. 113As far as EFL is concerned, a window is just another object. You can declare it with ``Eo *win;``. The ``Eo`` type is the base object system for EFL. Most graphical elements such as windows, text boxes, buttons, sliders, etc. are ``Eo`` objects. You can give your window any name you wish but for now call it ``win``for simplicity's sake.
114 114
115The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class specified in the first parameter and puts it inside the already existing object specified in the second parameter. In an EFL graphical application widgets are inserted inside other objects. For example, you can place a text object inside a text box inside a window and so on. In this case we want to create a window (``EFL_UI_WIN _CLASS``) and don't need to put it inside any other object, so we pass ``NULL`` as the second parameter. The ``EFL_UI_WIN_CLASS``parameter is actually a macro. 115The next part of the code defines the window itself. The ``efl_add()`` method creates a new object of the class specified in the first parameter and puts it inside the already existing object specified in the second parameter. In an EFL graphical application widgets are inserted inside other objects. For example, you can place a text object inside a text box inside a window and so on. In this case we want to create a window (``EFL_UI_WIN _CLASS``) which must be a child of the application's main loop, so it can receive application events (see the [Main Loop programming guide](/develop/guides/c/core/main-loop.md)). You can always retrieve the application's main loop using ``efl_main_loop_get()``.
116 116
117The rest of the parameters of ``efl_add()`` are a list of methods that will be called in order, normally to configure the object we have just created. You can add as many configuration methods as you want in this list and can use the special symbol ``efl_added`` to refer to the created object if you need to. 117The rest of the parameters of ``efl_add()`` are a list of methods that will be called in order, normally to configure the object we have just created. You can add as many configuration methods as you want in this list and can use the special symbol ``efl_added`` to refer to the created object if you need to.
118 118
@@ -134,7 +134,7 @@ _gui_setup()
134{ 134{
135 Eo *win; 135 Eo *win;
136 136
137 win = efl_add(EFL_UI_WIN_CLASS, NULL, 137 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
138 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 138 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
139 efl_text_set(efl_added, "Hello World"), 139 efl_text_set(efl_added, "Hello World"),
140 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 140 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@@ -221,7 +221,7 @@ _gui_setup()
221{ 221{
222 Eo *win, *box; 222 Eo *win, *box;
223 223
224 win = efl_add(EFL_UI_WIN_CLASS, NULL, 224 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
225 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 225 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
226 efl_text_set(efl_added, "Hello World"), 226 efl_text_set(efl_added, "Hello World"),
227 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 227 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@@ -370,7 +370,7 @@ _gui_setup()
370{ 370{
371 Eo *win, *box; 371 Eo *win, *box;
372 372
373 win = efl_add(EFL_UI_WIN_CLASS, NULL, 373 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
374 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 374 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
375 efl_text_set(efl_added, "Hello World"), 375 efl_text_set(efl_added, "Hello World"),
376 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 376 efl_ui_win_autodel_set(efl_added, EINA_TRUE));