summaryrefslogtreecommitdiff
path: root/pages/develop/tutorials
diff options
context:
space:
mode:
authorGareth Halfacree <freelance@halfacree.co.uk>2018-01-04 07:38:37 -0800
committerapache <apache@e5-web1.enlightenment.org>2018-01-04 07:38:37 -0800
commit53e883a836f4178357d5ea9e6dfa7165de3deeed (patch)
tree8939802ea8a1613f36bcfee3315f3a8563236e37 /pages/develop/tutorials
parent1457dfbbf705b3aedbd0138661ff77f6ab4e01de (diff)
Wiki page hello-world-gui.md changed with summary [] by Gareth Halfacree
Diffstat (limited to 'pages/develop/tutorials')
-rw-r--r--pages/develop/tutorials/c/hello-world-gui.md.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/pages/develop/tutorials/c/hello-world-gui.md.txt b/pages/develop/tutorials/c/hello-world-gui.md.txt
index da8aadfdd..59bcbd577 100644
--- a/pages/develop/tutorials/c/hello-world-gui.md.txt
+++ b/pages/develop/tutorials/c/hello-world-gui.md.txt
@@ -70,7 +70,7 @@ Instead of printing to the command line, this time your message will be displaye
70 70
71Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions. 71Technically you could put all the code for opening the window, text boxes, buttons and so on into the main function which previously contained the lines you just deleted but that's messy. In general it's much better and cleaner to use the main function to call other functions.
72 72
73Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the mani EFL loop. Your program should look like this: 73Create a function to set up your window and name it ``_gui_setup()``. Insert a call to the function from within the main EFL loop. Your program should look like this:
74 74
75```c 75```c
76#define EFL_EO_API_SUPPORT 1 76#define EFL_EO_API_SUPPORT 1
@@ -112,11 +112,11 @@ 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. [You can learn more about these macros and see a list of useful macros here](macros.md). 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.
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
119The ``efl_ui_win_type_set()`` function does what it says on the box. There are several types of window types (basic, dialog, popup menus, etc.) : here we want the most basic type. You can see the other types of windows you can choose by [visiting the list of macros](macros.md). The ``efl_text_set()`` function sets the text of the window's title bar, in this case, to "Hello World". The ``efl_ui_win_autodel_set()`` procedure tells the program to automatically make the window disappear if it's closed. You can look up the exact meaning of these calls in the [API Reference Guide](link to /devel/auto). 119The ``efl_ui_win_type_set()`` function does what it says on the box. There are several types of window types (basic, dialog, popup menus, etc.) : here we want the most basic type. The ``efl_text_set()`` function sets the text of the window's title bar, in this case, to "Hello World". The ``efl_ui_win_autodel_set()`` procedure tells the program to automatically make the window disappear if it's closed. You can look up the exact meaning of these calls in the [API Reference Guide](link to /devel/auto).
120 120
121Your program will now look like this: 121Your program will now look like this:
122 122