summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-09-06 02:55:29 -0700
committerapache <apache@e5-web1.enlightenment.org>2018-09-06 02:55:29 -0700
commit7f622b191bf3e30a36b3acfab3799b7edd9c8e6b (patch)
tree6f5a026b6d499fff0a337ece8088c734a4d01c42 /pages
parent40b42c60d95e397a4ed40802e91f32cbacbd07c2 (diff)
Wiki page start.md changed with summary [Add link to Setup guide] by Xavi Artigas
Diffstat (limited to 'pages')
-rw-r--r--pages/develop/e/sandbox_gadgets.txt620
-rw-r--r--pages/develop/tutorials/csharp/start.md.txt8
2 files changed, 5 insertions, 623 deletions
diff --git a/pages/develop/e/sandbox_gadgets.txt b/pages/develop/e/sandbox_gadgets.txt
deleted file mode 100644
index d30a5005b..000000000
--- a/pages/develop/e/sandbox_gadgets.txt
+++ /dev/null
@@ -1,620 +0,0 @@
1---
2~~Title: Creating Enlightenment Gadgets~~
3---
4
5# Creating Enlightenment Gadgets #
6
7*Gadgets* are standalone applications that Enlightenment can use as extensions to its desktop. They are similar to modules in that they can be placed in containers, called *gadget sites*; they differ in that they are not internal to Enlightenment and do not run in the same process.
8
9This process separation occurs through Enlightenment placing gadgets into a sandbox. This sandbox is a gadget visual that manages the necessary gadget requirements, in place of the application handling this. Sandboxing is beneficial to the user desktop experience as it encourages the creation of gadgets through a much easier development path while also protecting the user desktop experience from being interrupted by faulty extensions.
10
11This guide demonstrates how to develop these gadgets.
12
13## Prerequisites ##
14
15* Install and configure Enlightenment and the EFL with Wayland support: [Get Enlightenment](docs/distros/start).
16* Create the Hello World program: [Get started with EFL](develop/efl/start).
17
18## Gadget Advantages and Limitations ##
19
20Creating gadgets directly, rather than as modules, reduces the need to call upon additional application programming interfaces (APIs). Gadgets are also more robust: as gadgets run in a separate process from Enlightenment they will not crash the desktop when encountering an error, instead gracefully recovering from their own crashes.
21
22There are, however, a few limitations for gadgets. It is not recommended to use forced sizes or size hints in the gadget application. The sandbox will manage sizing for the application; setting minimum or maximum sizes, resizing or moving objects will clash with how the sandbox is managing sizes. Simply setting the desired aspect for the application will tell the sandbox how it needs to prioritize the size of the application.
23
24Running additional applications from within the gadget application will also bring unintended results. The gadget lives in a sandbox and is bound by the size and space that the sandbox provides. If the gadget tries to open further windows or applications on its own these windows and applications will be restricted to the gadget visual. Fortunately, the sandbox provides smart callbacks than can be called to run external applications and also provides a method for opening further windows or popups within the gadget application.
25
26## Gadget Basics ##
27
28Enlightenment populates its list of gadgets by looking for ``.desktop`` files installed to the directory ``enlightenment/gadgets`` under Enlightenment's library directory, which can be found using ``pkg-config --variable=libdir enlightenment``. This gadget list is then made available for use through each gadget site's "Add Gadgets" popup. These popups display either a live view of the gadget or a still image.
29
30When Enlightenment executes the gadget application it sets the environment variable ``E_GADGET_ID``. This environmental variable is how the gadget application will determine if it is being run as a gadget, if it is being displayed in the "Add Gadget" popup or if it has been added to a gadget site and has a unique gadget ID.
31
32To demonstrate this, a modified version of the Hello World app referenced in the Prerequisites section of this guide is used. Note the following important change: in the original version the window is created using ``elm_win_util_standard_add()``, but in order to achieve transparency on the window for use as a gadget this is changed to ``elm_win_add()`` in this guide.
33
34In the ``elm_main()`` function the application can check for the ``E_GADGET_ID`` with the following code:
35
36```c
37EAPI_MAIN int
38elm_main(int argc, char **argv)
39{
40 Evas_Object *win, *btn;
41 int gadget =0, id_num = 0;
42 char buf[16];
43
44 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
45
46 if (getenv("E_GADGET_ID"))
47 {
48 gadget = 1;
49 snprintf(buf, sizeof(buf), "%s", getenv("E_GADGET_ID"));
50 id_num = atoi(buf);
51 }
52
53 win = elm_win_add(NULL, "Main", ELM_WIN_BASIC);
54 elm_win_title_set(win, "Hello, World!");
55 elm_win_autodel_set(win, EINA_TRUE);
56
57 if (gadget) elm_win_alpha_set(win, EINA_TRUE);
58
59 if (gadget && id_num == -1)
60 {
61 icon = elm_icon_add(win);
62 elm_icon_standard_set(icon, "start-here");
63 evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
64 evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
65 elm_win_resize_object_add(win, icon);
66 evas_object_show(icon);
67 }
68 else
69 {
70 btn = elm_button_add(win);
71 elm_object_text_set(btn, "Goodbye Cruel World");
72 elm_win_resize_object_add(win, btn);
73 evas_object_smart_callback_add(btn, "clicked", on_click, win);
74 evas_object_show(btn);
75 }
76 evas_object_show(win);
77
78 elm_run();
79
80 return 0;
81}
82```
83
84The variable ``gadget`` is used to determine if the application is running as a gadget or as a standalone application. The variable ``id_num`` is used to identify the ID of the gadget, if the application is indeed running as a gadget. If the application is running as a gadget, the window is set to alpha so that the background of the window does not show up. This is for aesthetics purposes so that gadgets on gadget sites don't all have a background.
85
86If the id of the gadget is ``-1`` the application is being run in the "Add Gadget" popup. In this case the application displays an icon. If the ID of the gadget is not ``-1`` the application is being run as a gadget in a gadget site and the ID will be unique to this gadget. This is important for complex gadgets where the application would like to save settings or configurations and have them loaded after restarts. This unique ID is how the application will identify which settings to load.
87
88## Gadget Events and Smart Callbacks ##
89
90Gadget applications will receive the following smart callbacks on their main window using ``evas_object_smart_callback_add(application_window, smart_callback_type, function, data)``:
91
92* ``gadget_action`` - There was an error with the gadget action.
93* ``gadget_action_deleted`` - The gadget action has been deleted.
94* ``gadget_action_end`` - The gadget action has ended.
95* ``gadget_configure`` - The configure menu item of the gadget has been clicked.
96* ``gadget_site_anchor`` - The position of the gadget has changed.
97* ``gadget_site_gravity`` - The gravity of the gadget has changed.
98* ``gadget_site_orient`` - The orientation of the gadget has changed.
99
100Gadget applications can call the following smart callbacks on their main window using ``evas_object_smart_callback_call(application_window, smart_callback_type, data)``:
101
102* ``gadget_action_request`` - This requests that the gadget sets up an action. The data on this call should be the action name.
103* ``gadget_open_uri`` - This requests the gadget to open an application that handles a uri. The data on this call should be the uri.
104
105You can call actions you set up via the ``evas_object_smart_callback_call(application_window, action, action_data)`` function.
106
107For the purpose of the Hello World gadget, a label detailing the anchor position and orientation of the gadget can be displayed using the following code:
108
109```c
110#include <Elementary.h>
111#include <e_gadget_types.h>
112
113static E_Gadget_Site_Orient gorient;
114static E_Gadget_Site_Anchor ganchor;
115
116static void
117update_anchor_orient(void *data, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor anchor)
118{
119 char buf[4096];
120 const char *s = "float";
121 Evas_Object *lbl = data;
122
123 if (anchor & E_GADGET_SITE_ANCHOR_LEFT)
124 {
125 if (anchor & E_GADGET_SITE_ANCHOR_TOP)
126 {
127 switch (orient)
128 {
129 case E_GADGET_SITE_ORIENT_HORIZONTAL:
130 s = "top_left";
131 break;
132 case E_GADGET_SITE_ORIENT_VERTICAL:
133 s = "left_top";
134 break;
135 case E_GADGET_SITE_ORIENT_NONE:
136 s = "left_top";
137 break;
138 }
139 }
140 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
141 {
142 switch (orient)
143 {
144 case E_GADGET_SITE_ORIENT_HORIZONTAL:
145 s = "bottom_left";
146 break;
147 case E_GADGET_SITE_ORIENT_VERTICAL:
148 s = "left_bottom";
149 break;
150 case E_GADGET_SITE_ORIENT_NONE:
151 s = "left_bottom";
152 break;
153 }
154 }
155 else
156 s = "left";
157 }
158 else if (anchor & E_GADGET_SITE_ANCHOR_RIGHT)
159 {
160 if (anchor & E_GADGET_SITE_ANCHOR_TOP)
161 {
162 switch (orient)
163 {
164 case E_GADGET_SITE_ORIENT_HORIZONTAL:
165 s = "top_right";
166 break;
167 case E_GADGET_SITE_ORIENT_VERTICAL:
168 s = "right_top";
169 break;
170 case E_GADGET_SITE_ORIENT_NONE:
171 s = "right_top";
172 break;
173 }
174 }
175 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
176 {
177 switch (orient)
178 {
179 case E_GADGET_SITE_ORIENT_HORIZONTAL:
180 s = "bottom_right";
181 break;
182 case E_GADGET_SITE_ORIENT_VERTICAL:
183 s = "right_bottom";
184 break;
185 case E_GADGET_SITE_ORIENT_NONE:
186 s = "right_bottom";
187 break;
188 }
189 }
190 else
191 s = "right";
192 }
193 else if (anchor & E_GADGET_SITE_ANCHOR_TOP)
194 s = "top";
195 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
196 s = "bottom";
197 else
198 {
199 switch (orient)
200 {
201 case E_GADGET_SITE_ORIENT_HORIZONTAL:
202 s = "horizontal";
203 break;
204 case E_GADGET_SITE_ORIENT_VERTICAL:
205 s = "vertical";
206 break;
207 default: break;
208 }
209 }
210 snprintf(buf, sizeof(buf), "e,state,orientation,%s", s);
211 elm_object_text_set(lbl, buf);
212}
213
214static void
215anchor_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
216{
217 ganchor = (uintptr_t)event_info;
218 update_anchor_orient(data, gorient, ganchor);
219}
220
221static void
222orient_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
223{
224 gorient = (uintptr_t)event_info;
225 update_anchor_orient(data, gorient, ganchor);
226}
227
228EAPI_MAIN int
229elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
230{
231 Evas_Object *win, *box, *lbl, *icon, *btn;
232 int gadget =0, id_num = 0;
233 char buf[16];
234
235 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
236
237 if (getenv("E_GADGET_ID"))
238 {
239 gadget = 1;
240 snprintf(buf, sizeof(buf), "%s", getenv("E_GADGET_ID"));
241 id_num = atoi(buf);
242 }
243
244 win = elm_win_add(NULL, "Main", ELM_WIN_BASIC);
245 elm_win_title_set(win, "Hello, World!");
246 elm_win_autodel_set(win, EINA_TRUE);
247
248 if (gadget) elm_win_alpha_set(win, EINA_TRUE);
249
250 box = elm_box_add(win);
251 elm_box_horizontal_set(box, EINA_FALSE);
252 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
253 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
254 elm_win_resize_object_add(win, box);
255 evas_object_show(box);
256
257 if (gadget && id_num == -1)
258 {
259 icon = elm_icon_add(box);
260 elm_icon_standard_set(icon, "start-here");
261 evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
262 evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
263 elm_box_pack_end(box, icon);
264 evas_object_show(icon);
265 }
266 else
267 {
268 lbl = elm_label_add(box);
269 evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
270 elm_box_pack_end(box, lbl);
271 evas_object_show(lbl);
272
273 btn = elm_button_add(box);
274 elm_object_text_set(btn, "Goodbye Cruel World");
275 elm_box_pack_end(box, btn);
276 evas_object_smart_callback_add(btn, "clicked", on_click, win);
277 evas_object_show(btn);
278 }
279 if (gadget && id_num > -1)
280 {
281 evas_object_smart_callback_add(win, "gadget_site_anchor", anchor_change, lbl);
282 evas_object_smart_callback_add(win, "gadget_site_orient", orient_change, lbl);
283 }
284 evas_object_show(win);
285
286 elm_run();
287
288 return 0;
289}
290ELM_MAIN()
291```
292
293Two smart callbacks are added if the application is in gadget mode, and a new ``#include`` was added for ``e_gadget_types.h``. This header gives the anchor and orientation enumerations that are needed to describe the position of the gadget. These enumerations consist of ``E_GADGET_SITE_ANCHOR_*`` and ``E_GADGET_SITE_ORIENT_*``. The anchor sites are ``TOP``, ``BOTTOM``, ``LEFT``, and ``RIGHT`` and describe the position on the screen edge where the gadget is to be located.
294
295The orientation of the site is ``HORIZONTAL``, ``VERTICAL`` or ``NONE`` and describe the layout of the gadget site. Since gadget sites can have multiple gadgets this is important for noting that gadgets are going to be stacked horizontally or vertically. The ``NONE`` orientation is used when the gadget site is the desktop, which doesn't have a defined orientation.
296
297## Displaying Popups and Additional Windows in Gadgets ##
298
299In the limitations section of this guide the problem with spawning popups and windows directly from the gadget were outlined. The sandbox, however, will take new windows that are spawned and show them as popups or ``ctxpopups`` based on the window type. If the window type is set to ``ELM_WIN_BASIC`` an ``elm_popup`` will be used. If the window type is set to ``ELM_WIN_POPUP_MENU`` a ``ctxpopup`` will be used. These windows will then be rendered outside of the gadget's visual.
300
301In the original Hello World application a callback exists to close the window when the button is clicked. Gadgets, however, are designed to be persistent and not close in that manner. For the purposes of this example, the callback is changed to create a popup.
302
303```c
304#include <Elementary.h>
305#include <e_gadget_types.h>
306
307static E_Gadget_Site_Orient gorient;
308static E_Gadget_Site_Anchor ganchor;
309static Evas_Object *popup;
310
311static void
312on_click(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
313{
314 Evas_Object *win = data, *box, *lbl;
315
316 if (popup)
317 {
318 evas_object_del(popup);
319 popup = NULL;
320 return;
321 }
322 popup = elm_win_add(win, "Popup", ELM_WIN_BASIC);
323 elm_win_alpha_set(popup, 1);
324
325 box = elm_box_add(popup);
326 elm_box_horizontal_set(box, EINA_FALSE);
327 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
328 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
329 elm_win_resize_object_add(popup, box);
330 evas_object_show(box);
331
332 lbl = elm_label_add(box);
333 elm_object_text_set(lbl, "Goodbye Cruel World!");
334 evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
335 elm_box_pack_end(box, lbl);
336 evas_object_show(lbl);
337
338 evas_object_show(popup);
339}
340
341static void
342update_anchor_orient(void *data, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor anchor)
343{
344 char buf[4096];
345 const char *s = "float";
346 Evas_Object *lbl = data;
347
348 if (anchor & E_GADGET_SITE_ANCHOR_LEFT)
349 {
350 if (anchor & E_GADGET_SITE_ANCHOR_TOP)
351 {
352 switch (orient)
353 {
354 case E_GADGET_SITE_ORIENT_HORIZONTAL:
355 s = "top_left";
356 break;
357 case E_GADGET_SITE_ORIENT_VERTICAL:
358 s = "left_top";
359 break;
360 case E_GADGET_SITE_ORIENT_NONE:
361 s = "left_top";
362 break;
363 }
364 }
365 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
366 {
367 switch (orient)
368 {
369 case E_GADGET_SITE_ORIENT_HORIZONTAL:
370 s = "bottom_left";
371 break;
372 case E_GADGET_SITE_ORIENT_VERTICAL:
373 s = "left_bottom";
374 break;
375 case E_GADGET_SITE_ORIENT_NONE:
376 s = "left_bottom";
377 break;
378 }
379 }
380 else
381 s = "left";
382 }
383 else if (anchor & E_GADGET_SITE_ANCHOR_RIGHT)
384 {
385 if (anchor & E_GADGET_SITE_ANCHOR_TOP)
386 {
387 switch (orient)
388 {
389 case E_GADGET_SITE_ORIENT_HORIZONTAL:
390 s = "top_right";
391 break;
392 case E_GADGET_SITE_ORIENT_VERTICAL:
393 s = "right_top";
394 break;
395 case E_GADGET_SITE_ORIENT_NONE:
396 s = "right_top";
397 break;
398 }
399 }
400 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
401 {
402 switch (orient)
403 {
404 case E_GADGET_SITE_ORIENT_HORIZONTAL:
405 s = "bottom_right";
406 break;
407 case E_GADGET_SITE_ORIENT_VERTICAL:
408 s = "right_bottom";
409 break;
410 case E_GADGET_SITE_ORIENT_NONE:
411 s = "right_bottom";
412 break;
413 } }
414 else
415 s = "right";
416 }
417 else if (anchor & E_GADGET_SITE_ANCHOR_TOP)
418 s = "top";
419 else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
420 s = "bottom";
421 else
422 {
423 switch (orient)
424 {
425 case E_GADGET_SITE_ORIENT_HORIZONTAL:
426 s = "horizontal";
427 break;
428 case E_GADGET_SITE_ORIENT_VERTICAL:
429 s = "vertical";
430 break;
431 default: break;
432 }
433 }
434 snprintf(buf, sizeof(buf), "e,state,orientation,%s", s);
435 elm_object_text_set(lbl, buf);
436}
437
438static void
439anchor_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
440{
441 ganchor = (uintptr_t)event_info;
442 update_anchor_orient(data, gorient, ganchor);
443}
444
445static void
446orient_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
447{
448 gorient = (uintptr_t)event_info;
449 update_anchor_orient(data, gorient, ganchor);
450}
451
452EAPI_MAIN int
453elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
454{
455 Evas_Object *win, *box, *lbl, *icon, *btn;
456 int gadget = 0, id_num = 0;
457 char buf[16];
458
459 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
460
461 if (getenv("E_GADGET_ID"))
462 {
463 gadget = 1;
464 snprintf(buf, sizeof(buf), "%s", getenv("E_GADGET_ID"));
465 id_num = atoi(buf);
466 }
467
468 win = elm_win_add(NULL, "Main", ELM_WIN_BASIC);
469 elm_win_title_set(win, "Hello, World!");
470 elm_win_autodel_set(win, EINA_TRUE);
471
472 if (gadget) elm_win_alpha_set(win, EINA_TRUE);
473
474 box = elm_box_add(win);
475 elm_box_horizontal_set(box, EINA_FALSE);
476 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
477 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
478 elm_win_resize_object_add(win, box);
479 evas_object_show(box);
480
481 if (gadget && id_num == -1)
482 {
483 icon = elm_icon_add(box);
484 elm_icon_standard_set(icon, "start-here");
485 evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
486 evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
487 elm_box_pack_end(box, icon);
488 evas_object_show(icon);
489 }
490 else
491 {
492 lbl = elm_label_add(box);
493 evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
494 elm_box_pack_end(box, lbl);
495 evas_object_show(lbl);
496
497 btn = elm_button_add(box);
498 elm_object_text_set(btn, "This is a popup");
499 elm_box_pack_end(box, btn);
500 evas_object_smart_callback_add(btn, "clicked", on_click, win);
501 evas_object_show(btn);
502 }
503 if (gadget && id_num > -1)
504 {
505 evas_object_smart_callback_add(win, "gadget_site_anchor", anchor_change, lbl);
506 evas_object_smart_callback_add(win, "gadget_site_orient", orient_change, lbl);
507 }
508 evas_object_show(win);
509
510 elm_run();
511
512 return 0;
513}
514ELM_MAIN()
515```
516
517The ``on_clicked`` function has been changed from the original Hello World application to show a popup that says "This is a popup". If the popup already exists, clicking the gadget closes the popup.
518
519## Installing Gadgets ##
520
521Create the following three files, all in the same directory:
522
523* meson.build
524* helloworld.desktop.in
525* helloworld.c
526
527"helloworld.c" must contain the example code provided earlier in this guide.
528
529Create "helloworld.desktop.in" with the following contents:
530
531```
532[Desktop Entry]
533Type=Application
534Name=helloworld
535Exec=@GADGET_DIR@/helloworld/e_gadget_helloworld
536Icon=start-here
537```
538
539Create "meson.build" with the following contents:
540
541```
542project('helloworld', 'c',
543 version: '1',
544 license: 'BSD 2 clause',
545 default_options: [ 'c_std=gnu99', 'warning_level=2' ],
546 meson_version: '>= 0.40.0')
547pkgconfig = import('pkgconfig')
548cc = meson.get_compiler('c')
549
550dep_e = dependency('enlightenment')
551deps = [
552 dep_e,
553 dependency('elementary')
554]
555release = dep_e.get_pkgconfig_variable('release')
556host_os = host_machine.system()
557if host_os == 'linux'
558 if cc.has_header_symbol('features.h', '__UCLIBC__')
559 host_os = 'linux-uclibc'
560 elif cc.has_header_symbol('features.h', '__dietlibc__')
561 host_os = 'linux-dietlibc'
562 else
563 host_os = 'linux-gnu'
564 endif
565endif
566module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
567dir_prefix = get_option('prefix')
568dir_lib = join_paths(dir_prefix, get_option('libdir'))
569dir_gadgets = join_paths([dir_lib, 'enlightenment/gadgets', module_arch])
570build_files = [
571 'helloworld.c'
572]
573executable('e_gadget_helloworld',
574 build_files,
575 dependencies: deps,
576 install_dir: join_paths([dir_gadgets, 'helloworld']),
577 install: true)
578
579desktop_data = configuration_data()
580 desktop_data.set('GADGET_DIR', dir_gadgets)
581configure_file(input: 'helloworld.desktop.in',
582 output: 'helloworld.desktop',
583 install: true,
584 install_dir: join_paths([dir_gadgets, 'helloworld']),
585 configuration: desktop_data)
586```
587
588This "meson.build" file determines the location Enlightenment will look for gadgets. This location is Enlightenment's library folder, followed by a sub directory string consisting of "gadgets/os-processor-enlightenmentversion". Once the location is determined, the meson file will install the "helloworld" binary and "helloworld.desktop" files to that location. Keep in mind when installing the ".desktop" file to Enlightenment's gadget directory that the file must have the same name as the directory to which it is being installed. In this case that is "helloworld/helloworld.desktop". Remember that the desktop is the crucial part of sandbox gadgets, as it is the means by which Enlightenment determines available gadgets. Enlightenment can only determine the location of gadgets by looking in its library directory.
589
590Run the following commands in order, from the directory where you placed the three files, to install the gadget:
591
592```bash
593meson build && cd build
594ninja
595sudo ninja install
596```
597
598## Conclusion ##
599The "helloworld" gadget is now installed and can be placed on a gadget site. To place it on a Bryce, hold the Alt key and right-click the Bryce then click "Gadgets". To place it on the desktop, left-click the desktop, click "Desktop" then click "Add Gadgets to Desktop".
600
601Remember that gadgets are standalone, so the "helloworld" gadget can be run as a standalone application simply by directly executing the installed binary.
602
603The essentials for Enlightenment gadgets are follows:
604
605* Enlightenment sets an environment variable with a unique ID for gadgets.
606* Enlightenment determines available gadgets based on identified ".desktop" files in the Enlightenment gadget folder.
607* Gadget communication with the application is two-way and occurs through the use of smart callbacks.
608
609## Further Reading ##
610[Ephoto](http://git.enlightenment.org/apps/ephoto)
611: Ephoto, an application used as both a standalone app and a gadget.
612
613[Wireless Gadget](http://git.enlightenment.org/enlightenment/gadgets/wireless)
614: Source code for the Enlightenment Wireless Gadget.
615
616[Meson](http://mesonbuild.com/Reference-manual.html)
617: Meson documentation.
618
619[FDO Desktop Entry](https://standards.freedesktop.org/desktop-entry-spec/latest/)
620: Documentation for the ".desktop" file specification. \ No newline at end of file
diff --git a/pages/develop/tutorials/csharp/start.md.txt b/pages/develop/tutorials/csharp/start.md.txt
index 34aad1c59..e7470fb4e 100644
--- a/pages/develop/tutorials/csharp/start.md.txt
+++ b/pages/develop/tutorials/csharp/start.md.txt
@@ -7,12 +7,14 @@
7 7
8The following tutorials are designed to build on each other, introducing concepts in a logical manner and working towards full understanding of EFL's capabilities. Most users should approach them in the order in which they are presented; only those with previous EFL experience should skip ahead. 8The following tutorials are designed to build on each other, introducing concepts in a logical manner and working towards full understanding of EFL's capabilities. Most users should approach them in the order in which they are presented; only those with previous EFL experience should skip ahead.
9 9
10> **NOTE:**
11> The tutorials in this section use the latest beta release of the API, as noted in [Developing with the Enlightenment Foundation Libraries](/develop/start.md#Current_vs._Beta). Versions of these tutorials written for the current release can be found in the [Legacy section of the website](https://www.enlightenment.org/develop/legacy/tutorial/start).
12
13| | WARNING | | 10| | WARNING | |
14| --- | ------- | --- | 11| --- | ------- | --- |
15| ![NOTE](/_media/note-important.png) | **The C# bindings are currently in BETA state**<br>They should only be used for experimenting and **NOT** for any product development.<br>The source code for the tutorials is subject to change in the future. | ![NOTE](/_media/note-important.png) | 12| ![NOTE](/_media/note-important.png) | **The C# bindings are currently in BETA state**<br>They should only be used for experimenting and **NOT** for any product development.<br>The source code for the tutorials is subject to change in the future. | ![NOTE](/_media/note-important.png) |
16 13
14> **NOTE:**
15> The tutorials in this section use the latest beta release of the API, as noted in [Developing with the Enlightenment Foundation Libraries](/develop/start.md#Current_vs._Beta). Versions of these tutorials written for the current release can be found in the [Legacy section of the website](https://www.enlightenment.org/develop/legacy/tutorial/start).
16
17If you haven't done so yet, read the [Setting Up a C# Development Environment](/develop/setup/csharp/) guide so you have a working EFL installation with C# support.
18
17* [Hello World](hello-world-cs.md) 19* [Hello World](hello-world-cs.md)
18* [Graphical Hello World](hello-world-gui-cs.md) 20* [Graphical Hello World](hello-world-gui-cs.md)