entry: fix memory leak issue for atspi
[platform/upstream/elementary.git] / doc / examples.dox
1 /**
2  * @page Examples Examples
3  *
4  * Here is a list of all Elementary examples.
5  *
6  * @ref bg_01_example_page
7  *
8  * @ref bg_02_example_page
9  *
10  * @ref bg_03_example_page
11  *
12  * @ref actionslider_example_page
13  *
14  * @ref transit_example_01_explained
15  *
16  * @ref transit_example_02_explained
17  *
18  * @ref general_functions_example_page
19  *
20  * @ref calendar_example_01
21  *
22  * @ref calendar_example_02
23  *
24  * @ref calendar_example_03
25  *
26  * @ref calendar_example_04
27  *
28  * @ref calendar_example_05
29  *
30  * @ref calendar_example_06
31  *
32  * @ref spinner_example
33  *
34  * @ref slider_example
35  *
36  * @ref panes_example
37  *
38  * @ref clock_example
39  *
40  * @ref datetime_example
41  *
42  * @ref dayselector_example
43  *
44  * @ref mapbuf_example
45  *
46  * @ref map_example_01
47  *
48  * @ref map_example_02
49  *
50  * @ref map_example_03
51  *
52  * @ref diskselector_example_01
53  *
54  * @ref diskselector_example_02
55  *
56  * @ref entry_example
57  *
58  * @ref list_example_01
59  *
60  * @ref list_example_02
61  *
62  * @ref list_example_03
63  *
64  * @ref toolbar_example_01
65  *
66  * @ref toolbar_example_02
67  *
68  * @ref toolbar_example_03
69  *
70  * @ref segment_control_example
71  *
72  * @ref flipselector_example
73  *
74  * @ref fileselector_example
75  *
76  * @ref fileselector_button_example
77  *
78  * @ref fileselector_entry_example
79  *
80  * @ref index_example_01
81  *
82  * @ref index_example_02
83  *
84  * @ref gengrid_example
85  *
86  * @ref genlist_example_01
87  *
88  * @ref genlist_example_02
89  *
90  * @ref genlist_example_03
91  *
92  * @ref genlist_example_04
93  *
94  * @ref genlist_example_05
95  *
96  * @ref glview_example_01_page
97  *
98  * @ref thumb_example_01
99  *
100  * @ref progressbar_example
101  *
102  * @ref slideshow_example
103  *
104  * @ref efl_thread_1
105  *
106  * @ref efl_thread_2
107  *
108  * @ref efl_thread_3
109  *
110  * @ref efl_thread_4
111  *
112  * @ref efl_thread_5
113  *
114  * @ref efl_thread_6
115  *
116  * @ref prefs_example_01
117  *
118  * @ref prefs_example_02
119  *
120  * @ref prefs_example_03
121  */
122
123 /**
124  * @page bg_01_example_page elm_bg - Plain color background.
125  * @dontinclude bg_example_01.c
126  *
127  * The full code for this example can be found at @ref bg_example_01_c,
128  * in the function @c test_bg_plain. It's part of the @c elementary_test
129  * suite, and thus has the code for the three examples referenced by this
130  * documentation.
131  *
132  * This first example just sets a default background with a plain color. The
133  * first part consists of creating an Elementary window. It's the common
134  * piece of code that you'll see everywhere in Elementary: @skip elm_main
135  * @until autodel_set
136  *
137  * Now we really create our background object, using the window object as
138  * its parent:
139  *
140  * @skipline bg_add
141  *
142  * Then we set the size hints of the background object so that it will use
143  * all space available for it, and then add it as a resize object to the
144  * window, making it visible in the end:
145  *
146  * @skip size_hint_weight_set
147  * @until resize_object_add
148  *
149  * See evas_object_size_hint_weight_set() and elm_win_resize_object_add()
150  * for more detailed info about these functions.
151  *
152  * The end of the example is quite simple, just setting the minimum and
153  * maximum size of the background, so the Elementary window knows that it
154  * has to have at least the minimum size. The background also won't scale to
155  * a size above its maximum. Then we resize the window and show it in the
156  * end:
157  *
158  * @skip set size hints
159  * @until }
160  *
161  * And here we finish our very simple background object usage example.
162  */
163
164 /**
165  * @page bg_02_example_page elm_bg - Image background.
166  * @dontinclude bg_example_02.c
167  *
168  * The full code for this example can be found at @ref bg_example_02_c,
169  * in the function @c test_bg_image. It's part of the @c elementary_test
170  * suite, and thus has the code for the three examples referenced by this
171  * documentation.
172  *
173  * This is the second example, and shows how to use the Elementary
174  * background object to set an image as background of your application.
175  *
176  * We start this example exactly in the same way as the previous one, even
177  * when creating the background object:
178  *
179  * @skip elm_main
180  * @until bg_add
181  *
182  * Now it's the different part.
183  *
184  * Our background will have an image, that will be displayed over the
185  * background color. Before loading the image, we set the load size of the
186  * image. The load size is a hint about the size that we want the image
187  * displayed in the screen. It's not the exact size that the image will have,
188  * but usually a bit bigger. The background object can still be scaled to a
189  * size bigger than the one set here. Setting the image load size to
190  * something smaller than its real size will reduce the memory used to keep
191  * the pixmap representation of the image, and the time to load it. Here we
192  * set the load size to 20x20 pixels, but the image is loaded with a size
193  * bigger than that (since it's just a hint):
194  *
195  * @skipline load_size_set
196  *
197  * And set our background image to be centered, instead of stretched or
198  * scaled, so the effect of the elm_bg_load_size_set() can be easily
199  * understood:
200  *
201  * @skipline option_set
202  *
203  * We need a filename to set, so we get one from the previous installed
204  * images in the @c PACKAGE_DATA_DIR, and write its full path to a buffer.
205  * Then we use this buffer to set the filename in the background object:
206  *
207  * @skip snprintf
208  * @until bg_file_set
209  *
210  * Notice that the third argument of the elm_bg_file_set() function is @c
211  * NULL, since we are setting an image to this background. This function
212  * also supports setting an edje group as background, in which case the @c
213  * group parameter wouldn't be @c NULL, but be the name of the group
214  * instead.
215  *
216  * Finally, we can set the size hints, add the background as a resize
217  * object, and resize the window, exactly the same thing we do in the @ref
218  * bg_01_example_page example:
219  *
220  * @skip size_hint
221  * @until }
222  *
223  * And this is the end of this example.
224  *
225  * This example will look like this:
226  *
227  * @image html screenshots/bg_01.png
228  * @image latex screenshots/bg_01.eps width=\textwidth
229  */
230
231 /**
232  * @page bg_03_example_page elm_bg - Background properties.
233  * @dontinclude bg_example_03.c
234  *
235  * The full code for this example can be found at @ref bg_example_03_c, in the
236  * function @c test_bg_options, with the callbacks @c _cb_overlay_changed, @c
237  * _cb_color_changed and @c _cb_radio_changed defined in the beginning of the
238  * file. It's part of the @c elementary_test suite, and thus has the code for
239  * the three examples referenced by this documentation.
240  *
241  * This example will show the properties available for the background object,
242  * and will use of some more widgets to set them.
243  *
244  * In order to do this, we will set some callbacks for these widgets. The
245  * first is for the radio buttons that will be used to choose the option
246  * passed as argument to elm_bg_option_set():
247  *
248  * @skip _cb_radio_changed
249  * @until }
250  *
251  * The next callback will be used when setting the overlay (using
252  * elm_object_content_set()):
253  *
254  * @skip _cb_overlay_changed
255  * @until }
256  * @until }
257  *
258  * And the last one, used to set the color (with elm_bg_color_set()):
259  *
260  * @skip _cb_color_changed
261  * @until }
262  *
263  * We will get back to what these functions do soon. If you want to know more
264  * about how to set these callbacks and what these widgets are, look for:
265  * @li elm_radio_add()
266  * @li elm_check_add()
267  * @li elm_spinner_add()
268  *
269  * Now going to the main function, @c test_bg_options, we have the common
270  * code with the other examples:
271  *
272  * @skip bg-options
273  * @until autodel_set
274  *
275  * We add a plain background to this window, so it will have the default
276  * background color behind everything:
277  *
278  * @skip bg = elm_bg_add
279  * @until evas_object_show(bg)
280  *
281  * Then we add a vertical box (elm_box_add()) that will hold the background
282  * object that we are going to play with, as well as a horizontal box that
283  * will hold widgets:
284  *
285  * @skip elm_box_add
286  * @until evas_object_show
287  *
288  * Now we add the background object that is going to be of use for our
289  * example. It is an image background, as used in @ref bg_02_example_page ,
290  * so the code should be familiar:
291  *
292  * @skip elm_bg_add
293  * @until evas_object_show
294  *
295  * Notice the call to elm_box_pack_end(): it will pack the background object
296  * in the end of the Elementary box declared above. Just refer to that
297  * documentation for more info.
298  *
299  * Since this Elementary background is already an image background, we are
300  * going to play with its other properties. We will change its option
301  * (CENTER, SCALE, STRETCH, TILE), its color (RGB), and add an overlay to it.
302  * For all of these properties, we are going to add widgets that will
303  * configure them.
304  *
305  * First, lets add the horizontal box that will hold these widgets:
306  * @skip hbox
307  * @until align_set
308  *
309  * For now, just consider this @c hbox as a rectangle that will contain the
310  * widgets, and will distribute them horizontally inside its content. Then we
311  * add radio buttons that will allow us to choose the property to use with
312  * this background:
313  *
314  * @skip radio_add
315  * @until evas_object_show
316  *
317  * Again, I won't give details about the use of these widgets, just look for
318  * their documentation if necessary. It's enough to know for now that we are
319  * packing them in the @c hbox, setting a label for them, and the most
320  * important parts: setting its value to @c ELM_BG_OPTION_CENTER and its
321  * callback to @c _cb_radio_changed (the function defined in the beginning of
322  * this example). We do this for the next 3 radio buttons added after this
323  * one, each of them with a different value.
324  *
325  * Now taking a look at the code of the callback @c _cb_radio_changed again,
326  * it will call elm_bg_option_set() with the value set from the checked radio
327  * button, thus setting the option for this background. The background is
328  * passed as argument to the @p data parameter of this callback, and is
329  * referenced here as @c o_bg.
330  *
331  * Later we set the default value for this radio button:
332  *
333  * @skipline elm_radio_value_set
334  *
335  * Then we add a checkbox for the elm_object_content_set() function for the bg:
336  *
337  * @skip check_add
338  * @until evas_object_show
339  *
340  * Now look at the code of the @c _cb_overlay_changed again. If the checkbox
341  * state is checked, an overlay will be added to the background. It's done by
342  * creating an Edje object, and setting it with elm_object_content_set() to the
343  * background object. For information about what are and how to set Edje
344  * object, look at the Edje documentation.
345  *
346  * Finally we add a spinner object (elm_spinner_add()) to be used to select
347  * the color of our background. In its callback it's possible to see the call
348  * to elm_bg_color_set(), which will change the color of this background.
349  * This color is used by the background to fill areas where the image doesn't
350  * cover (in this case, where we have an image background). The spinner is
351  * also packed into the @c hbox :
352  *
353  * @skip elm_spinner_add
354  * @until evas_object_show
355  *
356  * Then we just have to pack the @c hbox inside the @c box, set some size
357  * hints, and show our window:
358  *
359  * @skip pack_end
360  * @until }
361  *
362  * Now to see this code in action, open elementary_test, and go to the "Bg
363  * Options" test. It should demonstrate what was implemented here.
364  */
365
366 /**
367  * @page actionslider_example_page Actionslider usage
368  * @dontinclude actionslider_example_01.c
369  *
370  * For this example we are going to assume knowledge of evas smart callbacks
371  * and some basic evas object functions. Elementary is not meant to be used
372  * without evas, if you're not yet familiar with evas it probably is worth
373  * checking that out.
374  *
375  * And now to the example, when using Elementary we start by including
376  * Elementary.h:
377  * @skipline #include
378  *
379  * Next we define some callbacks, they all share the same signature because
380  * they are all to be used with evas_object_smart_callback_add().
381  * The first one just prints the selected label(in two different ways):
382  * @until }
383  *
384  * This next callback is a little more interesting, it makes the selected
385  * label magnetic(except if it's the center label):
386  * @until }
387  *
388  * This callback enables or disables the magnetic property of the center
389  * label:
390  * @until }
391  *
392  * And finally a callback to stop the main loop when the window is closed:
393  * @until }
394  *
395  * To be able to create our actionsliders we need to do some setup, but this
396  * isn't really relevant here, so if you want to know about that go @ref
397  * Win "here".
398  *
399  * With all that boring stuff out of the way we can proceed to creating some
400  * actionsliders.@n
401  * All actionsliders are created the same way:
402  * @skipline actionslider_add
403  * Next we must choose where the indicator starts, and for this one we choose
404  * the right, and set the right as magnetic:
405  * @skipline indicator_pos_set
406  * @until magnet_pos_set
407  *
408  * We then set the labels for the left and right, passing NULL as an argument
409  * to any of the labels makes that position have no label.
410  * @until Stop
411  *
412  * Furthermore we mark both left and right as enabled positions, if we didn't
413  * do this all three positions would be enabled:
414  * @until RIGHT
415  *
416  * Having the enabled positions we now add a smart callback to change
417  * which position is magnetic, so that only the last selected position is
418  * magnetic:
419  * @until NULL
420  *
421  * And finally we set our printing callback and show the actionslider:
422  * @until object_show
423  * @skip pack_end
424  *
425  * For our next actionslider we are going to do much as we did for the
426  * previous except we are going to have the center as the magnet(and not
427  * change it):
428  * @skipline actionslider_add
429  * @skipline indicator_pos_set
430  * @until object_show
431  *
432  * And another actionslider, in this one the indicator starts on the left.
433  * It has labels only in the center and right, and both positions are
434  * magnetic. Because the left doesn't have a label and is not magnetic once
435  * the indicator leaves it can't return:
436  * @skipline actionslider_add
437  * @skipline indicator_pos_set
438  * @until object_show
439  * @note The greyed out area is a @ref Styles "style".
440  *
441  * And now an actionslider with a label in the indicator, and whose magnet
442  * properties change based on what was last selected:
443  * @skipline actionslider_add
444  * @skipline indicator_pos_set
445  * @until object_show
446  * @note The greyed out area is a @ref Styles "style".
447  *
448  * We are almost done, this next one is just an actionslider with all
449  * positions magnetized and having every possible label:
450  * @skipline actionslider_add
451  * @skipline indicator_pos_set
452  * @until object_show
453  *
454  * And for our last actionslider we have one that turns the magnetic property
455  * on and off:
456  * @skipline actionslider_add
457  * @skipline indicator_pos_set
458  * @until object_show
459  *
460  * The example will look like this:
461  *
462  * @image html screenshots/actionslider_01.png
463  * @image latex screenshots/actionslider_01.eps width=\textwidth
464  *
465  * See the full source code @ref actionslider_example_01 "here"
466  */
467
468 /**
469  * @page transit_example_03_c elm_transit - Combined effects and options.
470  *
471  * This example shows how to apply the following transition effects:
472  * @li translation
473  * @li color
474  * @li rotation
475  * @li wipe
476  * @li zoom
477  * @li resizing
478  *
479  * It allows you to apply more than one effect at once, and also allows to
480  * set properties like event_enabled, auto_reverse, repeat_times and
481  * tween_mode.
482  *
483  * @include transit_example_03.c
484  * @example transit_example_03.c
485  */
486
487 /**
488  * @page transit_example_04_c elm_transit - Combined effects over two objects.
489  *
490  * This example shows how to apply the transition effects:
491  * @li flip
492  * @li resizable_flip
493  * @li fade
494  * @li blend
495  * over two objects. This kind of transition effect is used to make one
496  * object disappear and another one appear on its place.
497  *
498  * You can mix more than one effect of this type on the same objects, and the
499  * transition will apply both.
500  *
501  * @include transit_example_04.c
502  * @example transit_example_04.c
503  */
504
505 /**
506  * @page transit_example_01_explained elm_transit - Basic transit usage.
507  * @dontinclude transit_example_01.c
508  *
509  * The full code for this example can be found at @ref transit_example_01_c.
510  *
511  * This example shows the simplest way of creating a transition and applying
512  * it to an object. Similarly to every other elementary example, we create a
513  * window, set its title, size, autodel property, and setup a callback to
514  * exit the program when finished:
515  *
516  * @skip on_done
517  * @until evas_object_resize
518  *
519  * We also add a resizable white background to use behind our animation:
520  *
521  * @skip bg_add
522  * @until evas_object_show
523  *
524  * And then we add a button that we will use to demonstrate the effects of
525  * our animation:
526  *
527  * @skip button_add
528  * @until evas_object_show(win)
529  *
530  * Notice that we are not adding the button with elm_win_resize_object_add()
531  * because we don't want the window to control the size of the button. We
532  * will use the transition to change the button size, so it could conflict
533  * with something else trying to control that size.
534  *
535  * Now, the simplest code possible to create the resize animation:
536  *
537  * @skip transit_add
538  * @until transit_go
539  *
540  * As you can see, this code is very easy to understand. First, we create the
541  * transition itself with elm_transit_add(). Then we add the button to this
542  * transition with elm_transit_object_add(), which means that the transition
543  * will operate over this button. The effect that we want now is changing the
544  * object size from 100x50 to 300x150, and can be achieved by adding the
545  * resize effect with elm_transit_effect_resizing_add().
546  *
547  * Finally, we set the transition time to 5 seconds and start the transition
548  * with elm_transit_go(). If we wanted more effects applied to this
549  * button, we could add them to the same transition. See the
550  * @ref transit_example_03_c to watch many transitions being applied to an
551  * object.
552  */
553
554 /**
555  * @page transit_example_02_explained elm_transit - Chained transitions.
556  * @dontinclude transit_example_02.c
557  *
558  * The full code for this example can be found at @ref transit_example_02_c.
559  *
560  * This example shows how to implement a chain of transitions. This chain is
561  * used to start a transition just after another transition ended. Similarly
562  * to every other elementary example, we create a window, set its title,
563  * size, autodel property, and setup a callback to exit the program when
564  * finished:
565  *
566  * @skip on_done
567  * @until evas_object_resize
568  *
569  * We also add a resizable white background to use behind our animation:
570  *
571  * @skip bg_add
572  * @until evas_object_show
573  *
574  * This example will have a chain of 4 transitions, each of them applied to
575  * one button. Thus we create 4 different buttons:
576  *
577  * @skip button_add
578  * @until evas_object_show(bt4)
579  *
580  * Now we create a simple translation transition that will be started as soon
581  * as the program loads. It will be our first transition, and the other
582  * transitions will be started just after this transition ends:
583  *
584  * @skip transit_add
585  * @until transit_go
586  *
587  * The code displayed until now has nothing different from what you have
588  * already seen in @ref transit_example_01_explained, but now comes the new
589  * part: instead of creating a second transition that will start later using
590  * a timer, we create the it normally, and use
591  * elm_transit_chain_transit_add() instead of elm_transit_go. Since we are
592  * adding it in a chain after the first transition, it will start as soon as
593  * the first transition ends:
594  *
595  * @skip transit_add
596  * @until transit_chain_transit_add
597  *
598  * Finally we add the 2 other transitions to the chain, and run our program.
599  * It will make one transition start after the other finish, and there is the
600  * transition chain.
601  */
602
603 /**
604  * @page general_functions_example_page General (top-level) functions example
605  * @dontinclude general_funcs_example.c
606  *
607  * As told in their documentation blocks, the
608  * elm_app_compile_*_dir_set() family of functions have to be called
609  * before elm_app_info_set():
610  * @skip tell elm about
611  * @until elm_app_info_set
612  *
613  * We are here setting the fallback paths to the compiling time target
614  * paths, naturally. If you're building the example out of the
615  * project's build system, we're assuming they are the canonical ones.
616  *
617  * After the program starts, elm_app_info_set() will actually run and
618  * then you'll see an intrincasy: Elementary does the prefix lookup @b
619  * twice. This is so because of the quicklaunch infrastructure in
620  * Elementary (@ref Start), which will register a predefined prefix
621  * for possible users of the launch schema. We're not hooking into a
622  * quick launch, so this first call can't be avoided.
623  *
624  * If you ran this example from your "bindir" installation
625  * directory, no output will emerge from these both attempts -- it
626  * will find the "magic" file there registered and set the prefixes
627  * silently. Otherwise, you could get something like:
628  @verbatim
629  WARNING: Could not determine its installed prefix for 'ELM'
630        so am falling back on the compiled in default:
631          usr
632        implied by the following:
633          bindir    = usr/lib
634          libdir    = usr/lib
635          datadir   = usr/share/elementary
636          localedir = usr/share/locale
637        Try setting the following environment variables:
638          ELM_PREFIX     - points to the base prefix of install
639        or the next 4 variables
640          ELM_BIN_DIR    - provide a specific binary directory
641          ELM_LIB_DIR    - provide a specific library directory
642          ELM_DATA_DIR   - provide a specific data directory
643          ELM_LOCALE_DIR - provide a specific locale directory
644  @endverbatim
645  * if you also didn't change those environment variables (remember
646  * they are also a valid way of communicating your prefix to the
647  * binary) - this is the scenario where it fallbacks to the paths set
648  * for compile time.
649  *
650  * Then, you can check the prefixes set on the standard output:
651  * @skip prefix was set to
652  * @until locale directory is
653  *
654  * In the fragment
655  * @skip by using this policy
656  * @until elm_win_autodel_set
657  * we demonstrate the use of Elementary policies. The policy defining
658  * under which circumstances our application should quit automatically
659  * is set to when its last window is closed (this one has just one
660  * window, though). This will save us from having to set a callback
661  * ourselves on the window, like done in @ref bg_example_01_c "this"
662  * example. Note that we need to tell the window to delete itself's
663  * object on a request to destroy the canvas coming, with
664  * elm_win_autodel_set().
665  *
666  * What follows is some boilerplate code, creating a frame with a @b
667  * button, our object of interest, and, below, widgets to change the
668  * button's behavior and exemplify the group of functions in question.
669  *
670  * @dontinclude general_funcs_example.c
671  * We enabled the focus highlight object for this window, so that you
672  * can keep track of the current focused object better:
673  * @skip elm_win_focus_highlight_enabled_set
674  * @until evas_object_show
675  * Use the tab key to navigate through the focus chain.
676  *
677  * @dontinclude general_funcs_example.c
678  * While creating the button, we exemplify how to use Elementary's
679  * finger size information to scale our UI:
680  * @skip fprintf(stdout, "Elementary
681  * @until evas_object_show
682  *
683  * @dontinclude general_funcs_example.c
684  * The first checkbox's callback is:
685  * @skip static void
686  * @until }
687  * When unsetting the checkbox, we disable the button, which will get a new
688  * decoration (greyed out) and stop receiving events. The focus chain
689  * will also ignore it.
690  *
691  * Following, there are 2 more buttons whose actions are focus/unfocus
692  * the top button, respectively:
693  * @skip focus callback
694  * @until }
695  * and
696  * @skip unfocus callback
697  * @until }
698  * Note the situations in which they won't take effect:
699  * - the button is not allowed to get focus or
700  * - the button is disabled
701  *
702  * The first restriction above you'll get by a second checkbox, whose
703  * callback is:
704  * @skip focus allow callback
705  * @until }
706  * Note that the button will still get mouse events, though.
707  *
708  * Next, there's a slider controlling the button's scale:
709  * @skip scaling callback
710  * @until }
711  *
712  * Experiment with it, so you understand the effect better. If you
713  * change its value, it will mess with the button's original size,
714  * naturally.
715  *
716  * The full code for this example can be found
717  * @ref general_functions_example_c "here".
718  */
719
720 /**
721  * @page theme_example_01 Theme - Using extensions
722  *
723  * @dontinclude theme_example_01.c
724  *
725  * Using extensions is extremely easy, discarding the part where you have to
726  * write the theme for them.
727  *
728  * In the following example we'll be creating two buttons, one to load or
729  * unload our extension theme and one to cycle around three possible styles,
730  * one of which we created.
731  *
732  * After including our one and only header we'll jump to the callback for
733  * the buttons. First one takes care of loading or unloading our extension
734  * file, relative to the default theme set (thus the @c NULL in the
735  * functions first parameter).
736  * @skipline Elementary.h
737  * @skip static void
738  * @until }
739  * @until }
740  * @until }
741  *
742  * The second button, as we said before, will just switch around different
743  * styles. In this case we have three of them. The first one is our custom
744  * style, named after something very unlikely to find in the default theme.
745  * The other two styles are the standard and one more, anchor, which exists
746  * in the default and is similar to the default, except the button vanishes
747  * when the mouse is not over it.
748  * @skip static void
749  * @until }
750  * @until }
751  *
752  * So what happens if the style switches to our custom one when the
753  * extension is loaded? Elementary falls back to the default for the
754  * widget.
755  *
756  * And the main function, simply enough, will create the window, set the
757  * buttons and their callbacks, and just to begin with our button styled
758  * we're also loading our extension at the beginning.
759  * @skip int
760  * @until ELM_MAIN
761  *
762  * In this case we wanted to easily remove extensions, but all adding an
763  * extension does is tell Elementary where else it should look for themes
764  * when it can't find them in the default theme. Another way to do this
765  * is to set the theme search order using elm_theme_set(), but this requires
766  * that the developer is careful not to override any user configuration.
767  * That can be helped by adding our theme to the end of whatever is already
768  * set, like in the following snippet.
769  * @code
770  * char buf[4096];
771  * snprintf(buf, sizeof(buf), "%s:./theme_example.edj", elme_theme_get(NULL);
772  * elm_theme_set(NULL, buf);
773  * @endcode
774  *
775  * If we were using overlays instead of extensions, the same thing applies,
776  * but the custom theme must be added to the front of the search path.
777  *
778  * In the end, we should be looking at something like this:
779  *
780  * @image html screenshots/theme_example_01.png
781  * @image latex screenshots/theme_example_01.eps width=\textwidth
782  *
783  * That's all. Boringly simple, and the full code in one piece can be found
784  * @ref theme_example_01.c "here".
785  *
786  * And the code for our extension is @ref theme_example.edc "here".
787  *
788  * @example theme_example_01.c
789  * @example theme_example.edc
790  */
791
792 /**
793  * @page theme_example_02 Theme - Using overlays
794  *
795  * @dontinclude theme_example_02.c
796  *
797  * Overlays are like extensions in that you tell Elementary that some other
798  * theme contains the styles you need for your program. The difference is that
799  * they will be look in first, so they can override the default style of any
800  * widget.
801  *
802  * There's not much to say about them that hasn't been said in our previous
803  * example about @ref theme_example_01 "extensions", so going quickly through
804  * the code we have a function to load or unload the theme, which will be
805  * called when we click any button.
806  * @skipline Elementary.h
807  * @skip static void
808  * @until }
809  *
810  * And the main function, creating the window and adding some buttons to it.
811  * We load our theme as an overlay and nothing else. Notice there's no style
812  * set for any button there, which means they should be using the default
813  * that we override.
814  * @skip int
815  * @until ELM_MAIN
816  *
817  * That's pretty much it. The full code is @ref theme_example_02.c "here" and
818  * the definition of the theme is the same as before, and can be found in
819  * @ref theme_example.edc "here".
820  *
821  * @example theme_example_02.c
822  */
823
824  /**
825   * @page button_example_00 Button - Hello, Button!
826   *
827   * @dontinclude button_example_00.c
828   *
829   * Keeping the tradition, this is a simple "Hello, World" button example. We
830   * will show how to create a button and associate and action to be performed
831   * when you click on it.
832   *
833   * In the end, we'll be presented with something that looks like this:
834   *
835   * @image html screenshots/button_00.png
836   * @image latex screenshots/button_00.eps width=\textwidth
837   *
838   * The full code of the example is @ref button_example_00.c "here" and we
839   * will follow here with a rundown of it.
840   *
841   *
842   * There is only one button on the interface which performs a basic action:
843   * close the application. This behavior is described by on_click() function,
844   * that interrupt the program invoking elm_exit().
845   * @skip static void
846   * @until }
847   *
848   *
849   * On the main() function, we set the basic characteristics of the user
850   * interface. First we use the Elementary library to create a window and
851   * set its policies (such as close when the user click on the window close
852   * icon).
853   *
854   * @skip elm_win_add
855   * @until elm_policy_set
856   *
857   * In order to turn it visible on the WM (Window Manager), we also have to
858   * associate it to a canvas through Evas library, and set its dimensions.
859   *
860   * @skip evas_object_resize
861   * @until evas_object_show(win)
862   *
863   * Then we create a background associated to the window, define its dimensions,
864   * and turn it visible on the canvas.
865   * @skip  elm_bg_add
866   * @until evas_object_show(bg)
867   *
868   *
869   * Finally we use Elementary to create a button and Evas to set its
870   * proprieties. Here we have not only to give the button dimensions, but also
871   * its coordinates and the action to be performed on the click event.
872   * @skip elm_button_add
873   * @until evas_object_show(btn)
874   *
875   *
876   * And we are done.
877   *
878   * @example button_example_00.c
879   */
880
881 /**
882   * @page button_example_01 Button - Complete example
883   *
884   * @dontinclude button_example_01.c
885   *
886   * A button is simple, you click on it and something happens. That said,
887   * we'll go through an example to show in detail the button API less
888   * commonly used.
889   *
890   * In the end, we'll be presented with something that looks like this:
891   *
892   * @image html screenshots/button_01.png
893   * @image latex screenshots/button_01.eps width=\textwidth
894   *
895   * The full code of the example is @ref button_example_01.c "here" and we
896   * will follow here with a rundown of it.
897   *
898   * @skip Elementary.h
899   * @until Elementary.h
900   * @skip struct
901   * @until App_Data
902   *
903   * We have several buttons to set different times for the autorepeat timeouts
904   * of the buttons that use it and a few more that we keep track of in our
905   * data struct. The mid button doesn't do much, just moves around according
906   * to what other buttons the user presses. Then four more buttons to move the
907   * central one, and we're also keeping track of the icon set in the middle
908   * button, since when this one moves, we change the icon, and when movement
909   * is finished (by releasing one of the four arrow buttons), we set back the
910   * normal icon.
911   * @skip static void
912   * @until }
913   *
914   * Keeping any of those four buttons pressed will trigger their autorepeat
915   * callback, where we move the button doing some size hint magic. To
916   * understand how that works better, refer to the @ref Box documentation.
917   * Also, the first time the function is called, we change the icon in the
918   * middle button, using elm_object_content_unset() first to keep the reference
919   * to the previous one, so we don't need to recreate it when we are done
920   * moving it.
921   * @skip static void
922   * @until }
923   * @until size_hint_align_set
924   * @until }
925   *
926   * One more callback for the option buttons, that just sets the timeouts for
927   * the different autorepeat options.
928   *
929   * @skip static void
930   * @until }
931   * @until }
932   * @until }
933   *
934   * And the main function, which does some setting up of the buttons in boxes
935   * to make things work. Here we'll go through some snippets only.
936   *
937   * For the option buttons, it's just the button with its label and callback.
938   * @skip elm_button_add
939   * @until smart_callback_add
940   *
941   * For the ones that move the central button, we have no labels. There are
942   * icons instead, and the autorepeat option is toggled.
943   * @skip Gap: 1.0
944   * @skip elm_button_add
945   * @until data.cursors.up
946   *
947   * And just to show the mid button, which doesn't have anything special.
948   * @skip data.cursors.left
949   * @skip elm_button_add
950   * @until data.mid
951   *
952   * And we are done.
953   *
954   * @example button_example_01.c
955   */
956
957 /**
958  * @page bubble_01_example_page elm_bubble - Simple use.
959  * @dontinclude bubble_example_01.c
960  *
961  * This example shows a bubble with all fields set(label, info, content and
962  * icon) and the selected corner changing when the bubble is clicked. To be
963  * able use a bubble we need to do some setup and create a window, for this
964  * example we are going to ignore that part of the code since it isn't
965  * relevant to the bubble.
966  *
967  * To have the selected corner change in a clockwise motion we are going to
968  * use the following callback:
969  * @skip static
970  * @until }
971  * @until }
972  *
973  * Here we are creating an elm_label that is going to be used as the content
974  * for our bubble:
975  * @skipline elm_label
976  * @until show
977  * @note You could use any evas_object for this, we are using an elm_label
978  * for simplicity.
979  *
980  * Despite it's name the bubble's icon doesn't have to be an icon, it can be
981  * any evas_object. For this example we are going to make the icon a simple
982  * blue rectangle:
983  * @until show
984  *
985  * And finally we have the actual bubble creation and the setting of it's
986  * label, info and content:
987  * @until content
988  * @skipline show
989  * @note Because we didn't set a corner, the default("top_left") will be
990  * used.
991  *
992  * Now that we have our bubble all that is left is connecting the "clicked"
993  * signals to our callback:
994  * @line smart_callback
995  *
996  * This last bubble we created was very complete, so it's pertinent to show
997  * that most of that stuff is optional a bubble can be created with nothing
998  * but content:
999  * @until content
1000  * @skipline show
1001  *
1002  * Our example will look like this:
1003  *
1004  * @image html screenshots/bubble_example_01.png
1005  * @image latex screenshots/bubble_example_01.eps width=\textwidth
1006  *
1007  * See the full source code @ref bubble_example_01.c here.
1008  * @example bubble_example_01.c
1009  */
1010
1011 /**
1012  * @page box_example_01 Box - Basic API
1013  *
1014  * @dontinclude button_example_01.c
1015  *
1016  * As a special guest tonight, we have the @ref button_example_01 "simple
1017  * button example". There are plenty of boxes in it, and to make the cursor
1018  * buttons that moved a central one around when pressed, we had to use a
1019  * variety of values for their hints.
1020  *
1021  * To start, let's take a look at the handling of the central button when
1022  * we were moving it around. To achieve this effect without falling back to
1023  * a complete manual positioning of the @c Evas_Object in our canvas, we just
1024  * put it in a box and played with its alignment within it, as seen in the
1025  * following snippet of the callback for the pressed buttons.
1026  * @skip evas_object_size_hint_align_get
1027  * @until evas_object_size_hint_align_set
1028  *
1029  * Not much to it. We get the current alignment of the object and change it
1030  * by just a little, depending on which button was pressed, then set it
1031  * again, making sure we stay within the 0.0-1.0 range so the button moves
1032  * inside the space it has, instead of disappearing under the other objects.
1033  *
1034  * But as useful as an example as that may have been, the usual case with boxes
1035  * is to set everything at the moment they are created, like we did for
1036  * everything else in our main function.
1037  *
1038  * The entire layout of our program is made with boxes. We have one set as the
1039  * resize object for the window, which means it will always be resized with
1040  * the window. The weight hints set to @c EVAS_HINT_EXPAND will tell the
1041  * window that the box can grow past it's minimum size, which allows resizing
1042  * of it.
1043  * @skip elm_main
1044  * @skip elm_box_add
1045  * @until evas_object_show
1046  *
1047  * Two more boxes, set to horizontal, hold the buttons to change the autorepeat
1048  * configuration used by the buttons. We create each to take over all the
1049  * available space horizontally, but we don't want them to grow vertically,
1050  * so we keep that axis of the weight with 0.0. Then it gets packed in the
1051  * main box.
1052  * @skip box2
1053  * @until evas_object_show
1054  *
1055  * The buttons in each of those boxes have nothing special, they are just packed
1056  * in with their default values and the box will use their minimum size, as set
1057  * by Elementary itself based on the label, icon, finger size and theme.
1058  *
1059  * But the buttons used to move the central one have a special disposition.
1060  * The top one first, is placed right into the main box like our other smaller
1061  * boxes. Set to expand horizontally and not vertically, and in this case we
1062  * also tell it to fill that space, so it gets resized to take the entire
1063  * width of the window.
1064  * @skip Gap: 1.0
1065  * @skip elm_button_add
1066  * @until evas_object_show
1067  *
1068  * The bottom one will be the same, but for the other two we need to use a
1069  * second box set to take as much space as we have, so we can place our side
1070  * buttons in place and have the big empty space where the central button will
1071  * move.
1072  * @skip elm_box_add
1073  * @until evas_object_show
1074  *
1075  * Then the buttons will have their hints inverted to the other top and bottom
1076  * ones, to expand and fill vertically and keep their minimum size horizontally.
1077  * @skip elm_button_add
1078  * @until evas_object_show
1079  *
1080  * The central button takes every thing else. It will ask to be expanded in
1081  * both directions, but without filling its cell. Changing its alignment by
1082  * pressing the buttons will make it move around.
1083  * @skip elm_button_add
1084  * @until evas_object_show
1085  *
1086  * To end, the rightmost button is packed in the smaller box after the central
1087  * one, and back to the main box we have the bottom button at the end.
1088  */
1089
1090 /**
1091  * @page box_example_02 Box - Layout transitions
1092  *
1093  * @dontinclude box_example_02.c
1094  *
1095  * Setting a customized layout for a box is simple once you have the layout
1096  * function, which is just like the layout function for @c Evas_Box. The new
1097  * and fancier thing we can do with Elementary is animate the transition from
1098  * one layout to the next. We'll see now how to do that through a simple
1099  * example, while also taking a look at some of the API that was left
1100  * untouched in our @ref box_example_01 "previous example".
1101  *
1102  * @image html screenshots/box_example_02.png
1103  * @image latex screenshots/box_example_02.eps width=\textwidth
1104  *
1105  * @skipline Elementary.h
1106  *
1107  * Our application data consists of a list of layout functions, given by
1108  * @c transitions. We'll be animating through them throughout the entire run.
1109  * The box with the stuff to move around and the last layout that was set to
1110  * make things easier in the code.
1111  * @skip typedef
1112  * @until Transitions_Data
1113  *
1114  * The box starts with three buttons, clicking on any of them will take it
1115  * out of the box without deleting the object. There are also two more buttons
1116  * outside, one to add an object to the box and the other to clear it.
1117  * This is all to show how you can interact with the items in the box, add
1118  * things and even remove them, while the transitions occur.
1119  *
1120  * One of the callback we'll be using creates a new button, asks the box for
1121  * the list of its children and if it's not empty, we add the new object after
1122  * the first one, otherwise just place at the end as it will not make any
1123  * difference.
1124  * @skip static void
1125  * @until }
1126  * @until }
1127  *
1128  * The clear button is even simpler. Everything in the box will be deleted,
1129  * leaving it empty and ready to fill it up with more stuff.
1130  * @skip static void
1131  * @until }
1132  *
1133  * And a little function to remove buttons from the box without deleting them.
1134  * This one is set for the @c clicked callback of the original buttons,
1135  * unpacking them when clicked and placing it somewhere in the screen where
1136  * they will not disturb. Once we do this, the box no longer has any control
1137  * of it, so it will be left untouched until the program ends.
1138  * @skip static void
1139  * @until }
1140  *
1141  * If we wanted, we could just call @c evas_object_del() on the object to
1142  * destroy it. In this case, no unpack is really necessary, as the box would
1143  * be notified of a child being deleted and adjust its calculations accordingly.
1144  *
1145  * The core of the program is the following function. It takes whatever
1146  * function is first on our list of layouts and together with the
1147  * @c last_layout, it creates an ::Elm_Box_Transition to use with
1148  * elm_box_layout_transition(). In here, we tell it to start from whatever
1149  * layout we last set, end with the one that was at the top of the list and
1150  * when everything is finished, call us back so we can create another
1151  * transition. Finally, move the new layout to the end of the list so we
1152  * can continue running through them until the program ends.
1153  * @skip static void
1154  * @until }
1155  *
1156  * The main function doesn't have anything special. Creation of box, initial
1157  * buttons and some callback setting. The only part worth mentioning is the
1158  * initialization of our application data.
1159  * @skip tdata.box
1160  * @until evas_object_box_layout_stack
1161  *
1162  * We have a simple static variable, set the box, the first layout we are
1163  * using as last and create the list with the different functions to go
1164  * through.
1165  *
1166  * And in the end, we set the first layout and call the same function we went
1167  * through before to start the run of transitions.
1168  * @until _test_box_transition_change
1169  *
1170  * For the full code, follow @ref box_example_02.c "here".
1171  *
1172  * @example box_example_02.c
1173  */
1174
1175 /**
1176  * @page calendar_example_01 Calendar - Simple creation.
1177  * @dontinclude calendar_example_01.c
1178  *
1179  * As a first example, let's just display a calendar in our window,
1180  * explaining all steps required to do so.
1181  *
1182  * First you should declare objects we intend to use:
1183  * @skipline Evas_Object
1184  *
1185  * Then a window is created, a title is set and its set to be autodeleted.
1186  * More details can be found on windows examples:
1187  * @until elm_win_autodel
1188  *
1189  * Next a simple background is placed on our windows. More details on
1190  * @ref bg_01_example_page :
1191  * @until evas_object_show(bg)
1192  *
1193  * Now, the exciting part, let's add the calendar with elm_calendar_add(),
1194  * passing our window object as parent.
1195  * @until evas_object_show(cal);
1196  *
1197  * To conclude our example, we should show the window and run elm mainloop:
1198  * @until ELM_MAIN
1199  *
1200  * Our example will look like this:
1201  *
1202  * @image html screenshots/calendar_example_01.png
1203  * @image latex screenshots/calendar_example_01.eps width=\textwidth
1204  *
1205  * See the full source code @ref calendar_example_01.c here.
1206  * @example calendar_example_01.c
1207  */
1208
1209 /**
1210  * @page calendar_example_02 Calendar - Layout strings formatting.
1211  * @dontinclude calendar_example_02.c
1212  *
1213  * In this simple example, we'll explain how to format the label displaying
1214  * month and year, and also set weekday names.
1215  *
1216  * To format month and year label, we need to create a callback function
1217  * to create a string given the selected time, declared under a
1218  * <tt> struct tm </tt>.
1219  *
1220  * <tt> struct tm </tt>, declared on @c time.h, is a structure composed by
1221  * nine integers:
1222  * @li tm_sec   seconds [0,59]
1223  * @li tm_min   minutes [0,59]
1224  * @li tm_hour  hour [0,23]
1225  * @li tm_mday  day of month [1,31]
1226  * @li tm_mon   month of year [0,11]
1227  * @li tm_year  years since 1900
1228  * @li tm_wday  day of week [0,6] (Sunday = 0)
1229  * @li tm_yday  day of year [0,365]
1230  * @li tm_isdst daylight savings flag
1231  * @note glib version has 2 additional fields.
1232  *
1233  * For our function, only stuff that matters are tm_mon and tm_year.
1234  * But we don't need to access it directly, since there are nice functions
1235  * to format date and time, as @c strftime.
1236  * We will get abbreviated month (%b) and year (%y) (check strftime manpage
1237  * for more) in our example:
1238  * @skipline static char
1239  * @until }
1240  *
1241  * We need to alloc the string to be returned, and calendar widget will
1242  * free it when it's not needed, what is done by @c strdup.
1243  * So let's register our callback to calendar object:
1244  * @skipline elm_calendar_format_function_set
1245  *
1246  * To set weekday names, we should declare them as an array of strings:
1247  * @dontinclude calendar_example_02.c
1248  * @skipline weekdays[]
1249  * @until }
1250  *
1251  * And finally set them to calendar:
1252  * @skipline weekdays_names_set
1253  *
1254  * Our example will look like this:
1255  *
1256  * @image html screenshots/calendar_example_02.png
1257  * @image latex screenshots/calendar_example_02.eps width=\textwidth
1258  *
1259  * See the full source code @ref calendar_example_02.c here.
1260  * @example calendar_example_02.c
1261  */
1262
1263 /**
1264  * @page calendar_example_03 Calendar - Years restrictions.
1265  * @dontinclude calendar_example_03.c
1266  *
1267  * This example explains how to set max and min year to be displayed
1268  * by a calendar object. This means that user won't be able to
1269  * see or select a date before and after selected years.
1270  * By default, limits are 1902 and maximum value will depends
1271  * on platform architecture (year 2037 for 32 bits); You can
1272  * read more about time functions on @c ctime manpage.
1273  *
1274  * Straigh to the point, to set it is enough to call
1275  * elm_calendar_min_max_year_set(). First value is minimum year, second
1276  * is maximum. If first value is negative, it won't apply limit for min
1277  * year, if the second one is negative, won't apply for max year.
1278  * Setting both to negative value will clear limits (default state):
1279  * @skipline elm_calendar_min_max_year_set
1280  *
1281  * Our example will look like this:
1282  *
1283  * @image html screenshots/calendar_example_03.png
1284  * @image latex screenshots/calendar_example_03.eps width=\textwidth
1285  *
1286  * See the full source code @ref calendar_example_03.c here.
1287  * @example calendar_example_03.c
1288  */
1289
1290 /**
1291  * @page calendar_example_04 Calendar - Days selection.
1292  * @dontinclude calendar_example_04.c
1293  *
1294  * It's possible to disable date selection and to select a date
1295  * from your program, and that's what we'll see on this example.
1296  *
1297  * If isn't required that users could select a day on calendar,
1298  * only interacting going through months, disabling days selection
1299  * could be a good idea to avoid confusion. For that:
1300  * @skipline elm_calendar_select_mode_set
1301  *
1302  * Also, regarding days selection, you could be interested to set a
1303  * date to be highlighted on calendar from your code, maybe when
1304  * a specific event happens, or after calendar creation. As @c time output is
1305  * in seconds, we define the number of seconds contained within a day as a
1306  * constant:
1307  * @dontinclude calendar_example_04.c
1308  * @skipline SECS_DAY
1309  *
1310  * Now let's select two days from current day:
1311  * @skipline time(NULL)
1312  * @until elm_calendar_selected_time_set
1313  *
1314  * Our example will look like this:
1315  *
1316  * @image html screenshots/calendar_example_04.png
1317  * @image latex screenshots/calendar_example_04.eps width=\textwidth
1318  *
1319  * See the full source code @ref calendar_example_04.c here.
1320  * @example calendar_example_04.c
1321  */
1322
1323 /**
1324  * @page calendar_example_05 Calendar - Signal callback and getters.
1325  * @dontinclude calendar_example_05.c
1326  *
1327  * Most of setters explained on previous examples have associated getters.
1328  * That's the subject of this example. We'll add a callback to display
1329  * all calendar information every time user interacts with the calendar.
1330  *
1331  * Let's check our callback function:
1332  * @skipline static void
1333  * @until double interval;
1334  *
1335  * To get selected day, we need to call elm_calendar_selected_time_get(),
1336  * but to assure nothing wrong happened, we must check for function return.
1337  * It'll return @c EINA_FALSE if fail. Otherwise we can use time set to
1338  * our structure @p stime.
1339  * @skipline elm_calendar_selected_time_get
1340  * @until return
1341  *
1342  * Next we'll get information from calendar and place on declared vars:
1343  * @skipline interval
1344  * @until elm_calendar_weekdays_names_get
1345  *
1346  * The only tricky part is that last line gets an array of strings
1347  * (char arrays), one for each weekday.
1348  *
1349  * Then we can simple print that to stdin:
1350  * @skipline printf
1351  * @until }
1352  *
1353  * <tt> struct tm </tt> is declared on @c time.h. You can check @c ctime
1354  * manpage to read about it.
1355  *
1356  * To register this callback, that will be called every time user selects
1357  * a day or goes to next or previous month, just add a callback for signal
1358  * @b changed.
1359  * @skipline evas_object_smart_callback_add
1360  *
1361  * Our example will look like this:
1362  *
1363  * @image html screenshots/calendar_example_05.png
1364  * @image latex screenshots/calendar_example_05.eps width=\textwidth
1365  *
1366  * See the full source code @ref calendar_example_05.c here.
1367  * @example calendar_example_05.c
1368  */
1369
1370 /**
1371  * @page calendar_example_06 Calendar - Calendar marks.
1372  * @dontinclude calendar_example_06.c
1373  *
1374  * On this example marks management will be explained. Functions
1375  * elm_calendar_mark_add(), elm_calendar_mark_del() and
1376  * elm_calendar_marks_clear() will be covered.
1377  *
1378  * To add a mark, will be required to choose three things:
1379  * @li mark style
1380  * @li mark date, or start date if it will be repeated
1381  * @li mark periodicity
1382  *
1383  * Style defines the kind of mark will be displayed over marked day,
1384  * on calendar. Default theme supports @b holiday and @b checked.
1385  * If more is required, is possible to set a new theme to calendar
1386  * widget using elm_object_style_set(), and use
1387  * the signal that will be used by such marks.
1388  *
1389  * Date is a <tt> struct tm </tt>, as defined by @c time.h. More can
1390  * be read on @c ctime manpage.
1391  * If a date relative from current is required, this struct can be set
1392  * as:
1393  * @skipline time(NULL)
1394  * @until localtime_r
1395  *
1396  * Or if it's an absolute date, you can just declare the struct like:
1397  * @dontinclude calendar_example_06.c
1398  * @skipline sunday
1399  * @until christmas.tm_mon
1400  *
1401  * Periodicity is how frequently the mark will be displayed over the
1402  * calendar.  Can be a unique mark (that don't repeat), or it can repeat
1403  * daily, weekly, monthly or annually. It's enumerated by
1404  * @c Elm_Calendar_Mark_Repeat_Type.
1405  *
1406  * So let's add some marks to our calendar. We will add christmas holiday,
1407  * set Sundays as holidays, and check current day and day after that.
1408  * @dontinclude calendar_example_06.c
1409  * @skipline sunday
1410  * @until christmas.tm_mon
1411  * @skipline current_time
1412  * @until ELM_CALENDAR_WEEKLY
1413  *
1414  * We kept the return of first mark add, because we don't really won't it
1415  * to be checked, so let's remove it:
1416  * @skipline elm_calendar_mark_del
1417  *
1418  * After all marks are added and removed, is required to draw them:
1419  * @skipline elm_calendar_marks_draw
1420  *
1421  * Finally, to clear all marks, let's set a callback for our button:
1422  * @skipline elm_button_add
1423  * @until evas_object_show(bt);
1424  *
1425  * This callback will receive our calendar object, and should clear it:
1426  * @dontinclude calendar_example_06.c
1427  * @skipline static
1428  * @until }
1429  * @note Remember to draw marks after clear the calendar.
1430  *
1431  * Our example will look like this:
1432  *
1433  * @image html screenshots/calendar_example_06.png
1434  * @image latex screenshots/calendar_example_06.eps width=\textwidth
1435  *
1436  * See the full source code @ref calendar_example_06.c here.
1437  * @example calendar_example_06.c
1438  */
1439
1440 /**
1441  * @page spinner_example Spinner widget example
1442  *
1443  * This code places seven Elementary spinner widgets on a window, each of
1444  * them exemplifying a part of the widget's API.
1445  *
1446  * The first of them is the default spinner:
1447  * @dontinclude spinner_example.c
1448  * @skipline elm_spinner_add
1449  * @until evas_object_show
1450  * As you see, the defaults for a spinner are:
1451  * @li no wrap
1452  * @li min value set to 0
1453  * @li max value set to 100
1454  * @li step value set to 1
1455  * @li label format set to "%0.f"
1456  *
1457  * If another format is required, see the second spinner. It will put a text
1458  * before and after the value, and also format value to display two decimals:
1459  * @skipline format_set
1460  *
1461  * The third one will use a customized step, define new minimum and maximum
1462  * values and enable wrap, so when value reaches minimum it jumps to maximum,
1463  * or jumps to minimum after maximum value is reached. Format is set to display
1464  * a decimal:
1465  * @skipline elm_spinner_add
1466  * @until evas_object_show
1467  *
1468  * The fourth uses @c vertical style, so instead of left and right arrows,
1469  * top and bottom are displayed. Also the change interval is reduced, so
1470  * user can change value faster.
1471  * @skipline style
1472  * @skipline interval
1473  *
1474  * In the fifth the user won't be allowed to set value directly, i.e., will
1475  * be obligate change value only using arrows:
1476  * @skipline editable
1477  *
1478  * The sixth widget will receive a lot of special values, so
1479  * instead of reading numeric values, user will see labels for each one.
1480  * Also direct edition is disabled, otherwise users would see the numeric
1481  * value on edition mode. User will be able to select a month in this widget:
1482  * @skipline elm_spinner_add
1483  * @until evas_object_show
1484  *
1485  * Finally the last widget will exemplify how to listen for widget's signals,
1486  * <tt> changed </tt> and <tt> delay,changed </tt>. First we need to
1487  * implement callback functions that will simply print spinner's value:
1488  * @dontinclude spinner_example.c
1489  * @skip static
1490  * @skip }
1491  * @skipline static
1492  * @until }
1493  * @until }
1494  *
1495  * The first callback function should be called everytime value changes,
1496  * the second one only after user stops to increment or decrement. Try
1497  * to keep arrows pressed and check the difference.
1498  * @skip smart_callback
1499  * @skipline smart_callback
1500  * @skipline smart_callback
1501  *
1502  * See the full @ref spinner_example.c "example", whose window should
1503  * look like this picture:
1504  *
1505  * @image html screenshots/spinner_example.png
1506  * @image latex screenshots/spinner_example.eps width=\textwidth
1507  *
1508  * See the full @ref spinner_example.c "source code" for this example.
1509  *
1510  * @example spinner_example.c
1511  */
1512
1513 /**
1514  * @page slider_example Slider widget example
1515  *
1516  * This code places seven Elementary slider widgets on a window, each of
1517  * them exemplifying a part of the widget's API.
1518  *
1519  * The first of them is the default slider:
1520  * @dontinclude slider_example.c
1521  * @skipline elm_slider_add
1522  * @until evas_object_show
1523  *
1524  * As you see, the defaults for a slider are:
1525  * @li horizontal
1526  * @li no label
1527  * @li no values (on indicator or unit labels)
1528  *
1529  * Actually it's pretty useless this way. So let's learn how to improve it.
1530  *
1531  * If some decoration is required, a label can be set, and icon before and
1532  * after the bar as well. On the second slider will add a @c home icon
1533  * and a @c folder icon at @c end.
1534  * @skip elm_object_text_set
1535  * @until elm_object_part_content_set(sl, "end", ic)
1536  *
1537  * If the bar size need to be changed, it can be done with span set function,
1538  * that doesn't accounts other widget's parts size. Also the bar can starts
1539  * with a not default value (0.0), as we done on third slider:
1540  * @skipline value_set
1541  * @skipline span_size_set
1542  *
1543  * So far, users won't be able to see the slider value. If it's required,
1544  * it can be displayed in two different areas, units label or above
1545  * the indicator.
1546  *
1547  * Let's place a units label on our widget, and also let's set minimum and
1548  * maximum value (uses 0.0 and 1.0 by default):
1549  * @skipline unit_format_set
1550  * @skipline min_max_set
1551  *
1552  * If above the indicator is the place to display the value, just set it.
1553  * Also, is possible to invert a bar, as you can see:
1554  * @skipline indicator_format_set
1555  * @skipline inverted_set
1556  *
1557  * But if you require to use a function a bit more customized to show the value,
1558  * is possible to registry a callback function that will be called
1559  * to display unit or indicator label. Only the value will be passed to this
1560  * function, that should return a string.
1561  * In this case, a function to free this string will be required.
1562  *
1563  * Let's exemplify with indicator label on our sixth slider:
1564  * @dontinclude slider_example.c
1565  * @skip static
1566  * @skip }
1567  * @skip static
1568  * @skip }
1569  * @skip static
1570  * @skip }
1571  * @skipline static
1572  * @until }
1573  * @until }
1574  *
1575  * Setting callback functions:
1576  * @skipline indicator_format_function_set
1577  * @skipline _indicator_free
1578  *
1579  * Also, a slider can be displayed vertically:
1580  * @dontinclude slider_example.c
1581  * @skipline elm_slider_horizontal_set
1582  *
1583  * Finally the last widget will exemplify how to listen for widget's signals,
1584  * <tt> changed </tt> and <tt> delay,changed </tt>. First we need to
1585  * implement callback functions that will simply print slider's value:
1586  * @dontinclude slider_example.c
1587  * @skip static
1588  * @skip }
1589  * @skipline static
1590  * @until }
1591  * @until }
1592  *
1593  * The first callback function should be called everytime value changes,
1594  * the second one only after user stops to increment or decrement. Try
1595  * to keep arrows pressed and check the difference.
1596  * @skip smart_callback
1597  * @skipline smart_callback
1598  * @skipline smart_callback
1599  *
1600  * See the full @ref slider_example.c "example", whose window should
1601  * look like this picture:
1602  *
1603  * @image html screenshots/slider_example.png
1604  * @image latex screenshots/slider_example.eps width=\textwidth
1605  *
1606  * See the full @ref slider_example.c "source code" for this example.
1607  *
1608  * @example slider_example.c
1609  */
1610
1611 /**
1612  * @page panes_example Panes widget example
1613  *
1614  * This code places two Elementary panes widgets on a window, one of them
1615  * displayed vertically and the other horizontally, to exemplify
1616  * a part of the widget's API. Also, all the signals emitted by this
1617  * widget will be covered.
1618  *
1619  * Let's start adding a panes to our window:
1620  * @dontinclude panes_example.c
1621  * @skipline elm_panes_add
1622  * @until evas_object_show
1623  *
1624  * Now we will set a content (a simple button) to the left side of our
1625  * panes widget:
1626  * @skipline elm_button_add
1627  * @until content_left_set
1628  *
1629  * The content of the right side will be something a bit more elaborated, we'll
1630  * place another panes, displayed vertically (it's displayed horizontally
1631  * by default):
1632  * @skipline elm_panes_add
1633  * @until content_right_set
1634  *
1635  * When populating a panes displayed vertically, remember that left content
1636  * will be placed at top, and right content will place at bottom. Next
1637  * we will add two buttons to exemplify that:
1638  * @skipline elm_button_add
1639  * @until content_right_set
1640  *
1641  * Panes widgets emits 4 different signals, depending on users interaction
1642  * with the draggable bar. We'll add a callback function for each of them.
1643  *
1644  * <tt> "clicked" signal </tt>:
1645  *
1646  * Callback function that just print "Clicked" to stdin:
1647  * @dontinclude panes_example.c
1648  * @skip static void
1649  * @skip }
1650  * @skip static void
1651  * @skip }
1652  * @skip static void
1653  * @skip }
1654  * @skipline static void
1655  * @until }
1656  *
1657  * Also, add callback function to the panes:
1658  * @skipline "clicked"
1659  *
1660  * <tt> "press" signal </tt>:
1661  *
1662  * Callback function that just print "Pressed" to stdin:
1663  * @dontinclude panes_example.c
1664  * @skip static void
1665  * @skip }
1666  * @skipline static void
1667  * @until }
1668  *
1669  * Also, add callback function to the panes:
1670  * @skipline "press"
1671  *
1672  * Now, let's try to make our callback functions a bit more useful:
1673  *
1674  * <tt> "unpress" signal </tt>:
1675  *
1676  * Suppose we want to know the size proportion of left content after
1677  * user drags the bar. We need to listen to @c unpress signal, and
1678  * get this size from our panes widget. It's done on the following
1679  * function:
1680  * @dontinclude panes_example.c
1681  * @skip static void
1682  * @skip }
1683  * @skip static void
1684  * @skip }
1685  * @skipline static void
1686  * @until }
1687  *
1688  * Adding the callback function to the panes:
1689  * @skipline "unpress"
1690
1691  * <tt> "clicked,double" signal </tt>:
1692  *
1693  * Now, a interesting feature that could be addded to panes widget.
1694  * Hide a content when user double click the draggable bar. It's done
1695  * using a variable to store size and content left size getter and setter
1696  * on the following function:
1697  * @dontinclude panes_example.c
1698  * @skipline static double
1699  * @skip static void
1700  * @skip }
1701  * @skip static void
1702  * @skip }
1703  * @skip static void
1704  * @skip }
1705  * @skipline static void
1706  * @until }
1707  * @until }
1708  * @until }
1709  *
1710  * Adding the callback function to the panes:
1711  * @skipline "clicked,double"
1712  * @until panes);
1713  *
1714  * See the full @ref panes_example.c "example", whose window should
1715  * look like this picture:
1716  *
1717  * @image html screenshots/panes_example.png
1718  * @image latex screenshots/panes_example.eps width=\textwidth
1719  *
1720  * @example panes_example.c
1721  */
1722
1723 /**
1724  * @page clock_example Clock widget example
1725  *
1726  * This code places five Elementary clock widgets on a window, each of
1727  * them exemplifying a part of the widget's API.
1728  *
1729  * The first of them is the pristine clock:
1730  * @dontinclude clock_example.c
1731  * @skip pristine
1732  * @until evas_object_show
1733  * As you see, the defaults for a clock are:
1734  * - military time
1735  * - no seconds shown
1736  *
1737  * For am/pm time, see the second clock:
1738  * @dontinclude clock_example.c
1739  * @skip am/pm
1740  * @until evas_object_show
1741  *
1742  * The third one will show the seconds digits, which will flip in
1743  * synchrony with system time. Note, besides, that the time itself is
1744  * @b different from the system's -- it was customly set with
1745  * elm_clock_time_set():
1746  * @dontinclude clock_example.c
1747  * @skip with seconds
1748  * @until evas_object_show
1749  *
1750  * In both fourth and fifth ones, we turn on the <b>edition
1751  * mode</b>. See how you can change each of the sheets on it, and be
1752  * sure to try holding the mouse pressed over one of the sheet
1753  * arrows. The forth one also starts with a custom time set:
1754  * @dontinclude clock_example.c
1755  * @skip in edition
1756  * @until evas_object_show
1757  *
1758  * The fifth, besides editable, has only the time @b units editable,
1759  * for hours, minutes and seconds. This exemplifies
1760  * elm_clock_edit_mode_set():
1761  * @dontinclude clock_example.c
1762  * @skip but only
1763  * @until evas_object_show
1764  *
1765  * See the full @ref clock_example.c "example", whose window should
1766  * look like this picture:
1767  *
1768  * @image html screenshots/clock_example.png
1769  * @image latex screenshots/clock_example.eps width=\textwidth
1770  *
1771  * See the full @ref clock_example_c "source code" for this example.
1772  *
1773  */
1774
1775 /**
1776  * @page datetime_example Datetime widget example
1777  *
1778  * This code places three Elementary Datetime widgets on a window, each of
1779  * them exemplifying the widget's different usage.
1780  *
1781  * The first of them is <b>"only Date display"</b>:
1782  * @dontinclude datetime_example.c
1783  * @skip only DATE
1784  * @until evas_object_show
1785  *
1786  * For <b>"only Time display"</b>, see the second datetime:
1787  * @dontinclude datetime_example.c
1788  * @skip only TIME
1789  * @until evas_object_show
1790  *
1791  * The third one will display datetime shows both <b>Date and Time</b>, corresponding format will be
1792  * taken from system @b locale. Note, besides, that the strings are different
1793  *  for different language settings.
1794  *
1795  * <b>Datetime format</b> can be programmatically set by using
1796  * elm_datetime_format_set():
1797  * @dontinclude datetime_example.c
1798  * @skip DATE and TIME
1799  * @until evas_object_show
1800  * The default format of any locale consists:
1801  * - Year Field
1802  * - Month Field
1803  * - Date Field
1804  * - Hour Field(12hr/24hr format)
1805  * - Minute Field
1806  * - AM/PM (if exists).
1807  *
1808  * This is how the example program's window looks like with the datetime widget
1809  * showing only date, only time and both date & time:
1810  *
1811  * @image html screenshots/datetime_example.png
1812  * @image latex screenshots/datetime_example.eps width=\textwidth
1813  *
1814  * See the full @ref datetime_example_c "source code" for
1815  * this example.
1816  *
1817  */
1818
1819 /**
1820  * @page dayselector_example Dayselector widget example
1821  *
1822  * This code places two Elementary dayselector widgets on a window, each of
1823  * them exemplifying the different widget styles.
1824  *
1825  * The first of them is the dayselector in default style:
1826  * @dontinclude dayselector_example.c
1827  * @skip weekdays starting from Sunday
1828  * @until evas_object_show
1829  *
1830  * As you see, the default style displays the weekdays starting from Sunday.
1831  *
1832  * One can select/unselect a day just by clicking on the day object.
1833  * The selection toggles once it is being pressed.
1834  *
1835  *
1836  * For showing weekdays starting from Monday, see the second dayselector:
1837  * @dontinclude dayselector_example.c
1838  * @skip weekdays starting from Monday
1839  * @until evas_object_show
1840  *
1841  *
1842  * The following code exemplifies the selection APIs of Dayselector:
1843  * @dontinclude dayselector_example.c
1844  * @skip Callback function
1845  * @until End of clicked callback
1846  *
1847  *
1848  * See the full @ref dayselector_example.c "example", whose window should
1849  * look like this picture:
1850  *
1851  * @image html screenshots/dayselector_example.png
1852  * @image latex screenshots/dayselector_example.eps width=\textwidth
1853  *
1854  * See the full @ref dayselector_example_c "source code" for this example.
1855  *
1856  */
1857
1858 /**
1859  * @page mapbuf_example Mapbuf Widget Example
1860  *
1861  * This code places an Elementary mapbuf widget on a window,
1862  * to exemplify part of the widget's API.
1863  *
1864  * First we'll add an window with a background and a vertical box to
1865  * pack our interface elements:
1866  * @dontinclude mapbuf_example.c
1867  * @skipline win_add
1868  * @until show(bx)
1869  *
1870  * Next we'll simply add the mapbuf widget to the box:
1871  * @skipline mapbuf_add
1872  * @until pack_end
1873  *
1874  * But mapbuf is a container widget, it won't do anything alone. So let's
1875  * create a table full of icons. For that we'll loop to fill each line of each
1876  * column. See @ref tutorial_table_01 "tutorial_table_01"
1877  * if you don't know how to use tables:
1878  * @skipline table_add
1879  * @until }
1880  * @until }
1881  *
1882  * Finally, setting mapbuf content:
1883  * @skipline content_set
1884  * @skipline show
1885  *
1886  * Also, would be good a horizontal box with some controls to change mapbuf
1887  * behavior:
1888  * @skipline box_add
1889  * @until show
1890  *
1891  * By default map is disabled. So just setting content isn't enough.
1892  * Alpha and smooth settings will be applied when map is enabled.
1893  * So we'll add a check for that. Everytime the map properties
1894  * are changed, map will need to be enabled again. So if you
1895  * want to play a bit with our example, remember to always enable
1896  * map again after concluding your changes.
1897  * @skipline check_add
1898  * @until show
1899  *
1900  * We have added a callback function to this check, so it will enable
1901  * or disable map:
1902  * @dontinclude mapbuf_example.c
1903  * @skip static
1904  * @skip }
1905  * @skipline static
1906  * @until }
1907  *
1908  * Let's add check boxes for alpha blending and smooth rendering:
1909  * @skipline check_add
1910  * @until show
1911  * @until show
1912  *
1913  * By default, mapbuf would enable alpha blending and smooth rendering,
1914  * so we need to check boxes to be consistent with its behavior.
1915  *
1916  * Callback functions look like the one added to the check. This way we
1917  * could enable or disable the both properties:
1918  * @dontinclude mapbuf_example.c
1919  * @skip static
1920  * @skip }
1921  * @skip static
1922  * @skip }
1923  * @skipline static
1924  * @until }
1925  * @until }
1926  *
1927  * You'll see that disabling alpha blending will set a black rectangle below
1928  * the icons. That's the reason you only should enable that when you're sure
1929  * the mapbuf content is 100% solid.
1930  *
1931  * See @ref mapbuf_example.c "mapbuf_example.c", whose window should
1932  * look like this picture:
1933  *
1934  * @image html screenshots/mapbuf_example.png
1935  * @image latex screenshots/mapbuf_example.eps width=\textwidth
1936  *
1937  * @example mapbuf_example.c
1938  */
1939
1940 /**
1941  * @page map_example_01 Map Example - Creation and Zoom
1942  *
1943  * This code places an Elementary map widget on a window,
1944  * to exemplify part of the widget's API.
1945  *
1946  * Let's start adding a map to our window:
1947  * @dontinclude map_example_01.c
1948  * @skipline elm_map_add
1949  * @until evas_object_show
1950  *
1951  * It's enough to display a world map inside our window. But usually you'll
1952  * need to let user interact with the map. We need to place some buttons,
1953  * so the user could control the map. It's done on the following code.
1954  * If you don't know about boxes, or buttons, check their examples,
1955  * @ref box_example_01 "Box Example 1" and
1956  * @ref button_example_01 "Button Example 1".
1957  * @skipline elm_box_add
1958  * @until _bt_zoom_fill
1959  *
1960  * We are adding callback functions that will be called when the user clicks
1961  * over these buttons. Let's study such functions, starting from the function
1962  * that will zoom in the map:
1963  * @dontinclude map_example_01.c
1964  * @skipline static void
1965  * @until }
1966  *
1967  * First thing done is assure zoom mode is set to manual. It's the default
1968  * mode, but the other buttons will change this, so before setting a new
1969  * zoom value, we need to change the zoom mode.
1970  *
1971  * Then, we get the current zoom value, increment that, and set the new
1972  * value to the map. If it's bigger than max zoom value allowed, it will
1973  * remain on the maximum allowed, nothing bad will happen. This way we
1974  * don't need to check first if it won't be bigger than max.
1975  *
1976  * Zoom out function is basically the same thing, but zoom will be decremented
1977  * instead of incremented:
1978  * @skipline static void
1979  * @until }
1980  *
1981  * The "X" button, when pressed, will call a function that will
1982  * zoom the map until it fits
1983  * inside the scroll frame with no pixels outside this area:
1984  * @skipline static void
1985  * @until }
1986  *
1987  * And the "#" button, will call a function that will zoom until map fills
1988  * scroll, ensuring no pixels are left unfilled:
1989  * @skipline static void
1990  * @until }
1991  *
1992  * But we can also set map to show something different from default
1993  * world map, changing the zoom level and region shown. Let's pick a
1994  * wonderful city coordinates, one placed at <tt> 43 20 S, 22 90 W </tt>.
1995  * Since map uses double variables to represent latitude and longitude,
1996  * to represent north or east, we should represent it as positive values,
1997  * and south or west as negative. Also, the value will be represented as
1998  * degree.min. So, for example, our longitude <tt> 43 20 S </tt> will
1999  * be represented
2000  * by the value <tt> -43.20 </tt>. A zoom set to @c 12 should be enough
2001  * to show a city.
2002  * @skipline region_show
2003  * @until zoom_set
2004  *
2005  * See @ref map_example_01.c "map_example_01.c" for full source,
2006  * whose window should
2007  * look like this picture:
2008  *
2009  * @image html screenshots/map_example_01.png
2010  * @image latex screenshots/map_example_01.eps width=\textwidth
2011  *
2012  * @example map_example_01.c
2013  */
2014
2015 /**
2016  * @page map_example_02 Map Example - Overlay Usage
2017  *
2018  * This code places an Elementary map widget on a window,
2019  * to exemplify part of the widget's API, related to overlays.
2020  *
2021  * We'll start this example in the same way as
2022  * @ref map_example_01 "Map Example 1". Adding a map with buttons to control
2023  * zoom, so if you didn't read it yet, just do it now.
2024  * @dontinclude map_example_02.c
2025  * @skipline elm_map_add
2026  * @until zoom_fill
2027  *
2028  * Overlays can be placed over the map to represent anything we want. Let's
2029  * say we want to represent some countries and cities with overlays.
2030  *
2031  * Before we create city or country overlays, let's create class overlays.
2032  *
2033  * @skipline elm_map_overlay_class_add
2034  * @until elm_map_overlay_icon_set
2035  * These lines create a class overlay which represents cities.
2036  * This class overlay will be used for grouping city overlays.
2037  * Later city overlays in the same class are appended to this class overlay.
2038  * if city overlays are near each other, they will be grouped.
2039  *
2040  * We can set the icon for the class so that the icon will be displayed
2041  * when city overlays are grouped.
2042  * We can set the zoom required to display the overlays that belongs
2043  * to this class, so if the zoom is less than this value, nothing
2044  * will be shown.
2045  *
2046  * Country class can be created in the same way.
2047  * @skipline elm_map_overlay_class_add
2048  * @until elm_map_overlay_icon_set
2049  *
2050  * Next we'll create some overlays representing cities and countries.
2051  * We set the data for the overlay so that can be used later when
2052  * clicked callback is called.
2053  * We'll append them into city class to be grouped.
2054  * We'll append them in a list, to close up them later.
2055  * To create a default overlay, we need to pass the coordinates.
2056  * @skipline elm_map_overlay_add
2057  * @until eina_list_append
2058  *
2059  * We subscribe a smart callback "overlay,clicked" to create bubble on
2060  * the clicked overlay.
2061  * @dontinclude map_example_02.c
2062  * @skipline "overlay,clicked"
2063  *
2064  * Finally, on our @c main function, we ask the map to show all the overlays
2065  * with the biggest zoom possible, passing the list of overlays added.
2066  * @skipline elm_map_overlays_show
2067  *
2068  * We have created a specific structure for this example to store the name
2069  * of the place and a path to a image file to represent it.
2070  * @dontinclude map_example_02.c
2071  * @skipline typedef
2072  * @until Overlay_Data;
2073  *
2074  * We'll create instances for each place:
2075  * @skipline argentina
2076  * @until sky_03
2077  *
2078   * To return an icon, all we need to do is to add a elm_icon and return it:
2079  * @dontinclude map_example_02.c
2080  * @skipline _icon_get(
2081  * @until }
2082  *
2083  * For the content, let's return something more elaborate. We will return
2084  * a box with an image representing the place, and the name of this place:
2085  * @skipline _box_get(
2086  * @until }
2087  *
2088  * See @ref map_example_02.c "map_example_02.c" for full source,
2089  * whose window should
2090  * look like this picture:
2091  *
2092  * @image html screenshots/map_example_02.png
2093  * @image latex screenshots/map_example_02.eps width=\textwidth
2094  *
2095  * @example map_example_02.c
2096  */
2097
2098 /**
2099  * @page map_example_03 Map Example - Route and Name Usage
2100  *
2101  * This code places an Elementary map widget on a window,
2102  * to exemplify part of the widget's API, related routes and names.
2103  *
2104  * In this example, we will suppose we need to set a route for the user
2105  * from his current point (a gps could provide us this information)
2106  * to somewhere else. So we would have coordinates of this
2107  * start point, and would like that he enters the address of his
2108  * destination in a entry, and we'll trace a route on the map.
2109  *
2110  * We'll start this example in the same way
2111  * @ref map_example_01 "Map Example 1". Adding a map with buttons to control
2112  * zoom, so if you didn't read it yet, just do it now. Actually there is
2113  * a change, that we're aligning buttons to the top, since we wan't a
2114  * vertical control box this time.
2115  * @dontinclude map_example_03.c
2116  * @skipline elm_map_add
2117  * @until zoom_fill
2118  * @until align_set
2119  *
2120  * Next we set the box to be vertical and change it's size, weight
2121  * and alignment, so it will occupy the top of the window, from left
2122  * to right:
2123  * @skipline horizontal_set
2124  * @until align_set
2125  *
2126  * We'll add an entry with a preliminar address, that I know will
2127  * find a coordinate, to examplify names work. But you can try
2128  * lots of addresses. From city or country names to pubs, or whatever
2129  * you want. To try is enough to run the example, type the address and
2130  * press "Route" button. This button will call a function that will
2131  * get the typed address and find the route.
2132  * @skipline entry_add
2133  * @until align_set
2134  * @until align_set
2135  *
2136  * The button pass an structure
2137  * instance we make for this example, with all the fields we'll need.
2138  * @dontinclude map_example_03.c
2139  * @skipline _Example_Data
2140  * @until example_data;
2141  *
2142  * Let's initialize it's fields:
2143  * @skipline example_data.map
2144  * @until example_data.start_lat
2145  *
2146  * @c map and @c entry are our elementary objects, @c route is set to @c NULL,
2147  * since we don't have one yet, and the coordinates of the start point is set
2148  * (longitude and latitude).
2149  *
2150  * Also, let's show this start point at the center of the map, and set a zoom
2151  * nice enough to close it:
2152  * @skipline region_show
2153  * @until zoom_set
2154  *
2155  * These lines were already explained on @ref map_example_02 "Map Example 2".
2156  *
2157  * Now we'll see the "Route" button callback function:
2158  * @dontinclude map_example_03.c
2159  * @skip static void
2160  * @skip }
2161  * @skipline static void
2162  * @until }
2163  *
2164  * First we get the address string from our entry. Then we use @c name
2165  * conversion
2166  * util functions, so we could get coordinates for this address. These
2167  * functions return an #Elm_Map_Name handle for us.
2168  * Function elm_map_name_geo_request() will do this job for us,
2169  * but it's an asynchronous function, since it requires this
2170  * information from the server.
2171  *
2172  * That's the reason we need to wait for
2173  * <tt> "name,loaded" </tt> signal. We add a callback function for this:
2174  * @dontinclude map_example_03.c
2175  * @skipline static void
2176  * @until }
2177  *
2178  * This function will check if a previous route was traced, and if it was,
2179  * it will remove it. Next we'll get destination coordinates from our
2180  * @c name, and use them to add a new route.
2181  *
2182  * To trace a route we need to know how the user will go through the path.
2183  * Let's suppose he'll be walking, but doesn't like to walk, so we
2184  * need to choose the shortest path instead of the route that would
2185  * made him spend less time. Coordinates of the point from where he will
2186  * start and of the destination point need to be passed as well.
2187  *
2188  * Finally we'll set a color different from solid red (default), to show
2189  * our route. We set it green.
2190  *
2191  * See @ref map_example_03.c "map_example_03.c" for full source,
2192  * whose window should
2193  * look like this picture:
2194  *
2195  * @image html screenshots/map_example_03.png
2196  * @image latex screenshots/map_example_03.eps width=\textwidth
2197  *
2198  * @example map_example_03.c
2199  */
2200
2201 /**
2202  * @page diskselector_example_01 Diskselector widget example
2203  *
2204  * This code places 4 Elementary diskselector widgets on a window, each of
2205  * them exemplifying a part of the widget's API.
2206  *
2207  * All of them will have weekdays as items, since we won't focus
2208  * on items management on this example. For an example about this subject,
2209  * check @ref diskselector_example_02.
2210  *
2211  * The first of them is a default diskselector.
2212  * @dontinclude diskselector_example_01.c
2213  * @skipline lbl
2214  * @until }
2215  * @skipline elm_diskselector_add
2216  * @until evas_object_show
2217  *
2218  * We are just adding the diskselector, so as you can see, defaults for it are:
2219  * @li Only 3 items visible each time.
2220  * @li Only 3 characters are displayed for labels on side positions.
2221  * @li The first added item remains centeres, i.e., it's the selected item.
2222  *
2223  * To add items, we are just appending it on a loop, using function
2224  * elm_diskselector_item_append(), that will be better explained on
2225  * items management example.
2226  *
2227  * For a circular diskselector, check the second widget. A circular
2228  * diskselector will display first item after last, and last previous to
2229  * the first one. So, as you can see, @b Sa will appears on left side
2230  * of selected @b Sunday. This property is set with
2231  * elm_diskselector_round_enabled_set().
2232  *
2233  * Also, we decide to display only 2 character for side labels, instead of 3.
2234  * For this we call elm_diskselector_side_text_max_length_set(). As result,
2235  * we'll see @b Mo displayed instead of @b Mon, when @b Monday is on a
2236  * side position.
2237  *
2238  * @skipline elm_diskselector_add
2239  * @until evas_object_show
2240  *
2241  * But so far, we are only displaying 3 items at once. If more are wanted,
2242  * is enough to call elm_diskselector_display_item_num_set(), as you can
2243  * see here:
2244  * @skipline elm_diskselector_add
2245  * @until elm_diskselector_display_item_num_set
2246  *
2247  * @note You can't set less than 3 items to be displayed.
2248  *
2249  * You can get the number of items in the diskselector by calling
2250  * elm_diskselector_display_item_num_get(), as you can see here:
2251  * @skipline elm_diskselector_display_item_num_get
2252  *
2253  * Finally, if a bounce effect is required, or you would like to see
2254  * scrollbars, it is possible. But, for default theme, diskselector
2255  * scrollbars will be invisible anyway.
2256  * @skipline elm_diskselector_add
2257  * @until evas_object_show
2258  *
2259  * See the full @ref diskselector_example_01.c "diskselector_example_01.c"
2260  * code, whose window should look like this picture:
2261  *
2262  * @image html screenshots/diskselector_example_01.png
2263  * @image latex screenshots/diskselector_example_01.eps width=\textwidth
2264  *
2265  * @example diskselector_example_01.c
2266  */
2267
2268 /**
2269  * @page diskselector_example_02 Diskselector - Items management
2270  *
2271  * This code places an Elementary diskselector widgets on a window,
2272  * along with some buttons trigerring actions on it (though its API).
2273  * It covers most of diskselector item functions.
2274  *
2275  * On our @c main function, we are adding a default diskselector with
2276  * 3 items. We are only setting their labels (second parameter of function
2277  * elm_diskselector_item_append):
2278  * @dontinclude diskselector_example_02.c
2279  * @skipline elm_diskselector_add
2280  * @until Item 2
2281  *
2282  * Next we are adding lots of buttons, each one for a callback function
2283  * that will realize a task covering part of diskselector items API.
2284  * Lets check the first one:
2285  * @skipline elm_button_add
2286  * @until evas_object_show
2287  *
2288  * We are labeling the button with a task description with
2289  * elm_object_text_set() and setting a callback
2290  * function evas_object_smart_callback_add().
2291  * Each callback function will have the signature:
2292  * <tt> static void _task_cb(void *data, Evas_Object *obj,
2293  * void *event_info)</tt> with the function name varying for each task.
2294  *
2295  * Now let's cover all of them.
2296  *
2297  * <b> Appending an item: </b>
2298  * @dontinclude diskselector_example_02.c
2299  * @skipline _add_cb
2300  * @until }
2301  *
2302  * All items are included on diskselector after last one. You @b can't
2303  * prepend items.
2304  *
2305  * The first parameter of elm_diskselector_item_append() is the diskselector
2306  * object, that we are receiving as data on our callback function.
2307  * The second one is a label, the string that will be placed in the center
2308  * of our item. As we don't wan't icons or callback functions, we can
2309  * send NULL as third, fourth and fifth parameters.
2310  *
2311  * <b> Appending an item with icon: </b>
2312  * @dontinclude diskselector_example_02.c
2313  * @skipline _add_ic_cb
2314  * @until }
2315  *
2316  * If an icon is required, you can pass it as third parameter on our
2317  * elm_diskselector_item_append() function. It will be place on the
2318  * left side of item's label, that will be shifted to right a bit.
2319  *
2320  * For more details about how to create icons, look for elm_icon examples.
2321  *
2322  * <b> Appending an item with callback function for selected: </b>
2323  * @dontinclude diskselector_example_02.c
2324  * @skipline _sel_cb
2325  * @until }
2326  * @until }
2327  *
2328  * To set a callback function that will be called every time an item is
2329  * selected, i.e., everytime the diskselector stops with this item in
2330  * center position, just pass the function as fourth parameter.
2331  *
2332  * <b> Appending an item with callback function for selected with data: </b>
2333  * @dontinclude diskselector_example_02.c
2334  * @skipline _sel_data_cb
2335  * @until }
2336  * @until }
2337  * @until }
2338  * @until }
2339  *
2340  * If the callback function request an extra data, it can be attached to our
2341  * item passing a pointer for data as fifth parameter.
2342  * Our function _sel_data_cb will receive it as <tt> void *data </tt>.
2343  *
2344  * If you want to free this data, or handle that the way you need when the
2345  * item is deleted, set a callback function for that, with
2346  * elm_object_item_del_cb_set().
2347  *
2348  * As you can see we check if @c it is not @c NULL after appending it.
2349  * If an error happens, we won't try to set a function for it.
2350  *
2351  * <b> Deleting an item: </b>
2352  * @dontinclude diskselector_example_02.c
2353  * @skipline _del_cb(void
2354  * @until }
2355  *
2356  * To delete an item we simple need to call elm_object_item_del() with
2357  * a pointer for such item.
2358  *
2359  * If you need, you can get selected item with
2360  * elm_diskselector_selected_item_get(), that will return a pointer for it.
2361  *
2362  * <b> Unselecting an item: </b>
2363  * @dontinclude diskselector_example_02.c
2364  * @skipline _unselect_cb
2365  * @until }
2366  *
2367  * To select an item, you should call elm_diskselector_item_selected_set()
2368  * passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
2369  *
2370  * If you unselect the selected item, diskselector will automatically select
2371  * the first item.
2372  *
2373  * <b> Printing all items: </b>
2374  * @dontinclude diskselector_example_02.c
2375  * @skipline _print_cb
2376  * @until }
2377  *
2378  * <b> Clearing the diskselector: </b>
2379  * @dontinclude diskselector_example_02.c
2380  * @skipline _clear_cb
2381  * @until }
2382  *
2383  * <b> Selecting the first item: </b>
2384  * @dontinclude diskselector_example_02.c
2385  * @skipline _select_first_cb
2386  * @until }
2387  *
2388  * <b> Selecting the last item: </b>
2389  * @dontinclude diskselector_example_02.c
2390  * @skipline _select_last_cb
2391  * @until }
2392  *
2393  * <b> Selecting the next item: </b>
2394  * @dontinclude diskselector_example_02.c
2395  * @skipline _select_next_cb
2396  * @until }
2397  *
2398  * <b> Selecting the previous item: </b>
2399  * @dontinclude diskselector_example_02.c
2400  * @skipline _select_prev_cb
2401  * @until }
2402  *
2403  * See the full @ref diskselector_example_02.c "diskselector_example_02.c"
2404  * code, whose window should look like this picture:
2405  *
2406  * @image html screenshots/diskselector_example_02.png
2407  * @image latex screenshots/diskselector_example_02.eps width=\textwidth
2408  *
2409  * @example diskselector_example_02.c
2410  */
2411
2412 /**
2413  * @page list_example_01 List widget example
2414  *
2415  * This code places a single Elementary list widgets on a window, just
2416  * to exemplify the more simple and common use case: a list will be created
2417  * and populated with a few items.
2418  *
2419  * To keep it simple, we won't show how to customize the list, for this check
2420  * @ref list_example_02. Also, we won't focus
2421  * on items management on this example. For an example about this subject,
2422  * check @ref list_example_03.
2423  *
2424  * To add a list widget.
2425  * @dontinclude list_example_01.c
2426  * @skipline elm_list_add
2427  *
2428  * We are just adding the list, so as you can see, defaults for it are:
2429  * @li Items are displayed vertically.
2430  * @li Only one item can be selected.
2431  * @li The list doesn't bounce.
2432  *
2433  * To add items, we are just appending it on a loop, using function
2434  * elm_list_item_append(), that will be better explained on
2435  * items management example.
2436  * @dontinclude list_example_01.c
2437  * @skipline lbl[]
2438  * @until };
2439  * @skipline for
2440  * @skipline elm_list_item_append
2441  *
2442  * After we just want to show the list. But first we need to start the widget.
2443  * It was done this way to improve widget's performance. So, always remember
2444  * that:
2445  * @warning Call elm_list_go before showing the object
2446  * @skipline elm_list_go
2447  * @skipline show
2448  *
2449  * See the full @ref list_example_01.c "list_example_01.c"
2450  * code, whose window should look like this picture:
2451  *
2452  * @image html screenshots/list_example_01.png
2453  * @image latex screenshots/list_example_01.eps width=\textwidth
2454  *
2455  * @example list_example_01.c
2456  */
2457
2458 /**
2459  * @page list_example_02 List widget example
2460  *
2461  * This code places a single Elementary list widgets on a window,
2462  * exemplifying a part of the widget's API.
2463  *
2464  * First, we will just create a simple list, as done on @ref list_example_01 :
2465  * @dontinclude list_example_02.c
2466  * @skipline lbl
2467  * @until }
2468  * @skipline elm_list_add
2469  * @until elm_list_item_append
2470  *
2471  * Now, let's customize this list a bit. First we will display items
2472  * horizontally:
2473  * @skipline horizontal_set
2474  *
2475  * Then we will choose another list mode. There are four of them, and
2476  * the default #Elm_List_Mode is #ELM_LIST_SCROLL. Let's set compress mode:
2477  * @skipline mode_set
2478  *
2479  * To enable multiple items selection, we need to enable it, since only one
2480  * selected item is allowed by default:
2481  * @skipline elm_list_multi_select_set
2482  *
2483  * We are not adding items with callback functions here,
2484  * since we'll explain it better on  @ref list_example_03. But if the callback
2485  * need to be called everytime user clicks an item, even if already selected,
2486  * it's required to enable this behavior:
2487  * @skipline elm_list_select_mode_set
2488  *
2489  * Finally, if a bounce effect is required, or you would like to see
2490  * scrollbars, it is possible. But, for default theme, list
2491  * scrollbars will be invisible anyway.
2492  * @skipline bounce_set
2493  * @until SCROLLER_POLICY_ON
2494  *
2495  * See the full @ref list_example_02.c "list_example_02.c"
2496  * code, whose window should look like this picture:
2497  *
2498  * @image html screenshots/list_example_02.png
2499  * @image latex screenshots/list_example_02.eps width=\textwidth
2500  *
2501  * @example list_example_02.c
2502  */
2503
2504 /**
2505  * @page list_example_03 List - Items management
2506  *
2507  * This code places an Elementary list widgets on a window,
2508  * along with some buttons trigerring actions on it (though its API).
2509  * It covers most of elm_list_item functions.
2510  *
2511  * On our @c main function, we are adding a default list with
2512  * 3 items. We are only setting their labels (second parameter of function
2513  * elm_list_item_append):
2514  * @dontinclude list_example_03.c
2515  * @skipline elm_list_add
2516  * @until Item 2
2517  *
2518  * Next we are adding lots of buttons, each one for a callback function
2519  * that will realize a task covering part of list items API.
2520  * Lets check the first one:
2521  * @skipline elm_button_add
2522  * @until evas_object_show
2523  *
2524  * We are labeling the button with a task description with
2525  * elm_object_text_set() and setting a callback
2526  * function evas_object_smart_callback_add().
2527  * Each callback function will have the signature:
2528  * <tt> static void _task_cb(void *data, Evas_Object *obj,
2529  * void *event_info)</tt> with the function name varying for each task.
2530  *
2531  * Now let's cover all of them.
2532  *
2533  * <b> Prepending an item: </b>
2534  * @dontinclude list_example_03.c
2535  * @skipline _prepend_cb
2536  * @until }
2537  *
2538  * The item will be placed on the beginning of the list,
2539  * i.e. it will be the first one.
2540  *
2541  * The first parameter of elm_list_item_prepend() is the list
2542  * object, that we are receiving as data on our callback function.
2543  * The second one is a label, the string that will be placed in the center
2544  * of our item. As we don't wan't icons or callback functions, we can
2545  * send NULL as third, fourth, fifth and sixth parameters.
2546  *
2547  * <b> Appending an item: </b>
2548  * @dontinclude list_example_03.c
2549  * @skipline _add_cb
2550  * @until }
2551  *
2552  * Items included with append will be inserted inserted after the last one.
2553  *
2554  * <b> Appending an item with icon: </b>
2555  * @dontinclude list_example_03.c
2556  * @skipline _add_ic_cb
2557  * @until }
2558  *
2559  * If an icon is required, you can pass it as third parameter on our
2560  * elm_list_item_append() function. It will be place on the
2561  * left side of item's label. If an icon is wanted on the right side,
2562  * it should be passed as fourth parameter.
2563  *
2564  * For more details about how to create icons, look for elm_icon examples
2565  * @ref tutorial_icon.
2566  *
2567  * <b> Appending an item with callback function for selected: </b>
2568  * @dontinclude list_example_03.c
2569  * @skipline _sel_cb
2570  * @until }
2571  * @until }
2572  *
2573  * To set a callback function that will be called every time an item is
2574  * selected, i.e., everytime the list stops with this item in
2575  * center position, just pass the function as fifth parameter.
2576  *
2577  * <b> Appending an item with callback function for selected with data: </b>
2578  * @dontinclude list_example_03.c
2579  * @skipline _sel_data_cb
2580  * @until }
2581  * @until }
2582  * @until }
2583  * @until }
2584  *
2585  * If the callback function request an extra data, it can be attached to our
2586  * item passing a pointer for data as sixth parameter.
2587  * Our function _sel_data_cb will receive it as <tt> void *data </tt>.
2588  *
2589  * If you want to free this data, or handle that the way you need when the
2590  * item is deleted, set a callback function for that, with
2591  * elm_object_item_del_cb_set().
2592  *
2593  * As you can see we check if @c it is not @c NULL after appending it.
2594  * If an error happens, we won't try to set a function for it.
2595  *
2596  * <b> Deleting an item: </b>
2597  * @dontinclude list_example_03.c
2598  * @skipline _del_cb(
2599  * @until }
2600  *
2601  * To delete an item we simple need to call elm_object_item_del() with
2602  * a pointer for such item.
2603  *
2604  * If you need, you can get selected item with
2605  * elm_list_selected_item_get(), that will return a pointer for it.
2606  *
2607  * <b> Unselecting an item: </b>
2608  * @dontinclude list_example_03.c
2609  * @skipline _unselect_cb
2610  * @until }
2611  *
2612  * To select an item, you should call elm_list_item_selected_set()
2613  * passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
2614  *
2615  * <b> Printing all items: </b>
2616  * @dontinclude list_example_03.c
2617  * @skipline _print_cb
2618  * @until }
2619  *
2620  * <b> Clearing the list: </b>
2621  * @dontinclude list_example_03.c
2622  * @skipline _clear_cb
2623  * @until }
2624  *
2625  * <b> Selecting the next item: </b>
2626  * @dontinclude list_example_03.c
2627  * @skipline _select_next_cb
2628  * @until }
2629  *
2630  * <b> Inserting after an item: </b>
2631  * @dontinclude list_example_03.c
2632  * @skipline _insert_after_cb
2633  * @until }
2634  *
2635  * <b> Selecting the previous item: </b>
2636  * @dontinclude list_example_03.c
2637  * @skipline _select_prev_cb
2638  * @until }
2639  *
2640  * <b> Inserting before an item: </b>
2641  * @dontinclude list_example_03.c
2642  * @skipline _insert_before_cb
2643  * @until }
2644  *
2645  * If a separator is required, just set an item as such:
2646  * @dontinclude list_example_03.c
2647  * @skipline _set_separator_cb
2648  * @until }
2649  *
2650  * Also an item can be disabled, and the user won't be allowed to (un)select it:
2651  * @dontinclude list_example_03.c
2652  * @skipline _disable_cb
2653  * @until }
2654  *
2655  * See the full @ref list_example_03.c "list_example_03.c"
2656  * code, whose window should look like this picture:
2657  *
2658  * @image html screenshots/list_example_03.png
2659  * @image latex screenshots/list_example_03.eps width=\textwidth
2660  *
2661  * @example list_example_03.c
2662  */
2663
2664 /**
2665  * @page toolbar_example_01 Toolbar Example - Simple Items
2666  *
2667  * This code places an Elementary toolbar widget on a window,
2668  * to exemplify part of the widget's API.
2669  *
2670  * Let's start adding a button to our window, that will have its text
2671  * modified depending on which item is selected. It's used just to exemplify
2672  * how to change a window content from the toolbar.
2673  * @dontinclude toolbar_example_01.c
2674  * @skipline elm_button_add
2675  * @until evas_object_show
2676  *
2677  * Also, we'll need a toolbar widget, obviously:
2678  * @skipline elm_toolbar_add
2679  * @until evas_object_show
2680  *
2681  * When appending an item is possible to set an icon, label, and a callback
2682  * function that will receive passed data.
2683  * @skipline _item_append
2684  * @until Folder
2685  *
2686  * It's possible to disable items, so the user can't select then. We will
2687  * disable the third item:
2688  * @skipline _item_append
2689  * @until disable
2690  *
2691  * Our callbacks will just set button's label:
2692  * @dontinclude toolbar_example_01.c
2693  * @skip static
2694  * @skip }
2695  * @skipline static
2696  * @until }
2697  * @until }
2698  * @until }
2699  *
2700  * By default, toolbars would display items homogeneously, so item with
2701  * long labels, like the third, will make all of them occupy a lot of space.
2702  * To avoid that, we can disable it:
2703  * @dontinclude toolbar_example_01.c
2704  * @skipline homogeneous
2705  *
2706  * Another default behavior, is to add an menu item if we have more items
2707  * that would fit on toolbar size. To simply enable scroll, without menus,
2708  * it's required to change toolbar's shrink mode:
2709  * @dontinclude toolbar_example_01.c
2710  * @skipline shrink
2711  *
2712  * See @ref toolbar_example_01.c "toolbar_example_01.c", whose window should
2713  * look like this picture:
2714  *
2715  * @image html screenshots/toolbar_example_01.png
2716  * @image latex screenshots/toolbar_example_01.eps width=\textwidth
2717  *
2718  * @example toolbar_example_01.c
2719  */
2720
2721 /**
2722  * @page toolbar_example_02 Toolbar Example - Items with States
2723  *
2724  * This code places an Elementary toolbar widget on a window,
2725  * to exemplify part of the widget's API.
2726  *
2727  * Toolbar widgets has support to items with states. Each state
2728  * can have it's own label, icon, and callback function.
2729  *
2730  * Let's start populating a toolbar with some regular items.
2731  * If you don't know how to do that, see
2732  * @ref toolbar_example_01 "Toolbar Example 1".
2733  * @dontinclude toolbar_example_02.c
2734  * @skipline elm_toolbar_add
2735  * @until Update
2736  *
2737  * The only difference here is that we set shrink mode to #ELM_TOOLBAR_SHRINK_HIDE,
2738  * that won't display items that doesn't fit to the window.
2739  *
2740  * Now, let's add an item with states. First, add the item just as any other.
2741  * @skipline elm_toolbar_item_append
2742  * @until _item_pressed
2743  *
2744  * After that states can be added to this item:
2745  * @skipline state_add
2746  * @until Full
2747  * @until _item_pressed
2748  *
2749  * The both states and the item are using the same callback function,
2750  * that will cycle between states and unselect the item. Unseleting
2751  * is required because it won't call the callback if an user clicks
2752  * over an item already selected:
2753  * @dontinclude toolbar_example_02.c
2754  * @skip static
2755  * @skip }
2756  * @skipline static
2757  * @until }
2758  *
2759  * On our example, some items are hidden
2760  * because we set the window to be small. But if an item should be displayed
2761  * anyway, is needed to set its priority to be higher than others.
2762  * Any positive value will be enough in our case. Let's force the item
2763  * with multiple states to be displayed.
2764  * @skipline priority
2765  *
2766  * See @ref toolbar_example_02.c "toolbar_example_02.c", whose window should
2767  * look like this picture:
2768  *
2769  * @image html screenshots/toolbar_example_02.png
2770  * @image latex screenshots/toolbar_example_02.eps width=\textwidth
2771  *
2772  * @example toolbar_example_02.c
2773  */
2774
2775 /**
2776  * @page toolbar_example_03 Toolbar Example - Items with Menus
2777  *
2778  * Toolbar widgets have support to items with menus. This kind
2779  * of item will display a menu when selected by the user.
2780  *
2781  * Let's start populating a toolbar with some regular items, the same
2782  * way we started @ref toolbar_example_02 "Toolbar Example 2".
2783  * @dontinclude toolbar_example_03.c
2784  * @skipline elm_toolbar_add
2785  * @until Update
2786  *
2787  * The only difference is that we'll keep the default shrink mode, that
2788  * adds an item with a menu of hidden items.
2789  *
2790  * So, a important thing to do is to set a parent for toolbar menus, or they
2791  * will use the toolbar as parent, and its size will be restricted to that.
2792  * @skipline parent_set
2793  *
2794  * Not only items' menus will respect this parent, but also the own toolbar
2795  * menu, used to show hidden items.
2796  *
2797  * Next, let's add an item set to display a menu:
2798  * @skipline elm_toolbar_item_append
2799  * @until _menu_set
2800  *
2801  * Now, to add two options to this item, we can get the menu object and use
2802  * it as a regular elm_menu. See @ref tutorial_menu "Menu example" for more
2803  * about menu widget.
2804  * @skipline _menu_get
2805  * @until Full
2806  *
2807  * See @ref toolbar_example_03.c "toolbar_example_03.c", whose window should
2808  * look like this picture:
2809  *
2810  * @image html screenshots/toolbar_example_03.png
2811  * @image latex screenshots/toolbar_example_03.eps width=\textwidth
2812  *
2813  * @example toolbar_example_03.c
2814  */
2815
2816 /**
2817  * @page segment_control_example Segment Control Example
2818  *
2819  * This code places an Elementary segment control widgets on a window,
2820  * to exemplify part of the widget's API.
2821  *
2822  * Let's start adding a segment control to our window:
2823  * @dontinclude segment_control_example.c
2824  * @skipline elm_segment_control_add
2825  * @until evas_object_show
2826  *
2827  * Now will add an item only with label:
2828  * @skipline item_add
2829  *
2830  * Really simple. To add an item with only an icon, the icon needs to be created
2831  * first, them added with this same function:
2832  * @skipline icon_add
2833  * @until item_add
2834  *
2835  * If an item with label and icon is required, it can be done as well. In this
2836  * case, instead of a label (or icon) centered, the item will display an icon
2837  * at left and the label at right:
2838  * @skipline icon_add
2839  * @until item_add
2840  *
2841  * But, if you need to add some items that can have or not a label, but
2842  * want that all of them looks the same way, with icon at left, just add
2843  * an empty string label. It's done on our example to illustrate that:
2844  * @skipline icon_add
2845  * @until item_add
2846  *
2847  * So far, all the item were added to the last position of the widget,
2848  * but if something different is required, it can be done using another
2849  * insertion function. Let's suppose we want to put an item just before
2850  * the last item:
2851  * @skipline count
2852  * @until insert_at
2853  *
2854  * There are two ways to delete items. Using the item handle, like:
2855  * @skipline insert_at
2856  * @until del
2857  *
2858  * Or using item's index:
2859  * @skipline insert_at
2860  * @until del_at
2861  *
2862  * To set properties of an item already added to the widget, you just need
2863  * to get the item and set icon or label, as the following code shows:
2864  * @skipline item_get
2865  * @until label_set
2866  *
2867  * Finally, it's possible to select an item from the code, and also get
2868  * the selected item. We will select the item at the center of the widget
2869  * and print its position.
2870  * @skipline count_get
2871  * @until printf
2872  *
2873  * See the full @ref segment_control_example.c "example", whose window should
2874  * look like this picture:
2875  *
2876  * @image html screenshots/segment_control_example.png
2877  * @image latex screenshots/segment_control_example.eps width=\textwidth
2878  *
2879  * @example segment_control_example.c
2880  */
2881
2882 /**
2883  * @page flipselector_example Flip selector widget example
2884  *
2885  * This code places an Elementary flip selector widget on a window,
2886  * along with two buttons trigerring actions on it (though its API).
2887  *
2888  * The selector is being populated with the following items:
2889  * @dontinclude flipselector_example.c
2890  * @skip lbl[]
2891  * @until ;
2892  *
2893  * Next, we create it, populating it with those items and registering
2894  * two (smart) callbacks on it:
2895  * @dontinclude flipselector_example.c
2896  * @skip fp = elm_flipselector_add
2897  * @until object_show
2898  *
2899  * Those two callbacks will take place whenever one of those smart
2900  * events occur, and they will just print something to @c stdout:
2901  * @dontinclude flipselector_example.c
2902  * @skip underflow callback
2903  * @until }
2904  * @until }
2905  * Flip the sheets on the widget while looking at the items list, in
2906  * the source code, and you'll get the idea of those events.
2907  *
2908  * The two buttons below the flip selector will take the actions
2909  * described in their labels:
2910  * @dontinclude flipselector_example.c
2911  * @skip bt = elm_button_add
2912  * @until callback_add(win
2913  *
2914  * @dontinclude flipselector_example.c
2915  * @skip unselect the item
2916  * @until }
2917  * @until }
2918  *
2919  * Click on them to exercise those flip selector API calls. To
2920  * interact with the other parts of this API, there's a command line
2921  * interface, whose help string can be asked for with the 'h' key:
2922  * @dontinclude flipselector_example.c
2923  * @skip commands
2924  * @until ;
2925  *
2926  * The 'n' and 'p' keys will exemplify elm_flipselector_flip_next()
2927  * and elm_flipselector_flip_prev(), respectively. 'f' and 'l' account
2928  * for elm_flipselector_first_item_get() and
2929  * elm_flipselector_last_item_get(), respectively. Finally, 's' will
2930  * issue elm_flipselector_selected_item_get() on our example flip
2931  * selector widget.
2932  *
2933  * See the full @ref flipselector_example.c "example", whose window should
2934  * look like this picture:
2935  *
2936  * @image html screenshots/flipselector_example.png
2937  * @image latex screenshots/flipselector_example.eps width=\textwidth
2938  *
2939  * See the full @ref flipselector_example_c "source code" for this example.
2940  *
2941  */
2942
2943 /**
2944  * @page fileselector_example File selector widget example
2945  *
2946  * This code places two Elementary file selector widgets on a window.
2947  * The one on the left is layouting file system items in a @b list,
2948  * while the the other is layouting them in a @b grid.
2949  *
2950  * The one having the majority of hooks of interest is on the left,
2951  * which we create as follows:
2952  * @dontinclude fileselector_example.c
2953  * @skip first file selector
2954  * @until object_show
2955  *
2956  * Note that we enable custom edition of file/directory selection, via
2957  * the text entry it has on its bottom, via
2958  * elm_fileselector_is_save_set(). It starts with the list view, which
2959  * is the default, and we make it not expandable in place
2960  * (elm_fileselector_expandable_set()), so that it replaces its view's
2961  * contents with the current directory's entries each time one
2962  * navigates to a different folder.  For both of file selectors we are
2963  * starting to list the contents found in the @c "/tmp" directory
2964  * (elm_fileselector_path_set()).
2965  *
2966  * Note the code setting it to "grid mode" and observe the differences
2967  * in the file selector's views, in the example. We also hide the
2968  * second file selector's Ok/Cancel buttons -- since it's there just
2969  * to show the grid view (and navigation) -- via
2970  * elm_fileselector_buttons_ok_cancel_set().
2971  *
2972  * The @c "done" event, which triggers the callback below
2973  * @dontinclude fileselector_example.c
2974  * @skip 'done' cb
2975  * @until }
2976  * will be called at the time one clicks the "Ok"/"Cancel" buttons of
2977  * the file selector (on the left). Note that it will print the path
2978  * to the current selection, if any.
2979  *
2980  * The @c "selected" event, which triggers the callback below
2981  * @dontinclude fileselector_example.c
2982  * @skip bt = 'selected' cb
2983  * @until }
2984  * takes place when one selects a file (if the file selector is @b not
2985  * under folders-only mode) or when one selects a folder (when in
2986  * folders-only mode). Experiment it by selecting different file
2987  * system entries.
2988  *
2989  * What comes next is the code creating the three check boxes and two
2990  * buttons below the file selector in the right. They will exercise a
2991  * bunch of functions on the file selector's API, for the instance on
2992  * the left. Experiment with them, specially the buttons, to get the
2993  * difference between elm_fileselector_path_get() and
2994  * elm_fileselector_selected_get().
2995  *
2996  * Finally, there's the code adding the second file selector, on the
2997  * right:
2998  * @dontinclude fileselector_example.c
2999  * @skip second file selector
3000  * @until object_show
3001  *
3002  * Pay attention to the code setting it to "grid mode" and observe the
3003  * differences in the file selector's views, in the example. We also
3004  * hide the second file selector's Ok/Cancel buttons -- since it's
3005  * there just to show the grid view (and navigation) -- via
3006  * elm_fileselector_buttons_ok_cancel_set().
3007  *
3008  * See the full @ref fileselector_example.c "example", whose window
3009  * should look like this picture:
3010  *
3011  * @image html screenshots/fileselector_example.png
3012  * @image latex screenshots/fileselector_example.eps width=\textwidth
3013  *
3014  * See the full @ref fileselector_example_c "source code" for this example.
3015  *
3016  */
3017
3018 /**
3019  * @page fileselector_button_example File selector button widget example
3020  *
3021  * This code places an Elementary file selector button widget on a
3022  * window, along with some other checkboxes and a text entry. Those
3023  * are there just as knobs on the file selector button's state and to
3024  * display information from it.
3025  *
3026  * Here's how we instantiate it:
3027  * @dontinclude fileselector_button_example.c
3028  * @skip ic = elm_icon_add
3029  * @until evas_object_show
3030  *
3031  * Note that we set on it both icon and label decorations. It's set to
3032  * list the contents of the @c "/tmp" directory, too, with
3033  * elm_fileselector_button_path_set(). What follows are checkboxes to
3034  * exercise some of its API funtions:
3035  * @dontinclude fileselector_button_example.c
3036  * @skip ck = elm_check_add
3037  * @until evas_object_show(en)
3038  *
3039  * The checkboxes will toggle whether the file selector button's
3040  * internal file selector:
3041  * - must have an editable text entry for file names (thus, be in
3042  *   "save dialog mode")
3043  * - is to be raised as an "inner window" (note it's the default
3044  *   behavior) or as a dedicated window
3045  * - is to populate its view with folders only
3046  * - is to expand its folders, in its view, <b>in place</b>, and not
3047  *   repainting it entirely just with the contents of a sole
3048  *   directory.
3049  *
3050  * The entry labeled @c "Last selection" will exercise the @c
3051  * "file,chosen" smart event coming from the file selector button:
3052  * @dontinclude fileselector_button_example.c
3053  * @skip hook on the
3054  * @until toggle inwin
3055  *
3056  * Whenever you dismiss or acknowledges the file selector, after it's
3057  * raised, the @c event_info string will contain the last selection on
3058  * it (if any was made).
3059  *
3060  * This is how the example, just after called, should look like:
3061  *
3062  * @image html screenshots/fileselector_button_example_00.png
3063  * @image latex screenshots/fileselector_button_example_00.eps width=\textwidth
3064  *
3065  * Click on the file selector button to raise its internal file
3066  * selector, which will be contained on an <b>"inner window"</b>:
3067  *
3068  * @image html screenshots/fileselector_button_example_01.png
3069  * @image latex screenshots/fileselector_button_example_01.eps width=\textwidth
3070  *
3071  * Toggle the "inwin mode" switch off and, if you click on the file
3072  * selector button again, you'll get @b two windows, the original one
3073  * (note the last selection there!)
3074  *
3075  * @image html screenshots/fileselector_button_example_02.png
3076  * @image latex screenshots/fileselector_button_example_02.eps width=\textwidth
3077  *
3078  * and the file selector's new one
3079  *
3080  * @image html screenshots/fileselector_button_example_03.png
3081  * @image latex screenshots/fileselector_button_example_03.eps width=\textwidth
3082  *
3083  * Play with the checkboxes to get the behavior changes on the file
3084  * selector button. The respective API calls on the widget coming from
3085  * those knobs where shown in the code already.
3086  *
3087  * See the full @ref fileselector_button_example_c "source code" for
3088  * this example.
3089  *
3090  */
3091
3092 /**
3093  * @page fileselector_entry_example File selector entry widget example
3094  *
3095  * This code places an Elementary file selector entry widget on a
3096  * window, along with some other checkboxes. Those are there just as
3097  * knobs on the file selector entry's state.
3098  *
3099  * Here's how we instantiate it:
3100  * @dontinclude fileselector_entry_example.c
3101  * @skip ic = elm_icon_add
3102  * @until evas_object_show
3103  *
3104  * Note that we set on it's button both icon and label
3105  * decorations. It's set to exhibit the path of (and list the contents
3106  * of, when internal file selector is launched) the @c "/tmp"
3107  * directory, also, with elm_fileselector_entry_path_set(). What
3108  * follows are checkboxes to exercise some of its API funtions:
3109  * @dontinclude fileselector_entry_example.c
3110  * @skip ck = elm_check_add
3111  * @until callback_add(fs_entry
3112  *
3113  * The checkboxes will toggle whether the file selector entry's
3114  * internal file selector:
3115  * - must have an editable text entry for file names (thus, be in
3116  *   "save dialog mode")
3117  * - is to be raised as an "inner window" (note it's the default
3118  *   behavior) or as a dedicated window
3119  * - is to populate its view with folders only
3120  * - is to expand its folders, in its view, <b>in place</b>, and not
3121  *   repainting it entirely just with the contents of a sole
3122  *   directory.
3123  *
3124  * Observe how the entry's text will match the string coming from the
3125  * @c "file,chosen" smart event:
3126  * @dontinclude fileselector_entry_example.c
3127  * @skip hook on the
3128  * @until }
3129  * Whenever you dismiss or acknowledges the file selector, after it's
3130  * raised, the @c event_info string will contain the last selection on
3131  * it (if any was made).
3132  *
3133  * Try, also, to type in a valid system path and, then, open the file
3134  * selector's window: it will start the file browsing there, for you.
3135  *
3136  * This is how the example, just after called, should look like:
3137  *
3138  * @image html screenshots/fileselector_entry_example_00.png
3139  * @image latex screenshots/fileselector_entry_example_00.eps width=\textwidth
3140  *
3141  * Click on the file selector entry to raise its internal file
3142  * selector, which will be contained on an <b>"inner window"</b>:
3143  *
3144  * @image html screenshots/fileselector_entry_example_01.png
3145  * @image latex screenshots/fileselector_entry_example_01.eps width=\textwidth
3146  *
3147  * Toggle the "inwin mode" switch off and, if you click on the file
3148  * selector entry again, you'll get @b two windows, the original one
3149  * (note the last selection there!)
3150  *
3151  * @image html screenshots/fileselector_entry_example_02.png
3152  * @image latex screenshots/fileselector_entry_example_02.eps width=\textwidth
3153  *
3154  * and the file selector's new one
3155  *
3156  * @image html screenshots/fileselector_entry_example_03.png
3157  * @image latex screenshots/fileselector_entry_example_03.eps width=\textwidth
3158  *
3159  * Play with the checkboxes to get the behavior changes on the file
3160  * selector entry. The respective API calls on the widget coming from
3161  * those knobs where shown in the code already.
3162  *
3163  * See the full @ref fileselector_entry_example_c "source code" for
3164  * this example.
3165  *
3166  */
3167
3168 /**
3169  * @page layout_example_01 Layout - Content, Table and Box
3170  *
3171  * This example shows how one can use the @ref Layout widget to create a
3172  * customized distribution of widgets on the screen, controlled by an Edje theme.
3173  * The full source code for this example can be found at @ref
3174  * layout_example_01_c.
3175  *
3176  * Our custom layout is defined by a file, @ref layout_example_edc, which is an
3177  * Edje theme file. Look for the Edje documentation to understand it. For now,
3178  * it's enough to know that we describe some specific parts on this layout
3179  * theme:
3180  * @li a title text field;
3181  * @li a box container;
3182  * @li a table container;
3183  * @li and a content container.
3184  *
3185  * Going straight to the code, the following snippet instantiates the layout
3186  * widget:
3187  *
3188  * @dontinclude layout_example_01.c
3189  * @skip elm_layout_add
3190  * @until evas_object_show(layout)
3191  *
3192  * As any other widget, we set some properties for the size calculation. But
3193  * notice on this piece of code the call to the function elm_layout_file_set().
3194  * Here is where the theme file is loaded, and particularly the specific group
3195  * from this theme file. Also notice that the theme file here is referenced as
3196  * an .edj, which is a .edc theme file compiled to its binary form. Again, look
3197  * for the Edje documentation for more information about theme files.
3198  *
3199  * Next, we fetch from our theme a data string referenced by the key "title".
3200  * This data was defined in the theme, and can be used as parameters which the
3201  * program get from the specific theme that it is using. In this case, we store
3202  * the title of this window and program in the theme, as a "data" entry, just
3203  * for demonstration purposes:
3204  *
3205  * @until }
3206  *
3207  * This call elm_layout_data_get() is used to fetch the string based on the key,
3208  * and elm_object_part_text_set() will set the part defined in the theme as
3209  * "example/title" to contain this string. This key "example/title" has nothing
3210  * special. It's just an arbitrary convention that we are using in this example.
3211  * Every string in this example referencing a part of this theme will be of the
3212  * form "example/<something>".
3213  *
3214  * Now let's start using our layout to distribute things on the window space.
3215  * Since the layout was added as a resize object to the elementary window, it
3216  * will always occupy the entire space available for this window.
3217  *
3218  * The theme already has a title, and it also defines a table element which is
3219  * positioned approximately between 50% and 70% of the height of this window,
3220  * and has 100% of the width. We create some widgets (two icons, a clock and a
3221  * button) and pack them inside the table, in a distribution similar to a HTML
3222  * table:
3223  *
3224  * @until evas_object_show(bt)
3225  *
3226  * Notice that we just set size hints for every object, and call the function
3227  * elm_layout_table_pack(), which does all the work. It will place the elements
3228  * in the specified row/column, with row and column span if required, and then
3229  * the object's size and position will be controlled by the layout widget. It
3230  * will also respect size hints, alignments and weight properties set to these
3231  * widgets. The resulting distribution on the screen depends on the table
3232  * properties (described in the theme), the size hints set on each widget, and
3233  * on the cells of the table that are being used.
3234  *
3235  * For instance, we add the two icons and the clock on the first, second and
3236  * third cells of the first row, and add the button the second row, making it
3237  * span for 3 columns (thus having the size of the entire table width). This
3238  * will result in a table that has 2 rows and 3 columns.
3239  *
3240  * Now let's add some widgets to the box area of our layout. This box is around
3241  * 20% and 50% of the vertical size of the layout, and 100% of its width. The
3242  * theme defines that it will use an "horizontal flow" distribution to its
3243  * elements. Unlike the table, a box will distribute elements without knowing
3244  * about rows and columns, and the distribution function selected will take care
3245  * of putting them in row, column, both, or any other available layout. This is
3246  * also described in the Edje documentation.
3247  *
3248  * This box area is similar to the @ref Box widget of elementary, with the
3249  * difference that its position and properties are controlled by the theme of the
3250  * layout. It also contains more than one API to add items to it, since the
3251  * items position now is defined in terms of a list of items, not a matrix.
3252  * There's the first position (can have items added to it with
3253  * elm_layout_box_prepend()), the last position (elm_layout_box_append()), the
3254  * nth position (elm_layout_box_insert_at()) and the position right before an
3255  * element (elm_layout_box_insert_before()). We use insert_at and prepend
3256  * functions to add the first two buttons to this box, and insert_before on the
3257  * callback of each button. The callback code will be shown later, but it
3258  * basically adds a button just before the clicked button using the
3259  * elm_layout_box_insert_before() function. Here's the code for adding the first
3260  * 2 buttons:
3261  *
3262  * @until evas_object_show(item)
3263  * @until evas_object_show(item)
3264  *
3265  * Finally, we have an area in this layout theme, in the bottom part of it,
3266  * reserved for adding an specific widget. Differently from the 2 parts
3267  * described until now, this one can only receive one widget with the call
3268  * elm_object_part_content_set() for the layout. If there was already an item on this specific part,
3269  * it will be deleted (one can use elm_object_part_content_unset() in order to remove
3270  * it without deleting). An example of removing it without deleting, but
3271  * manually deleting this widget just after that, can be seen on the callback
3272  * for this button. Actually, the callback defined for this button will clean
3273  * the two other parts (deleting all of their elements) and then remove and
3274  * delete this button.
3275  *
3276  * @until _swallow_btn_cb
3277  *
3278  * Also notice that, for this last added button, we don't have to call
3279  * evas_object_show() on it. This is a particularity of the theme for layouts,
3280  * that will have total control over the properties like size, position,
3281  * visibility and clipping of a widget added with elm_object_part_content_set().
3282  * Again, read the Edje documentation to understand this better.
3283  *
3284  * Now we just put the code for the different callbacks specified for each kind
3285  * of button and make simple comments about them:
3286  *
3287  * @dontinclude layout_example_01.c
3288  * @skip static void
3289  * @until evas_object_del(item)
3290  * @until }
3291  *
3292  * The first callback is used for the button in the table, and will just remove
3293  * itself from the table with elm_layout_table_unpack(), which remove items
3294  * without deleting them, and then calling evas_object_del() on itself.
3295  *
3296  * The second callback is for buttons added to the box. When clicked, these
3297  * buttons will create a new button, and add them to the same box, in the
3298  * position just before the clicked button.
3299  *
3300  * And the last callback is for the button added to the "content" area. It will
3301  * clear both the table and the box, passing @c EINA_TRUE to their respective @c
3302  * clear parameters, which will imply on the items of these containers being
3303  * deleted.
3304  *
3305  * A screenshot of this example can be seen on:
3306  *
3307  * @image html screenshots/layout_example_01.png
3308  * @image latex screenshots/layout_example_01.eps width=\textwidth
3309  *
3310  */
3311
3312 /**
3313  * @page layout_example_02 Layout - Predefined Layout
3314  *
3315  * This example shows how one can use the @ref Layout with a predefined theme
3316  * layout to add a back and next button to a simple window. The full source code
3317  * for this example can be found at @ref layout_example_02_c.
3318  *
3319  * After setting up the window and background, we add the layout widget to the
3320  * window. But instead of using elm_layout_file_set() to load its theme from a
3321  * custom theme file, we can use elm_layout_theme_set() to load one of the
3322  * predefined layouts that come with elementary. Particularly on this example,
3323  * we load the them of class "layout", group "application" and style
3324  * "content-back-next" (since we want the back and next buttons).
3325  *
3326  * @dontinclude layout_example_02.c
3327  * @skip elm_layout_add
3328  * @until evas_object_show(layout)
3329  *
3330  * This default theme contains only a "content" area named
3331  * "elm.swallow.content", where we can add any widget (it can be even a
3332  * container widget, like a box, frame, list, or even another layout). Since we
3333  * just want to show the resulting layout, we add a simple icon to it:
3334  *
3335  * @until layout_content_set
3336  *
3337  * This default layout also provides some signals when the next and prev buttons
3338  * are clicked. We can register callbacks to them with the
3339  * elm_object_signal_callback_add() function:
3340  *
3341  * @until elm,action,next
3342  *
3343  * In the @ref layout_example_03 you can see how to send signals to the layout with
3344  * elm_object_signal_emit().
3345  *
3346  * Now our callback just changes the picture being displayed when one of the
3347  * buttons are clicked:
3348  *
3349  * @dontinclude layout_example_02.c
3350  * @skip images
3351  * @until standard_set
3352  * @until }
3353  *
3354  * It's possible to see that it gets the name of the image being shown from the
3355  * array of image names, going forward on this array when "next" is clicked and
3356  * backward when "back" is clicked.
3357  *
3358  * A screenshot of this example can be seen on:
3359  *
3360  * @image html screenshots/layout_example_02.png
3361  * @image latex screenshots/layout_example_02.eps width=\textwidth
3362  */
3363
3364 /**
3365  * @page layout_example_03 Layout - Signals and Size Changed
3366  *
3367  * This example shows how one can send and receive signals to/from the layout,
3368  * and what to do when the layout theme has its size changed. The full source
3369  * code for this example can be found at @ref layout_example_03_c.
3370  *
3371  * In this exmaple we will use another group from the same layout theme file
3372  * used in @ref layout_example_01. Its instantiation and loading happens in the
3373  * following lines:
3374  *
3375  * @dontinclude layout_example_03.c
3376  * @skip elm_layout_add
3377  * @until evas_object_show
3378  *
3379  * This time we register a callback to be called whenever we receive a signal
3380  * after the end of the animation that happens in this layout:
3381  *
3382  * @until signal_callback_add
3383  *
3384  * We also add a button that will send signals to the layout:
3385  *
3386  * @until callback_add
3387  *
3388  * The callback for this button will check what type of signal it should send,
3389  * and then emit it. The code for this callback follows:
3390  *
3391  * @dontinclude layout_example_03.c
3392  * @skip static Eina_Bool
3393  * @until Enlarge
3394  * @until }
3395  * @until }
3396  *
3397  * As we said before, we are receiving a signal whenever the animation started
3398  * by the button click ends. This is the callback for that signal:
3399  *
3400  * @until }
3401  *
3402  * Notice from this callback that the elm_layout_sizing_eval() function must be
3403  * called if we want our widget to update its size after the layout theme having
3404  * changed its minimum size. This happens because the animation specified in the
3405  * theme increases the size of the content area to a value higher than the
3406  * widget size, thus requiring more space. But the elementary layout widget
3407  * has no way to know this, thus needing the elm_layout_sizing_eval() to
3408  * be called on the layout, informing that this size has changed.
3409  *
3410  * A screenshot of this example can be seen on:
3411  *
3412  * @image html screenshots/layout_example_03.png
3413  * @image latex screenshots/layout_example_03.eps width=\textwidth
3414  */
3415
3416 /**
3417  * @page tutorial_hover Hover example
3418  * @dontinclude hover_example_01.c
3419  *
3420  * On this example we are going to have a button that when clicked will show our
3421  * hover widget, this hover will have content set on it's left, top, right and
3422  * middle positions. In the middle position we are placing a button that when
3423  * clicked will hide the hover. We are also going to use a non-default theme
3424  * for our hover. We won't explain the functioning of button for that see @ref
3425  * Button.
3426  *
3427  * We start our example with a couple of callbacks that show and hide the data
3428  * they're given(which we'll see later on is the hover widget):
3429  * @skip static
3430  * @until }
3431  * @until }
3432  *
3433  * In our main function we'll do some initialization and then create 3
3434  * rectangles, one red, one green and one blue to use in our hover. We'll also
3435  * create the 2 buttons that will show and hide the hover:
3436  * @until show(bt2)
3437  *
3438  * With all of that squared away we can now get to the heart of the matter,
3439  * creating our hover widget, which is easy as pie:
3440  * @until hover
3441  *
3442  * Having created our hover we now need to set the parent and target. Which if
3443  * you recall from the function documentations are going to tell the hover which
3444  * area it should cover and where it should be centered:
3445  * @until bt
3446  *
3447  * Now we set the theme for our hover. We're using the popout theme which gives
3448  * our contents a white background and causes their appearance to be animated:
3449  * @until popout
3450  *
3451  * And finally we set the content for our positions:
3452  * @until bt2
3453  *
3454  * So far so good? Great 'cause that's all there is too it, what is left now is
3455  * just connecting our buttons to the callbacks we defined at the beginning of
3456  * the example and run the main loop:
3457  * @until ELM_MAIN
3458  *
3459  * Our example will initially look like this:
3460  *
3461  * @image html screenshots/hover_example_01.png
3462  * @image latex screenshots/hover_example_01.eps width=\textwidth
3463  *
3464  * And after you click the "Show hover" button it will look like this:
3465  *
3466  * @image html screenshots/hover_example_01_a.png
3467  * @image latex screenshots/hover_example_01_a.eps width=\textwidth
3468  *
3469  * @example hover_example_01.c
3470  */
3471
3472 /**
3473   * @page tutorial_flip Flip example
3474   * @dontinclude flip_example_01.c
3475   *
3476   * This example will show a flip with two rectangles on it(one blue, one
3477   * green). Our example will allow the user to choose the animation the flip
3478   * uses and to interact with it. To allow the user to choose the interaction
3479   * mode we use radio buttons, we will however not explain them, if you would
3480   * like to know more about radio buttons see @ref Radio.
3481   *
3482   * We start our example with the usual setup and then create the 2 rectangles
3483   * we will use in our flip:
3484   * @until show(rect2)
3485   *
3486   * The next thing to do is to create our flip and set it's front and back
3487   * content:
3488   * @until show
3489   *
3490   * The next thing we do is set the interaction mode(which the user can later
3491   * change) to the page animation:
3492   * @until PAGE
3493   *
3494   * Setting a interaction mode however is not sufficient, we also need to
3495   * choose which directions we allow interaction from, for this example we
3496   * will use all of them:
3497   * @until RIGHT
3498   *
3499   * We are also going to set the hintsize to the entire flip(in all directions)
3500   * to make our flip very easy to interact with:
3501   * @until RIGHT
3502   *
3503   * After that we create our radio buttons and start the main loop:
3504   * @until ELM_MAIN()
3505   *
3506   * When the user clicks a radio button a function that changes the
3507   * interaction mode and animates the flip is called:
3508   * @until }
3509   * @note The elm_flip_go() call here serves no purpose other than to
3510   * illustrate that it's possible to animate the flip programmatically.
3511   *
3512   * Our example will look like this:
3513   *
3514   * @image html screenshots/flip_example_01.png
3515   * @image latex screenshots/flip_example_01.eps width=\textwidth
3516   *
3517   * @note Since this is an animated example the screenshot doesn't do it
3518   * justice, it is a good idea to compile it and see the animations.
3519   *
3520   * @example flip_example_01.c
3521   */
3522
3523  /**
3524   * @page tutorial_label Label example
3525   * @dontinclude label_example_01.c
3526   *
3527   * In this example we are going to create 6 labels, set some properties on
3528   * them and see what changes in appearance those properties cause.
3529   *
3530   * We start with the setup code that by now you should be familiar with:
3531   * @until elm_win_autodel_set
3532   *
3533   * For our first label we have a moderately long text(that doesn't fit in the
3534   * label's width) so we will make it a sliding label. Since the text isn't
3535   * too long we don't need the animation to be very long, 3 seconds should
3536   * give us a nice speed:
3537   * @until show(label
3538   *
3539   * For our second label we have the same text, but this time we aren't going
3540   * to have it slide, we're going to ellipsize it. Because we ask our label
3541   * widget to ellipsize the text it will first diminsh the fontsize so that it
3542   * can show as much of the text as possible:
3543   * @until show(label
3544   *
3545   * For the third label we are going to ellipsize the text again, however this
3546   * time to make sure the fontsize isn't diminshed we will set a line wrap.
3547   * The wrap won't actually cause a line break because we set the label to
3548   * ellipsize:
3549   * @until show(label
3550   *
3551   * For our fourth label we will set line wrapping but won't set ellipsis, so
3552   * that our text will indeed be wrapped instead of ellipsized. For this label
3553   * we choose character wrap:
3554   * @until show(label
3555   *
3556   * Just two more, for our fifth label we do the same as for the fourth
3557   * except we set the wrap to word:
3558   * @until show(label
3559   *
3560   * And last but not least for our sixth label we set the style to "marker" and
3561   * the color to red (the default color is white which would be hard to see on
3562   * our white background):
3563   * @until show(label
3564   *
3565   * Our example will look like this:
3566   *
3567   * @image html screenshots/label_example_01.png
3568   * @image latex screenshots/label_example_01.eps width=\textwidth
3569   *
3570   * @example label_example_01.c
3571   */
3572
3573  /**
3574   * @page tutorial_image Image example
3575   * @dontinclude image_example_01.c
3576   *
3577   * This example is as simple as possible. An image object will be added to the
3578   * window over a white background, and set to be resizable together with the
3579   * window. All the options set through the example will affect the behavior of
3580   * this image.
3581   *
3582   * We start with the code for creating a window and its background, and also
3583   * add the code to write the path to the image that will be loaded:
3584   *
3585   * @skip int
3586   * @until snprintf
3587   *
3588   * Now we create the image object, and set that file to be loaded:
3589   *
3590   * @until }
3591   *
3592   * We can now go setting our options.
3593   *
3594   * elm_image_no_scale_set() is used just to set this value to true (we
3595   * don't want to scale our image anyway, just resize it).
3596   *
3597   * elm_image_resizable_set() is used to allow the image to be resized to a size
3598   * smaller than the original one, but not to a size bigger than it.
3599   *
3600   * elm_image_smooth_set() will disable the smooth scaling, so the scale
3601   * algorithm used to scale the image to the new object size is going to be
3602   * faster, but with a lower quality.
3603   *
3604   * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
3605   * diagonal.
3606   *
3607   * elm_image_aspect_fixed_set() is used to keep the original aspect
3608   * ratio of the image, even when the window is resized to another aspect ratio.
3609   *
3610   * elm_image_fill_outside_set() is used to ensure that the image will fill the
3611   * entire area available to it, even if keeping the aspect ratio. The image
3612   * will overflow its width or height (any of them that is necessary) to the
3613   * object area, instead of resizing the image down until it can fit entirely in
3614   * this area.
3615   *
3616   * elm_image_editable_set() is used just to cover the API, but won't affect
3617   * this example since we are not using any copy & paste property.
3618   *
3619   * This is the code for setting these options:
3620   *
3621   * @until editable
3622   *
3623   * Now some last touches in our object size hints, window and background, to
3624   * display this image properly:
3625   *
3626   * @until ELM_MAIN
3627   *
3628   * This example will look like this:
3629   *
3630   * @image html screenshots/image_example_01.png
3631   * @image latex screenshots/image_example_01.eps width=\textwidth
3632   *
3633   * @example image_example_01.c
3634   */
3635
3636  /**
3637   * @page tutorial_icon Icon example
3638   * @dontinclude icon_example_01.c
3639   *
3640   * This example is as simple as possible. An icon object will be added to the
3641   * window over a white background, and set to be resizable together with the
3642   * window. All the options set through the example will affect the behavior of
3643   * this icon.
3644   *
3645   * We start with the code for creating a window:
3646   *
3647   * @skip int
3648   * @until elm_win_autodel_set
3649   *
3650   * Now we create the icon object, and set lookup order of the icon, and choose
3651   * the "home" icon:
3652   *
3653   * @until elm_icon_standard_set
3654   *
3655   * An interesting thing is that after setting this, it's possible to check where
3656   * in the filesystem is the theme used by this icon, and the name of the group
3657   * used:
3658   *
3659   * @until printf
3660   *
3661   * We can now go setting our options.
3662   *
3663   * elm_image_no_scale_set() is used just to set this value to true (we
3664   * don't want to scale our icon anyway, just resize it).
3665   *
3666   * elm_image_resizable_set() is used to allow the icon to be resized to a size
3667   * smaller than the original one, but not to a size bigger than it.
3668   *
3669   * elm_image_smooth_set() will disable the smooth scaling, so the scale
3670   * algorithm used to scale the icon to the new object size is going to be
3671   * faster, but with a lower quality.
3672   *
3673   * elm_image_fill_outside_set() is used to ensure that the icon will fill the
3674   * entire area available to it, even if keeping the aspect ratio. The icon
3675   * will overflow its width or height (any of them that is necessary) to the
3676   * object area, instead of resizing the icon down until it can fit entirely in
3677   * this area.
3678   *
3679   * This is the code for setting these options:
3680   *
3681   * @until fill_outside
3682   *
3683   * However, if you try this example you may notice that this image is not being
3684   * affected by all of these options. This happens because the used icon will be
3685   * from elementary theme, and thus it has its own set of options like smooth
3686   * scaling and fill_outside options. You can change the "home" icon to use some
3687   * image (from your system) and see that then those options will be respected.
3688   *
3689   * Now some last touches in our object size hints, window and background, to
3690   * display this icon properly:
3691   *
3692   * @until ELM_MAIN
3693   *
3694   * This example will look like this:
3695   *
3696   * @image html screenshots/icon_example_01.png
3697   * @image latex screenshots/icon_example_01.eps width=\textwidth
3698   *
3699   * @example icon_example_01.c
3700   */
3701
3702 /**
3703  * @page tutorial_hoversel Hoversel example
3704  * @dontinclude hoversel_example_01.c
3705  *
3706  * In this example we will create a hoversel with 3 items, one with a label but
3707  * no icon and two with both a label and an icon. Every item that is clicked
3708  * will be deleted, but everytime the hoversel is activated we will also add an
3709  * item. In addition our first item will print all items when clicked and our
3710  * third item will clear all items in the hoversel.
3711  *
3712  * We will start with the normal creation of window stuff:
3713  * @until show(bg)
3714  *
3715  * Next we will create a red rectangle to use as the icon of our hoversel:
3716  * @until show
3717  *
3718  * And now we create our hoversel and set some of it's properties. We set @p win
3719  * as its parent, ask it to not be horizontal(be vertical) and give it a label
3720  * and icon:
3721  * @until "icon", rect)
3722  *
3723  * Next we will add our three items, setting a callback to be called for the
3724  * first and third:
3725  * @until _rm_items
3726  *
3727  * We also set a pair of callbacks to be called whenever any item is selected or
3728  * when the hoversel is activated:
3729  * @until clicked
3730  *
3731  * And then ask that our hoversel be shown and run the main loop:
3732  * @until ELM_MAIN
3733  *
3734  * We now have the callback for our first item which prints all items in the
3735  * hoversel:
3736  * @until }
3737  *
3738  * Next we have the callback for our third item which removes all items from the
3739  * hoversel:
3740  * @until }
3741  *
3742  * Next we have the callback that is called whenever an item is clicked and
3743  * deletes that item:
3744  * @until }
3745  *
3746  * And the callback that is called when the hoversel is activated and adds an
3747  * item to the hoversel. Note that since we allocate memory for the item we need
3748  * to know when the item dies so we can free that memory:
3749  * @until }
3750  *
3751  * And finally the callback that frees the memory we allocated for items created
3752  * in the @p _add_item callback:
3753  * @until }
3754  *
3755  * Our example will initially look like this:
3756  *
3757  * @image html screenshots/hoversel_example_01.png
3758  * @image latex screenshots/hoversel_example_01.eps width=\textwidth
3759  *
3760  * And when the hoversel is clicked it will look like this:
3761  *
3762  * @image html screenshots/hoversel_example_01_a.png
3763  * @image latex screenshots/hoversel_example_01_a.eps width=\textwidth
3764  *
3765  * @example hoversel_example_01.c
3766  */
3767
3768 /**
3769  * @page conformant_example Conformant Example.
3770  *
3771  * In this example we'll explain how to create applications to work
3772  * with illume, considering space required for virtual keyboards, indicator
3773  * and softkeys.
3774  *
3775  * Illume is a module for Enlightenment that modifies the user interface
3776  * to work cleanly and nicely on a mobile device. It has support for
3777  * virtual keyboard, among other nice features.
3778  *
3779  * Let's start creating a very simple window with a vertical box
3780  * with multi-line entry between two buttons.
3781  * This entry will expand filling all space on window not used by buttons.
3782  *
3783  * @dontinclude conformant_example_01.c
3784  * @skipline elm_main
3785  * @until }
3786  *
3787  * For information about how to create windows, boxes, buttons or entries,
3788  * look for documentation for these widgets.
3789  *
3790  * It will looks fine when you don't need a virtual keyboard, as you
3791  * can see on the following image:
3792  *
3793  * @image html screenshots/conformant_example_01.png
3794  * @image latex screenshots/conformant_example_01.eps width=\textwidth
3795  *
3796  * But if you call a virtual keyboard, the window will resize, changing
3797  * widgets size and position. All the content will shrink.
3798  *
3799  * If you don't want such behaviour, you
3800  * will need a conformant to account for space taken up by the indicator,
3801  * virtual keyboard and softkey.
3802  *
3803  * In this case, using the conformant in a proper way, you will have
3804  * a window like the following:
3805  *
3806  * @image html screenshots/conformant_example_02.png
3807  * @image latex screenshots/conformant_example_02.eps width=\textwidth
3808  *
3809  * As you can see, it guess the space that will be required by the keyboard,
3810  * indicator and softkey bars.
3811  *
3812  * So, let's study each step required to transform our initial example on
3813  * the second one.
3814  *
3815  * First of all, we need to set the window as an illume conformant window:
3816  * @dontinclude conformant_example_02.c
3817  * @skipline elm_win_conformant_set
3818  *
3819  * Next, we'll add a conformant widget, and set it to resize with the window,
3820  * instead of the box.
3821  * @skipline conform
3822  * @until evas_object_show
3823  *
3824  * Finally, we'll set the box as conformant's content, just like this:
3825  * @skipline elm_object_content_set
3826  *
3827  * Compare both examples code:
3828  * @ref conformant_example_01.c "conformant_example_01.c"
3829  * @ref conformant_example_02.c "conformant_example_02.c"
3830  *
3831  * @example conformant_example_01.c
3832  * @example conformant_example_02.c
3833  */
3834
3835 /**
3836  * @page index_example_01 Index widget example 1
3837  *
3838  * This code places an Elementary index widget on a window, which also
3839  * has a very long list of arbitrary strings on it.  The list is
3840  * sorted alphabetically and the index will be used to index the first
3841  * items of each set of strings beginning with an alphabet letter.
3842  *
3843  * Below the list are some buttons, which are there just to exercise
3844  * some index widget's API.
3845  *
3846  * Here's how we instantiate it:
3847  * @dontinclude index_example_01.c
3848  * @skip elm_list_add
3849  * @until evas_object_show(d.index)
3850  * where we're showing also the list being created. Note that we issue
3851  * elm_win_resize_object_add() on the index, so that it's set to have
3852  * the whole window as its container. Then, we have to populate both
3853  * list and index widgets:
3854  * @dontinclude index_example_01.c
3855  * @skip for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
3856  * @until }
3857  * @until }
3858  *
3859  * The strings populating the list come from a file
3860  * @dontinclude index_example_01.c
3861  * @skip static const char *dict
3862  * @until }
3863  *
3864  * We use the @c curr char variable to hold the last initial letter
3865  * seen on that ordered list of strings, so that we're able to have an
3866  * index item pointing to each list item starting a new letter
3867  * "section". Note that our index item data pointers will be the list
3868  * item handles. We are also setting a callback function to index
3869  * items deletion events:
3870  * @dontinclude index_example_01.c
3871  * @skip static void
3872  * @until }
3873  *
3874  * There, we show you that the @c event_info pointer will contain the
3875  * item in question's data, i.e., a given list item's pointer. Because
3876  * item data is also returned in the @c data argument on
3877  * @c Evas_Smart_Cb functions, those two pointers must have the same
3878  * values. On this deletion callback, we're deleting the referred list
3879  * item too, just to exemplify that anything could be done there.
3880  *
3881  * Next, we hook to two smart events of the index object:
3882  * @dontinclude index_example_01.c
3883  * @skip smart_callback_add(d.index
3884  * @until _index_selected
3885  * @dontinclude index_example_01.c
3886  * @skip "delay,changed" hook
3887  * @until }
3888  * @until }
3889  *
3890  * Check that, whenever one holds the mouse pressed over a given index
3891  * letter for some time, the list beneath it will roll down to the
3892  * item pointed to by that index item. When one releases the mouse
3893  * button, the second callback takes place. There, we check that the
3894  * reported item data, on @c event_info, is the same reported by
3895  * elm_index_selected_item_get(), which gives the last selection's
3896  * data on the index widget.
3897  *
3898  * The first of the three buttons that follow will call
3899  * elm_index_autohide_disabled_set(), thus showing the index automatically for
3900  * you, if it's not already visible, what is checked with
3901  * elm_index_autohide_disabled_get(). The second button will exercise @b deletion
3902  * of index item objects, by the following code:
3903  * @dontinclude index_example_01.c
3904  * @skip delete an index item
3905  * @until }
3906  *
3907  * It will get the last index item selected's data and find the
3908  * respective index item handle(#Elm_Object_Item) with elm_index_item_find().
3909  * We need the latter to query the indexing letter string from, with
3910  * elm_index_item_letter_get(). Next, comes the delition, itself,
3911  * which will also trigger the @c _index_item_del callback function,
3912  * as said above.
3913  *
3914  * The third button, finally, will exercise elm_index_item_clear(),
3915  * which will delete @b all of the index's items.
3916  *
3917  * This is how the example program's window looks like with the index
3918  * widget hidden:
3919  * @image html screenshots/index_example_00.png
3920  * @image latex screenshots/index_example_00.eps
3921  *
3922  * When it's shown, it's like the following figure:
3923  * @image html screenshots/index_example_01.png
3924  * @image latex screenshots/index_example_01.eps
3925  *
3926  * See the full @ref index_example_01_c "source code" for
3927  * this example.
3928  *
3929  */
3930
3931 /**
3932  * @page index_example_02 Index widget example 2
3933  *
3934  * This code places an Elementary index widget on a window, indexing
3935  * grid items. The items are placed so that their labels @b don't
3936  * follow any order, but the index itself is ordered (through
3937  * elm_index_item_sorted_insert()). This is a complement to to @ref
3938  * index_example_01 "the first example on indexes".
3939  *
3940  * Here's the list of item labels to be used on the grid (in that
3941  * order):
3942  * @dontinclude index_example_02.c
3943  * @skip static const char *items
3944  * @until };
3945  *
3946  * In the interesting part of the code, here, we first instantiate the
3947  * grid (more on grids on their examples) and, after creating our
3948  * index, for each grid item we also create an index one to reference
3949  * it:
3950  * @dontinclude index_example_02.c
3951  * @skip grid = elm_gengrid_add
3952  * @until }
3953  * @until smart_callback_add
3954  *
3955  * The order in which they'll appear in the index, though, is @b
3956  * alphabetical, becase of elm_index_item_sorted_insert() usage
3957  * together with the comparing function, where we take the letters of
3958  * each index item to base our ordering on. The parameters on
3959  * @c _index_cmp have to be declared as void pointers because of the
3960  * @c Eina_Compare_Cb prototype requisition, but in this case we know
3961  * they'll be index item(#Elm_Object_Item)'s:
3962  * @dontinclude index_example_02.c
3963  * @skip ordering alphabetically
3964  * @until }
3965  *
3966  * The last interesting bit is the callback in the @c "delay,changed"
3967  * smart event, which will bring the given grid item to the grid's
3968  * visible area:
3969  * @dontinclude index_example_02.c
3970  * @skip static void
3971  * @until }
3972  *
3973  * Note how the grid will move kind of randomly while you move your
3974  * mouse pointer held over the index from top to bottom -- that's
3975  * because of the the random order the items have in the grid itself.
3976  *
3977  * This is how the example program's window looks like:
3978  * @image html screenshots/index_example_03.png
3979  * @image latex screenshots/index_example_03.eps
3980  *
3981  * See the full @ref index_example_02.c "source code" for
3982  * this example.
3983  *
3984  */
3985
3986 /**
3987  * @page tutorial_ctxpopup Ctxpopup example
3988  * @dontinclude ctxpopup_example_01.c
3989  *
3990  * In this example we have a list with two items, when either item is clicked
3991  * a ctxpopup for it will be shown. Our two ctxpopups are quite different, the
3992  * one for the first item is a vertical and it's items contain both labels and
3993  * icons, the one for the second item is horizontal and it's items have icons
3994  * but not labels.
3995  *
3996  * We will begin examining our example code by looking at the callback we'll use
3997  * when items in the ctxpopup are clicked. It's very simple, all it does is
3998  * print the label present in the ctxpopup item:
3999  * @until }
4000  *
4001  * Next we examine a function that creates ctxpopup items, it was created to
4002  * avoid repeating the same code whenever we needed to add an item to our
4003  * ctxpopup. Our function creates an icon from the standard set of icons, and
4004  * then creates the item, with the label received as an argument. We also set
4005  * the callback to be called when the item is clicked:
4006  * @until }
4007  *
4008  * Finally we have the function that will create the ctxpopup for the first item
4009  * in our list. This one is somewhat more complex though, so let's go through it
4010  * in parts. First we declare our variable and add the ctxpopup:
4011  * @until ctxpopup_add
4012  *
4013  * Next we create a bunch of items for our ctxpopup, marking two of them as
4014  * disabled just so we can see what that will look like:
4015  * @until disabled_set
4016  * @until disabled_set
4017  *
4018  * Then we ask evas where the mouse pointer was so that we can have our ctxpopup
4019  * appear in the right place, set a maximum size for the ctxpopup, move it and
4020  * show it:
4021  * @until show
4022  *
4023  * And last we mark the list item as not selected:
4024  * @until }
4025  *
4026  * Our next function is the callback that will create the ctxpopup for the
4027  * second list item, it is very similar to the previous function. A couple of
4028  * interesting things to note is that we ask our ctxpopup to be horizontal, and
4029  * that we pass NULL as the label for every item:
4030  * @until }
4031  *
4032  * And with all of that in place we can now get to our main function where we
4033  * create the window, the list, the list items and run the main loop:
4034  * @until ELM_MAIN()
4035  *
4036  * The example will initially look like this:
4037  *
4038  * @image html screenshots/ctxpopup_example_01.png
4039  * @image latex screenshots/ctxpopup_example_01.eps width=\textwidth
4040  *
4041  * @note This doesn't show the ctxpopup tough, since it will only appear when
4042  * we click one of the list items.
4043  *
4044  * Here is what our first ctxpopup will look like:
4045  *
4046  * @image html screenshots/ctxpopup_example_01_a.png
4047  * @image latex screenshots/ctxpopup_example_01_a.eps width=\textwidth
4048  *
4049  * And here the second ctxpopup:
4050  *
4051  * @image html screenshots/ctxpopup_example_01_b.png
4052  * @image latex screenshots/ctxpopup_example_01_b.eps width=\textwidth
4053  *
4054  * @example ctxpopup_example_01.c
4055  */
4056
4057 /**
4058  * @page tutorial_separator Separator example
4059  * @dontinclude separator_example_01.c
4060  *
4061  * In this example we are going to pack two rectangles in a box, and have a
4062  * separator in the middle.
4063  *
4064  * So we start we the window, background, box and rectangle creation, all pretty
4065  * normal stuff:
4066  * @until pack_end
4067  *
4068  * Once we have our first rectangle in the box we create and add our separator:
4069  * @until pack_end
4070  * @note Since our box is in horizontal mode it's a good idea to set the
4071  * separator to be horizontal too.
4072  *
4073  * And now we add our second rectangle and run the main loop:
4074  * @until ELM_MAIN
4075  *
4076  * This example will look like this:
4077  *
4078  * @image html screenshots/separator_example_01.png
4079  * @image latex screenshots/separator_example_01.eps width=\textwidth
4080  *
4081  * @example separator_example_01.c
4082  */
4083
4084 /**
4085  * @page tutorial_radio Radio example
4086  * @dontinclude radio_example_01.c
4087  *
4088  * In this example we will create 4 radio buttons, three of them in a group and
4089  * another one not in the group. We will also have the radios in the group
4090  * change the value of a variable directly and have then print it when the value
4091  * changes. The fourth button is in the example just to make clear that radios
4092  * outside the group don't affect the group.
4093  *
4094  * We'll start with the usual includes:
4095  * @skipline #include
4096  *
4097  * And move right to declaring a static variable(the one whose value the radios
4098  * will change):
4099  * @until static
4100  *
4101  * We now need to have a window and all that good stuff to be able to place our
4102  * radios in:
4103  * @until show(bx)
4104  *
4105  * And now we create a radio button, since this is the first button in our group
4106  * we set the group to be the radio(so we can set the other radios in the same
4107  * group). We also set the state value of this radio to 1 and the value pointer
4108  * to @p val, since val is @p 1 this has the additional effect of setting the
4109  * radio value to @p 1. For this radio we choose the default home icon:
4110  * @until show
4111  *
4112  * To check that our radio buttons are working we'll add a callback to the
4113  * "changed" signal of the radio:
4114  * @until smart_callback
4115  *
4116  * The creation of our second radio button is almost identical, the 2
4117  * differences worth noting are, the value of this radio 2 and that we add this
4118  * radio to the group of the first radio:
4119  * @until smart_callback
4120  *
4121  * For our third callback we'll omit the icon and set the value to 3, we'll also
4122  * add it to the group of the first radio:
4123  * @until smart_callback
4124  *
4125  * Our fourth callback has a value of 4, no icon and most relevantly is not a
4126  * member of the same group as the other radios:
4127  * @until show
4128  *
4129  * We finally run the main loop:
4130  * @until ELM_MAIN
4131  *
4132  * And the last detail in our example is the callback that prints @p val so that
4133  * we can see that the radios are indeed changing its value:
4134  * @until }
4135  *
4136  * The example will look like this:
4137  *
4138  * @image html screenshots/radio_example_01.png
4139  * @image latex screenshots/radio_example_01.eps width=\textwidth
4140  *
4141  * @example radio_example_01.c
4142  */
4143
4144 /**
4145  * @page tutorial_panel Panel example
4146  * @dontinclude panel_example_01.c
4147  *
4148  * In this example will have 3 panels, one for each possible orientation. Two of
4149  * our panels will start out hidden, the third will start out expanded. For each
4150  * of the panels we will use a label as the content, it's however possible to
4151  * have any widget(including containers) as the content of panels.
4152  *
4153  * We start by doing some setup, code you should be familiar with from other
4154  * examples:
4155  * @until show(bx)
4156  *
4157  * And move right to creating our first panel, for this panel we are going to
4158  * choose the orientation as TOP and toggle it(tell it to hide itself):
4159  * @until pack_end
4160  *
4161  * For the second panel we choose the RIGHT orientation and explicitly set the
4162  * state as hidden:
4163  * @until pack_end
4164  *
4165  * For our third and last panel we won't set the orientation(which means it will
4166  * use the default: LEFT):
4167  * @until pack_end
4168  *
4169  * All that is left is running the main loop:
4170  * @until ELM_MAIN
4171  *
4172  * This example will look like this;
4173  *
4174  * @image html screenshots/panel_example_01.png
4175  * @image latex screenshots/panel_example_01.eps width=\textwidth
4176  * @note The buttons with arrow allow the user to hide/show the panels.
4177  *
4178  * @example panel_example_01.c
4179  */
4180
4181 /**
4182  * @page gengrid_example Gengrid widget example
4183  *
4184  * This application is a thorough exercise on the gengrid widget's
4185  * API. We place an Elementary gengrid widget on a window, with
4186  * various knobs below its viewport, each one acting on it somehow.
4187  *
4188  * The code's relevant part begins at the grid's creation. After
4189  * instantiating it, we set its items sizes, so that we don't end with
4190  * items one finger size wide, only. We're setting them to fat, 150
4191  * pixel wide ones, for this example. We give it some size hints, not
4192  * to be discussed in this context and, than, we register a callback
4193  * on one of its smart events -- the one coming each time an item gets
4194  * doubly clicked. There, we just print the item handle's value.
4195  * @dontinclude gengrid_example.c
4196  * @skip grid = elm_gengrid_add
4197  * @until evas_object_sho
4198  * @dontinclude gengrid_example.c
4199  * @skip item double click callback
4200  * @until }
4201  *
4202  * Before we actually start to deal with the items API, let's show
4203  * some things items will be using throughout all the code. The first
4204  * of them is a struct to be used as item data, for all of them:
4205  * @dontinclude gengrid_example.c
4206  * @skip typedef struct
4207  * @until Item;
4208  *
4209  * That path will be used to index an image, to be swallowed into one
4210  * of the item's icon spots. The images themselves are distributed
4211  * with Elementary:
4212  * @dontinclude gengrid_example.c
4213  * @skip static const char *imgs
4214  * @until ;
4215  *
4216  * We also have an (unique) gengrid item class we'll be using for
4217  * items in the example:
4218  * @dontinclude gengrid_example.c
4219  * @skip static Elm_Gengrid_Item_Class
4220  * @until static Elm_Gengrid_Item_Class
4221  * @dontinclude gengrid_example.c
4222  * @skip item_style =
4223  * @until _grid_del
4224  *
4225  * As you see, our items will follow the default theme on gengrid
4226  * items. For the label fetching code, we return a string composed of
4227  * the item's image path:
4228  * @dontinclude gengrid_example.c
4229  * @skip label fetching callback
4230  * @until }
4231  *
4232  * For item icons, we'll be populating the item default theme's two
4233  * icon spots, @c "elm.swallow.icon" and @c "elm.swallow.end". The
4234  * former will receive one of the images in our list (in the form of
4235  * a @ref bg_02_example_page "background"), while the latter will be
4236  * a check widget. Note that we prevent the check to propagate click
4237  * events, so that the user can toggle its state without messing with
4238  * the respective item's selection in the grid:
4239  * @dontinclude gengrid_example.c
4240  * @skip icon fetching callback
4241  * @until return NULL
4242  * @until }
4243  *
4244  * As the default gengrid item's theme does not have parts
4245  * implementing item states, we'll be just returning false for every
4246  * item state:
4247  * @dontinclude gengrid_example.c
4248  * @skip state fetching callback
4249  * @until }
4250  *
4251  * Finally, the deletion callback on gengrid items takes care of
4252  * freeing the item's label string and its data struct:
4253  * @dontinclude gengrid_example.c
4254  * @skip deletion callback
4255  * @until }
4256  *
4257  * Let's move to item insertion/deletion knobs, them. They are four
4258  * buttons, above the grid's viewport, namely
4259  * - "Append" (to append an item to the grid),
4260  * - "Prepend" (to prepend an item to the grid),
4261  * - "Insert before" (to insert an item before the selection, on the
4262  *   grid),
4263  * - "Insert after" (to insert an item after the selection, on the
4264  *   grid),
4265  * - "Clear" (to delete all items in the grid),
4266  * - "Bring in 1st" (to make the 1st item visible, by scrolling),
4267  * - "Show last" (to directly show the last item),
4268  * .
4269  * which are displaced and declared in that order. We're not dealing
4270  * with the buttons' creation code (see @ref button_example_01
4271  * "a button example", for more details on it), but with their @c
4272  * "clicked" registered callbacks.  For all of them, the grid's handle
4273  * is passed as @c data. The ones creating new items use a common
4274  * code, which just gives a new @c Example_Item struct, with @c path
4275  * filled with a random image in our images list:
4276  * @dontinclude gengrid_example.c
4277  * @skip new item with random path
4278  * @until }
4279  *
4280  * Moreover, that ones will set a common function to be issued on the
4281  * selection of the items. There, we print the item handle's value,
4282  * along with the callback function data. The latter will be @c NULL,
4283  * always, because it's what we pass when adding all icons. By using
4284  * elm_object_item_data_get(), we can have the item data back and,
4285  * with that, we're priting the item's path string. Finally, we
4286  * exemplify elm_gengrid_item_pos_get(), printing the item's position
4287  * in the grid:
4288  * @dontinclude gengrid_example.c
4289  * @skip item selection callback
4290  * @until }
4291  *
4292  * The appending button will exercise elm_gengrid_item_append(), simply:
4293  * @dontinclude gengrid_example.c
4294  * @skip append an item
4295  * @until }
4296  *
4297  * The prepending, naturally, is analogous, but exercising
4298  * elm_gengrid_item_prepend(), on its turn. The "Insert before" one
4299  * will expect an item to be selected in the grid, so that it will
4300  * insert a new item just before it:
4301  * @dontinclude gengrid_example.c
4302  * @skip "insert before" callback
4303  * @until }
4304  *
4305  * The "Insert after" is analogous, just using
4306  * elm_gengrid_item_insert_after(), instead. The "Clear" button will,
4307  * as expected, just issue elm_gengrid_clear():
4308  * @dontinclude gengrid_example.c
4309  * @skip delete items
4310  * @until }
4311  *
4312  * The "Bring in 1st" button is there exercise two gengrid functions
4313  * -- elm_gengrid_first_item_get() and elm_gengrid_item_bring_in().
4314  * With the former, we get a handle to the first item and, with the
4315  * latter, you'll see that the widget animatedly scrolls its view
4316  * until we can see that item:
4317  * @dontinclude gengrid_example.c
4318  * @skip bring in 1st item
4319  * @until }
4320  *
4321  * The "Show last", in its turn, will use elm_gengrid_last_item_get()
4322  * and elm_gengrid_item_show(). The latter differs from
4323  * elm_gengrid_item_bring_in() in that it immediately replaces the
4324  * contents of the grid's viewport with the region containing the item
4325  * in question:
4326  * @dontinclude gengrid_example.c
4327  * @skip show last item
4328  * @until }
4329  *
4330  * To change the grid's cell (items) size, we've placed a spinner,
4331  * which has the following @c "changed" smart callback:
4332  * @dontinclude gengrid_example.c
4333  * @skip change items' size
4334  * @until }
4335  *
4336  * Experiment with it and see how the items are affected. The "Disable
4337  * item" button will, as the name says, disable the currently selected
4338  * item:
4339  * @dontinclude gengrid_example.c
4340  * @skip disable selected item
4341  * @until }
4342  * Note that we also make use of elm_gengrid_item_selected_set(),
4343  * there, thus making the item unselected before we actually disable
4344  * it.
4345  *
4346  * To toggle between horizontal and vertical layouting modes on the
4347  * grid, use the "Horizontal mode" check, which will call the
4348  * respective API function on the grid:
4349  * @dontinclude gengrid_example.c
4350  * @skip change layouting mode
4351  * @until }
4352  *
4353  * If you toggle the check right after that one, "Always select",
4354  * you'll notice all subsequent clicks on the @b same grid item will
4355  * still issue the selection callback on it, what is different from
4356  * when it's not checked. This is the
4357  * elm_gengrid_select_mode_set() behavior:
4358  * @dontinclude gengrid_example.c
4359  * @skip "always select" callback
4360  * @until }
4361  *
4362  * One more check follows, "Bouncing", which will turn on/off the
4363  * bouncing animations on the grid, when one scrolls past its
4364  * borders. Experiment with scrolling the grid to get the idea, having
4365  * it turned on and off:
4366  * @dontinclude gengrid_example.c
4367  * @skip "bouncing mode" callback
4368  * @until }
4369  *
4370  * The next two checks will affect items selection on the grid. The
4371  * first, "Multi-selection", will make it possible to select more the
4372  * one item on the grid. Because it wouldn't make sense to fetch for
4373  * an unique selected item on this case, we also disable two of the
4374  * buttons, which insert items relatively, if multi-selection is on:
4375  * @dontinclude gengrid_example.c
4376  * @skip multi-selection callback
4377  * @until }
4378  *
4379  * Note that we also @b unselect all items in the grid, when returning
4380  * from multi-selection mode, making use of
4381  * elm_gengrid_item_selected_set().
4382  *
4383  * The second check acting on selection, "No selection", is just what
4384  * its name depicts -- no selection will be allowed anymore, on the
4385  * grid, while it's on. Check it out for yourself, interacting with
4386  * the program:
4387  * @dontinclude gengrid_example.c
4388  * @skip no selection callback
4389  * @until }
4390  *
4391  * We have, finally, one more line of knobs, now sliders, to change
4392  * the grids behavior. The two first will change the horizontal @b
4393  * alignment of the whole actual grid of items within the gengrid's
4394  * viewport:
4395  * @dontinclude gengrid_example.c
4396  * @skip items grid horizontal alignment change
4397  * @until }
4398  *
4399  * Naturally, the vertical counterpart just issues
4400  * elm_gengrid_align_set() changing the second alignment component,
4401  * instead.
4402  *
4403  * The last slider will change the grid's <b>page size</b>, relative
4404  * to its own one. Try to change those values and, one manner of
4405  * observing the paging behavior, is to scroll softly and release the
4406  * mouse button, with different page sizes, at different grid
4407  * positions, while having lots of items in it -- you'll see it
4408  * snapping to page boundaries differenty, for each configuration:
4409  * @dontinclude gengrid_example.c
4410  * @skip page relative size change
4411  * @until }
4412  *
4413  * This is how the example program's window looks like:
4414  * @image html screenshots/gengrid_example.png
4415  * @image latex screenshots/gengrid_example.eps width=\textwidth
4416  *
4417  * Note that it starts with three items which we included at will:
4418  * @dontinclude gengrid_example.c
4419  * @skip _clicked(grid,
4420  * @until _clicked(grid,
4421  * @until _clicked(grid,
4422  * @until _clicked(grid,
4423  *
4424  * See the full @ref gengrid_example_c "source code" for
4425  * this example.
4426  *
4427  */
4428 /**
4429  * @page entry_example Entry - Example of simple editing
4430  *
4431  * As a general overview of @ref Entry we are going to write an, albeit simple,
4432  * functional editor. Although intended to show how elm_entry works, this
4433  * example also makes extensive use of several other widgets. The full code
4434  * can be found in @ref entry_example.c "entry_example.c" and in the following
4435  * lines we'll go through the parts especific to the @ref Entry widget.
4436  *
4437  * The program itself is a simple editor, with a file already set to it, that
4438  * can be set to autosave or not and allows insertion of emoticons and some
4439  * formatted text. As of this writing, the capabilities of format edition in
4440  * the entry are very limited, so a lot of manual work is required to change
4441  * the current text.
4442  *
4443  * In any case, the program allows some changes by using the buttons on the
4444  * top of the window and returning focus back to the main entry afterwards.
4445  *
4446  * @image html screenshots/entry_example.png
4447  * @image latex screenshots/entry_example.eps width=\textwidth
4448  *
4449  * We'll begin by showing a few structures used throught the program. First,
4450  * the application owns data that holds the main window and the main entry
4451  * where the editting happens. Then, an auxiliar structure we'll use later
4452  * when inserting icons in our text.
4453  * @dontinclude entry_example.c
4454  * @skip typedef
4455  * @until App_Inwin_Data
4456  *
4457  * A little convenience function will insert whatever text we need in the
4458  * buffer at the current cursor's position and set focus back to this entry.
4459  * This is done mostly because clicking on any button will make them steal
4460  * focus, which makes writing text more cumbersome.
4461  * @skip static void
4462  * @until }
4463  *
4464  * One of the buttons on the top will trigger an @ref Inwin to open and show
4465  * us several icons we can insert into the text. We'll jump over most of these
4466  * functions, but when all the options are chosen, we insert the special
4467  * markup text that will show the chosen icon in place.
4468  * @skip edje_file_collection_list_free(emos)
4469  * @skip static void
4470  * @until evas_object_del
4471  * @until }
4472  *
4473  * As can be seen in that function, the program lets us add icons to our entry
4474  * using all the possible configurations for them. That should help to
4475  * clarify how the different combinations work out by actually seeing them
4476  * in action.
4477  *
4478  * The same popup window has a page to set the settings of the chosen icon,
4479  * that is, the size and how the item will be placed within the line.
4480  *
4481  * The size is done with two entries, limitted to accept numbers and a fixed
4482  * size of characters. Changing the value in this entries will update the icon
4483  * size in our struct as seen in the next two callbacks.
4484  * @skip static void
4485  * @until }
4486  * @until }
4487  *
4488  * The rest of the options are handled with radio buttons, since only one type
4489  * of size can be used (@c size, @c absize or @c relsize) and for the vertical
4490  * sizing it needs to choose between @c ascent and @c full. Depending on which
4491  * is chosen, the @c item tag is formed accordingly as seen before.
4492  * @skip static Evas_Object
4493  * @until evas_object_show(rvascent)
4494  *
4495  * The first of our entries is here. There's something worth mentioning about
4496  * the way we'll create this one. Normally, any entry regardless of whether is
4497  * single line or not, will be set to scrollable, but in this case, since we
4498  * are limitting how many characters can fit in them and we know we don't need
4499  * scrolling, we are not setting this flag. This makes the entry have virtually
4500  * no appearance on screen, other than its text. This is because an entry is
4501  * just that, a box that holds text, and in order to have some frame around it
4502  * or a background color, another widget needs to provide this. When an entry
4503  * is scrollable, the same scroller used internally does this.
4504  * We are using @ref Frame "frames" here to provide some decoration around,
4505  * then creating our entries, set them to single line, add our two filters and
4506  * the callback for when their value change.
4507  * @until _height_changed_cb
4508  *
4509  * This function ends with the button that will finally call the item
4510  * into our editting string.
4511  * @until }
4512  *
4513  * Then we get to the format edition. Here we can add the @c bold and
4514  * @c emphasis tags to parts of our text. There's a lot of manual work to
4515  * know what to do here, since we are not implementing an entire state manager
4516  * and the entry itself doesn't, yet, support all the needed capabilities to
4517  * make this simpler. We begin by getting the format we are using in our
4518  * function from the button pressed.
4519  * @skip  _format_change_cb(void *data, Evas_Object *obj, void *event EINA_UNUSED))
4520  * @until sizeof(fmt_close)
4521  *
4522  * Next we need to find out if we need to insert an opening or a closing tag.
4523  * For this, we store the current cursor position and create a selection
4524  * from this point until the beginning of our text, and then get the selected
4525  * text to look for any existing format tags in it. This is currently the only
4526  * way in which we can find out what formats is being used in the entry.
4527  * @until }
4528  * @until }
4529  *
4530  * Once we know what tag to insert, we need a second check in the case it was
4531  * a closing tag. This is because any other closing tag that comes after would
4532  * be left dangling alone, so we need to remove it to keep the text consistent.
4533  * @until }
4534  * @until }
4535  * Finally, we clear our fake selections and return the cursor back to the
4536  * position it had at first, since there is where we want to insert our format.
4537  * @until cursor_pos_set
4538  *
4539  * And finish by calling our convenience function from before, to insert the
4540  * text at the current cursor and give focus back to the entry.
4541  * @until }
4542  *
4543  * A checkbox on the top of our program tells us if the text we are editing
4544  * will autosave or not. In it's @c "changed" callback we get the value from
4545  * the checkbox and call the elm_entry_autosave_set() function with it. If
4546  * autosave is set, we also call elm_entry_file_save(). This is so the internal
4547  * timer used to periodically store to disk our changes is started.
4548  * @skip static void
4549  * @until }
4550  *
4551  * Two more functions to show some cursor playing. Whenever we double click
4552  * anywhere on our entry, we'll find what word is the cursor placed at and
4553  * select it. Likewise, for triple clicking, we select the entire line.
4554  * @skip static void
4555  * @until _edit_tplclick_cb
4556  * @until }
4557  *
4558  * And finally, the main window of the program contains the entry where we
4559  * do all the edition and some helping widgets to change format, add icons
4560  * or change the autosave flag.
4561  * @skip elm_exit
4562  * @skip int
4563  * @until _image_insert_cb
4564  *
4565  * And the main entry of the program. Set to scroll, by default we disable
4566  * autosave and we'll begin with a file set to it because no file selector
4567  * is being used here. The file is loaded with #ELM_TEXT_FORMAT_MARKUP_UTF8
4568  * so that any format contained in it is interpreted, otherwise the entry
4569  * would load it as just text, escaping any tags found and no format or icons
4570  * would be shown. Then we connect to the double and triple click signals
4571  * and set focus on the entry so we can start typing right away.
4572  * @until ELM_MAIN
4573  *
4574  * @example entry_example.c
4575  */
4576
4577 /**
4578  * @page genlist_example_01 Genlist - basic usage
4579  *
4580  * This example creates a simple genlist with a small number of items and
4581  * a callback that is called whenever an item is selected. All the properties of
4582  * this genlist are the default ones. The full code for this example can be seen
4583  * at @ref genlist_example_01_c.
4584  *
4585  * For the simplest list that you plan to create, it's necessary to define some
4586  * of the basic functions that are used for creating each list item, and
4587  * associating them with the "item class" for that list. The item class is just
4588  * an struct that contains pointers to the specific list item functions that are
4589  * common to all the items of the list.
4590  *
4591  * Let's show it by example. Our item class is declared globally and static as
4592  * it will be the only item class that we need (we are just creating one list):
4593  *
4594  * @dontinclude genlist_example_01.c
4595  * @skip static Elm_Genlist
4596  * @until static Elm_Genlist
4597  *
4598  * This item class will be used for every item that we create. The only
4599  * functions that we are going to set are @c label_get and @c icon_get. As the
4600  * name suggests, they are used by the genlist to generate the label for the
4601  * respective item, and to generate icon(s) to it too. Both the label and icon
4602  * get functions can be called more than once for each item, with different @c
4603  * part parameters, which represent where in the theme of the item that label or
4604  * icon is going to be set.
4605  *
4606  * The default theme for the genlist contains only one area for label, and two
4607  * areas for icon ("elm.swallow.icon" and "elm.swallow.end"). Since we just want
4608  * to set the first icon (that will be at the left side of the label), we
4609  * compare the part name given with "elm.swallow.icon". Notice that the
4610  * @c label_get function must return a strduped string, that will be freed later
4611  * automatically by the list. Here's the code for @c label_get and @c icon_get:
4612  *
4613  * @until static void
4614  *
4615  * We will also provide a function that will be called whenever an item is
4616  * selected in the genlist. However, this function is not part of the item
4617  * class, it will be passed for each item being added to the genlist explicitly.
4618  * Notice the similarity of the function signature with those used by @c
4619  * evas_object_smart_callback_add:
4620  *
4621  * @until }
4622  *
4623  * Now let's show the code used for really creating the list. Skipping
4624  * boilerplate code used for creating a window and background, the first piece
4625  * of code specific to our genlist example is setting the pointer functions of
4626  * the item class to our above defined functions:
4627  *
4628  * @skip _itc
4629  * @until func.del
4630  *
4631  * Notice that we also choose to use the "default" style for our genlist items.
4632  * Another interesting point is that @c state_get and @c del are set to @c NULL,
4633  * since we don't need these functions now. @c del doesn't need to be used
4634  * because we don't add any data that must be freed to our items, and @c
4635  * state_get is also not used since all of our items are the same and don't need
4636  * to have different states to be used for each item. Finally we create our
4637  * list:
4638  *
4639  * @until genlist_add
4640  *
4641  * Now we append several items to the list, and for all of them we need to give
4642  * the list pointer, a pointer to the item class, the data that will be used
4643  * with that item, a pointer to the parent of this item if it is in a group type
4644  * list (this is not the case so we pass @c NULL), possible flags for this item,
4645  * the callback for when the item is selected, and the data pointer that will be
4646  * given to the selected callback.
4647  *
4648  * @until }
4649  *
4650  * The rest of the code is also common to all the other examples, so it will be
4651  * omitted here (look at the full source code link above if you need it).
4652  *
4653  * You can try to play with this example, and see the selected callback being
4654  * called whenever an item is clicked. It also already has some features enabled
4655  * by default, like vertical bounce animation when reaching the end of the list,
4656  * automatically visible/invisible scrollbar, etc. Look at the @ref
4657  * genlist_example_02 to see an example of setting these properties to the list.
4658  *
4659  * The current example will look like this when running:
4660  *
4661  * @image html screenshots/genlist_example_01.png
4662  * @image latex screenshots/genlist_example_01.eps width=\textwidth
4663  */
4664
4665 /**
4666  * @page genlist_example_02 Genlist - list setup functions
4667  *
4668  * This example is very similar to the @ref genlist_example_01, but it fetch
4669  * most of the properties of the genlist and displays them on startup (thus
4670  * getting the default value for them) and then set them to some other values,
4671  * to show how to use that API. The full source code is at @ref
4672  * genlist_example_02_c.
4673  *
4674  * Considering that the base code for instantiating a genlist was already
4675  * described in the previous example, we are going to focus on the new code.
4676  *
4677  * Just a small difference for the @c _item_label_get function, we are going to
4678  * store the time that this function was called. This is the "realized" time,
4679  * the time when the visual representation of this item was created. This is the
4680  * code for the @c label_get function:
4681  *
4682  * @dontinclude genlist_example_02.c
4683  * @skip static char
4684  * @until return strdup
4685  *
4686  * Now let's go to the list creation and setup. First, just after creating the
4687  * list, we get most of the default properties from it, and print them on the
4688  * console:
4689  *
4690  * @skip genlist_add
4691  * @until printf("\n")
4692  *
4693  * We are going to change some of the properties of our list.
4694  *
4695  * There's no need to call the selected callback at every click, just when the
4696  * selected item changes, thus we call elm_genlist_select_mode_set() with
4697  * ELM_OBJECT_SELECT_MODE_ALWAYS.
4698  *
4699  * For this list we don't want bounce animations at all, so we set both the
4700  * horizontal bounce and the vertical bounce to false with
4701  * elm_genlist_bounce_set().
4702  *
4703  * We also want our list to compress items if they are wider than the list
4704  * width (thus we call elm_genlist_mode_set(obj, ELM_LIST_COMPRESS).
4705  *
4706  * The items have different width, so they are not homogeneous:
4707  * elm_genlist_homogeneous_set() is set to false.
4708  *
4709  * Since the compress mode is active, the call to
4710  * elm_genlist_mode_set() doesn't make difference, but the current
4711  * option would make the list to have at least the width of the largest item.
4712  *
4713  * This list will support multiple selection, so we call
4714  * elm_genlist_multi_select_set() on it.
4715  *
4716  * The option elm_genlist_mode_set() would allow text block to
4717  * wrap lines if the Edje part is configured with "text.min: 0 1", for example.
4718  * But since we are compressing the elements to the width of the list, this
4719  * option wouldn't take any effect.
4720  *
4721  * We want the vertical scrollbar to be always displayed, and the orizontal one
4722  * to never be displayed, and set this with elm_genlist_scroller_policy_set().
4723  *
4724  * The timeout to consider a longpress is set to half of a second with
4725  * elm_genlist_longpress_timeout_set().
4726  *
4727  * We also change the block count to a smaller value, but that should have not
4728  * impact on performance since the number of visible items is too small. We just
4729  * increase the granularity of the block count (setting it to have at most 4
4730  * items).
4731  *
4732  * @until block_count_set
4733  *
4734  * Now let's add elements to the list:
4735  *
4736  * @until item_append
4737  * @until }
4738  *
4739  * It's exactly the same as the previous example. The difference is on the
4740  * behavior of the list, if you try to scroll, select items and so.
4741  *
4742  * In this example we also need two buttons. One of them, when clicked, will
4743  * display several status info about the current selection, the "realized"
4744  * items, the item in the middle of the screen, and the current mode and active
4745  * item of that mode for the genlist.
4746  *
4747  * The other button will ask the genlist to "realize" again the items already
4748  * "realized", so their respective label_get and icon_get functions will be
4749  * called again.
4750  *
4751  * These are the callbacks for both of these buttons:
4752  *
4753  * @dontinclude genlist_example_02.c
4754  * @skip item_sel_cb
4755  * @skip static
4756  * @until }
4757  * @until }
4758  *
4759  * Try to scroll, select some items and click on the "Show status" button.
4760  * You'll notice that not all items of the list are "realized", thus consuming
4761  * just a small amount of memory. The selected items are listed in the order
4762  * that they were selected, and the current selected item printed using
4763  * elm_genlist_selected_item_get() is the first selected item of the multiple
4764  * selection.
4765  *
4766  * Now resize the window so that you can see the "realized time" of some items.
4767  * This is the time of when the label_get function was called. If you click on
4768  * the "Realize" button, all the already realized items will be rebuilt, so the
4769  * time will be updated for all of them.
4770  *
4771  * The current example will look like this when running:
4772  *
4773  * @image html screenshots/genlist_example_02.png
4774  * @image latex screenshots/genlist_example_02.eps width=\textwidth
4775  */
4776
4777 /**
4778  * @page genlist_example_03 Genlist - different width options
4779  *
4780  * This example doesn't present any other feature that is not already present in
4781  * the other examples, but visually shows the difference between using the
4782  * default list options (first list of the example), setting the horizontal mode
4783  * to #ELM_LIST_LIMIT (second list), enabling compress mode (third list) and
4784  * using height_for_width option (fourth list).
4785  *
4786  * The full code for this example is listed below:
4787  *
4788  * @include genlist_example_03.c
4789  *
4790  * And the screenshot of the running example:
4791  *
4792  * @image html screenshots/genlist_example_03.png
4793  * @image latex screenshots/genlist_example_03.eps width=\textwidth
4794  *
4795  * @example genlist_example_03.c
4796  */
4797
4798 /**
4799  * @page genlist_example_04 Genlist - items manipulation
4800  *
4801  * This example is also similar ot the @ref genlist_example_01, but it
4802  * demonstrates most of the item manipulation functions. See the full source
4803  * code at @ref genlist_example_04_c.
4804  *
4805  * In this example, we also will use the concept of creating groups of items in
4806  * the genlist. Each group of items is composed by a parent item (which will be
4807  * the index of the group) and several children of this item. Thus, for the
4808  * children, we declare a normal item class. But we also are going to declare a
4809  * different item class for the group index (which in practice is another type
4810  * of item in the genlist):
4811  *
4812  * @dontinclude genlist_example_04.c
4813  * @skip _item_sel_cb
4814  * @skip static
4815  * @until }
4816  * @until }
4817  *
4818  * We will add buttons to the window, where each button provides one
4819  * functionality of the genlist item API. Each button will have a callback
4820  * attached, that will really execute this functionality. An example of these
4821  * callbacks is the next one, for the elm_genlist_item_insert_after() function:
4822  *
4823  * @skip insert_before_cb
4824  * @skip static
4825  * @until }
4826  *
4827  * If you want ot see the other button functions, look at the full source code
4828  * link above.
4829  *
4830  * Each button will be created with a function that already creates the button,
4831  * add it to an elementary box, and attach the specified callback. This is the
4832  * function that does it:
4833  *
4834  * @skip genlist_item_update
4835  * @skip static
4836  * @until }
4837  *
4838  * In our @c elm_main function, besides the code for setting up the window, box
4839  * and background, we also initialize our two item classes:
4840  *
4841  * @skip _itc.item_style
4842  * @until _itc_group.func.del
4843  *
4844  * This example uses a different style for the items, the @a double_label, which
4845  * provides a text field for the item text, and another text field for a subtext.
4846  *
4847  * For the group index we use the @a group_index style, which provides a
4848  * different appearance, helping to identify the end of a group and beginning of
4849  * another one.
4850  *
4851  * Now, after the code for creating the list, setting up the box and other
4852  * stuff, let's add the buttons with their respective callbacks:
4853  *
4854  * @skip _button_add
4855  * @until bt_top_show
4856  *
4857  * The main code for adding items to the list is a bit more complex than the one
4858  * from the previous examples. We check if each item is multiple of 7, and if
4859  * so, they are group indexes (thus each group has 6 elements by default, in
4860  * this example):
4861  *
4862  * @skip for
4863  * @until }
4864  * @until }
4865  *
4866  * Then we also check for specific items, and add callbacks to them on the
4867  * respective buttons, so we can show, bring in, etc.:
4868  *
4869  * @until }
4870  * @until }
4871  *
4872  * Once you understand the code from the @ref genlist_example_01, it should be
4873  * easy to understand this one too. Look at the full code, and also try to play
4874  * a bit with the buttons, adding items, bringing them to the viewport, and so.
4875  *
4876  * The example will look like this when running:
4877  *
4878  * @image html screenshots/genlist_example_04.png
4879  * @image latex screenshots/genlist_example_04.eps width=\textwidth
4880  */
4881
4882 /**
4883  * @page genlist_example_05 Genlist - working with subitems
4884  *
4885  * This is probably the most complex example of elementary @ref Genlist. We
4886  * create a tree of items, using the subitems properties of the items, and keep
4887  * it in memory to be able to expand/hide subitems of an item. The full source
4888  * code can be found at @ref genlist_example_05_c
4889  *
4890  * The main point is the way that Genlist manages subitems. Clicking on an
4891  * item's button to expand it won't really show its children. It will only
4892  * generate the "expand,request" signal, and the expansion must be done
4893  * manually.
4894  *
4895  * In this example we want to be able to add items as subitems of another item.
4896  * If an item has any child, it must be displayed using a parent class,
4897  * otherwise it will use the normal item class.
4898  *
4899  * It will be possible to delete items too. Once a tree is constructed (with
4900  * subitems of subitems), and the user clicks on the first parent (root of the
4901  * tree), the entire subtree must be hidden. However, just calling
4902  * elm_genlist_item_expanded_set(item, EINA_FALSE) won't hide them. The only
4903  * thing that happens is that the parent item will change its appearance to
4904  * represent that it's contracted. And the signal "contracted" will be emitted
4905  * from the genlist. Thus, we must call elm_genlist_item_subitems_clear() to
4906  * delete all its subitems, but still keep a way to recreate them when expanding
4907  * the parent again. That's why we are going to keep a node struct for each
4908  * item, that will be the data of the item, with the following information:
4909  *
4910  * @dontinclude genlist_example_05.c
4911  * @skip typedef
4912  * @until }
4913  *
4914  * This @c Node_Data contains the value for the item, a number indicating its
4915  * level under the tree, a list of children (to be able to expand it later) and
4916  * a boolean indicating if it's a favorite item or not.
4917  *
4918  * We use 3 different item classes in this example:
4919  *
4920  * One for items that don't have children:
4921  *
4922  * @skip nitems
4923  * @skip static
4924  * @until }
4925  * @until }
4926  *
4927  * One for items that have children:
4928  *
4929  * @skip item_sel
4930  * @skip static
4931  * @until }
4932  * @until }
4933  *
4934  * And one for items that were favorited:
4935  *
4936  * @skip static
4937  * @until }
4938  * @until }
4939  *
4940  * The favorite item class is there just to demonstrate the
4941  * elm_genlist_item_item_class_update() function in action. It would be much
4942  * simpler to implement the favorite behavior by just changing the icon inside
4943  * the icon_get functions when the @c favorite boolean is activated.
4944  *
4945  * Now we are going to declare the callbacks for the buttons that add, delete
4946  * and change items.
4947  *
4948  * First, a button for appending items to the list:
4949  *
4950  * @until item_append
4951  * @until }
4952  *
4953  * If an item is selected, a new item will be appended to the same level of that
4954  * item, but using the selected item's parent as its parent too. If no item is
4955  * selected, the new item will be appended to the root of the tree.
4956  *
4957  * Then the callback for marking an item as favorite:
4958  *
4959  * @until elm_genlist_item_update
4960  * @until }
4961  *
4962  * This callback is very simple, it just changes the item class of the selected
4963  * item for the "favorite" one, or go back to the "item" or "parent" class
4964  * depending on that item having children or not.
4965  *
4966  * Now, the most complex operation (adding a child to an item):
4967  *
4968  * @until elm_genlist_item_update
4969  * @until }
4970  *
4971  * This function gets the data of the selected item, create a new data (for the
4972  * item being added), and appends it to the children list of the selected item.
4973  *
4974  * Then we must check if the selected item (let's call it @c item1 now) to which
4975  * the new item (called @c item2 from now on) was already a parent item too
4976  * (using the parent item class) or just a normal item (using the default item
4977  * class). In the first case, we just have to append the item to the end of the
4978  * @c item1 children list.
4979  *
4980  * However, if the @c item1 didn't have any child previously, we have to change
4981  * it to a parent item now. It would be easy to just change its item class to
4982  * the parent type, but there's no way to change the item flags and make it be
4983  * of the type #ELM_GENLIST_ITEM_TREE. Thus, we have to delete it and create
4984  * a new item, and add this new item to the same position that the deleted one
4985  * was. That's the reason of the checks inside the bigger @c if.
4986  *
4987  * After adding the item to the newly converted parent, we set it to not
4988  * expanded (since we don't want to show the added item immediately) and select
4989  * it again, since the original item was deleted and no item is selected at the
4990  * moment.
4991  *
4992  * Finally, let's show the callback for deleting items:
4993  *
4994  * @until elm_genlist_item_update
4995  * @until }
4996  *
4997  * Since we have an iternal list representing each element of our tree, once we
4998  * delete an item we have to go deleting each child of that item, in our
4999  * internal list. That's why we have the function @c _clear_list, which
5000  * recursively goes freeing all the item data.
5001  *
5002  * This is necessary because only when we really want to delete the item is when
5003  * we need to delete the item data. When we are just contracting the item, we
5004  * need to hide the children by deleting them, but keeping the item data.
5005  *
5006  * Now there are two callbacks that will be called whenever the user clicks on
5007  * the expand/contract icon of the item. They will just request to items to be
5008  * contracted or expanded:
5009  *
5010  * @until elm_genlist_item_expanded_set(
5011  * @until elm_genlist_item_expanded_set(
5012  * @until }
5013  *
5014  * When the elm_genlist_item_expanded_set() function is called with @c
5015  * EINA_TRUE, the @c _expanded_cb will be called. And when this happens, the
5016  * subtree of that item must be recreated again. This is done using the internal
5017  * list stored as item data for each item. The function code follows:
5018  *
5019  * @until }
5020  *
5021  * Each appended item is set to contracted, so we don't have to deal with
5022  * checking if the item was contracted or expanded before its parent being
5023  * contracted. It could be easily implemented, though, by adding a flag expanded
5024  * inside the item data.
5025  *
5026  * Now, the @c _contracted_cb, which is much simpler:
5027  *
5028  * @until }
5029  *
5030  * We just have to call elm_genlist_item_subitems_clear(), that will take care
5031  * of deleting every item, and keep the item data still stored (since we don't
5032  * have any del function set on any of our item classes).
5033  *
5034  * Finally, the code inside @c elm_main is very similar to the other examples:
5035  *
5036  * @skip elm_main
5037  * @until ELM_MAIN
5038  *
5039  * The example will look like this when running:
5040  *
5041  * @image html screenshots/genlist_example_05.png
5042  * @image latex screenshots/genlist_example_05.eps width=\textwidth
5043  */
5044
5045 /**
5046  * @page thumb_example_01 Thumb - generating thumbnails.
5047  *
5048  * This example shows how to create a simple thumbnail object with Elementary.
5049  * The full source code can be found at @ref thumb_example_01_c
5050  *
5051  * Everything is very simple. First we need to tell elementary that we need
5052  * Ethumb to generate the thumbnails:
5053  *
5054  * @dontinclude thumb_example_01.c
5055  * @skipline elm_need_ethumb
5056  *
5057  * Then, after creating the window and background, we setup our client to
5058  * generate images of 160x160:
5059  *
5060  * @skip client_get
5061  * @until size_set
5062  *
5063  * After that, we can start creating thumbnail objects. They are very similar to
5064  * image or icon objects:
5065  *
5066  * @until thumb_reload
5067  *
5068  * As you can see, the main different function here is elm_thumb_reload(), which
5069  * will check if the options of the Ethumb client have changed. If so, it will
5070  * re-generate the thumbnail, and show the new one.
5071  *
5072  * Notice in this example that the thumbnail object is displayed on the size of
5073  * the window (320x320 pixels), but the thumbnail generated and stored has size
5074  * 160x160 pixels. That's why the picture seems upscaled.
5075  *
5076  * Ideally, you will be generating thumbnails with the size that you will be
5077  * using them.
5078  *
5079  * The example will look like this when running:
5080  *
5081  * @image html screenshots/thumb_example_01.png
5082  * @image latex screenshots/thumb_example_01.eps width=\textwidth
5083  */
5084
5085 /**
5086  * @page progressbar_example Progress bar widget example
5087  *
5088  * This application is a thorough example of the progress bar widget,
5089  * consisting of a window with various progress bars, each with a given
5090  * look/style one can give to those widgets. With two auxiliary
5091  * buttons, one can start or stop a timer which will fill in the bars
5092  * in synchrony, simulating an underlying task being completed.
5093  *
5094  * We create @b seven progress bars, being three of them horizontal,
5095  * three vertical and a final one under the "wheel" alternate style.
5096  *
5097  * For the first one, we add a progress bar on total pristine state,
5098  * with no other call than the elm_progressbar_add() one:
5099  * @dontinclude progressbar_example.c
5100  * @skip pb with no label
5101  * @until pb1
5102  * See, than, that the defaults of a progress bar are:
5103  * - no primary label shown,
5104  * - unit label set to @c "%.0f %%",
5105  * - no icon set
5106  *
5107  * The second progress bar is given a primary label, <c>"Infinite
5108  * bounce"</c>, and, besides, it's set to @b pulse. See how, after one
5109  * starts the progress timer, with the "Start" button, it animates
5110  * differently than the previous one. It won't account for the
5111  * progress, itself, and just dumbly animate a small bar within its
5112  * bar region.
5113  * @dontinclude progressbar_example.c
5114  * @skip pb with label
5115  * @until pb2
5116  *
5117  * Next, comes a progress bar with an @b icon, a primary label and a
5118  * unit label @b function set. It's also made to grow its bar in an
5119  * @b inverted manner, so check that out during the timer's progression:
5120  * @dontinclude progressbar_example.c
5121  * @skip ic1 =
5122  * @until pb3
5123  * Another important thing in this one is the call to
5124  * elm_progressbar_span_size_set() -- this is how we forcefully set a
5125  * minimum horizontal size to our whole window! We're not resizing it
5126  * manually, as you can see in the @ref progressbar_example_c
5127  * "complete code".
5128  *
5129  * The format callback is a simple function that gets passed the progress value
5130  * and returns a string. A free function should be provided as well, if the
5131  * format callback allocates memory.
5132  * @dontinclude progressbar_example.c
5133  * @skip Format callback
5134  * @until }
5135  * @until }
5136  *
5137  * The last horizontal progress bar has a callback that gets called when its
5138  * value is @b changed. This callback updates a label to provide an estimate
5139  * when the operation finishes.
5140  * @dontinclude progressbar_example.c
5141  * @skip pb3
5142  * @skip changed trigger
5143  * @until pb4
5144  *
5145  * The "changed" signal is emitted every time the progressbar value is updated
5146  * through @ref elm_progressbar_value_set(). This callback calculates and
5147  * displays the ETA based on the progress and time that has passed.
5148  * @dontinclude progressbar_example.c
5149  * @skip Callback for "changed" signal
5150  * @until }
5151  * @until }
5152  * @until }
5153  *
5154  * The next three progress bars are just variants on the ones already
5155  * shown, but now all being @b vertical. Another time we use one of
5156  * than to give the window a minimum vertical size, with
5157  * elm_progressbar_span_size_set().  To demonstrate this trick once
5158  * more, the fifth one, which is also set to pulse, has a smaller
5159  * hardcoded span size:
5160  * @dontinclude progressbar_example.c
5161  * @skip vertical pb, with pulse
5162  * @until pb6
5163  *
5164  * We end the widget demonstration by showing a progress bar with the
5165  * special @b "wheel" progress bar style. One does @b not need to set
5166  * it to pulse, with elm_progressbar_pulse_set(), explicitly, because
5167  * its theme does not take it in account:
5168  * @dontinclude progressbar_example.c
5169  * @skip "wheel"
5170  * @until pb8
5171  *
5172  * The two buttons exercising the bars, the facto, follow:
5173  * @dontinclude progressbar_example.c
5174  * @skip elm_button_add
5175  * @until evas_object_show(bt)
5176  * @until evas_object_show(bt)
5177  *
5178  * The first of the callbacks will, for the progress bars set to
5179  * pulse, start the pulsing animation at that time. For the others, a
5180  * timer callback will take care of updating the values:
5181  * @dontinclude progressbar_example.c
5182  * @skip static Eina_Bool
5183  * @until }
5184  * @until }
5185  * @until }
5186  *
5187  * Finally, the callback to stop the progress timer will stop the
5188  * pulsing on the pulsing progress bars and, for the others, to delete
5189  * the timer which was acting on their values:
5190  * @dontinclude progressbar_example.c
5191  * @skip end of show
5192  * @until }
5193  * @until }
5194  *
5195  * This is how the example program's window looks like:
5196  * @image html screenshots/progressbar_example.png
5197  * @image latex screenshots/progressbar_example.eps width=\textwidth
5198  *
5199  * See the full @ref progressbar_example_c "source code" for
5200  * this example.
5201  *
5202  */
5203
5204 /**
5205  * @page tutorial_notify Notify example
5206  * @dontinclude notify_example_01.c
5207  *
5208  * In this example we will have 3 notifies in 3 different positions. The first
5209  * will dissappear after 5 seconds or when a outside clickking occurs, the
5210  * second and third will not disappear and differ from each other only in
5211  * position.
5212  *
5213  * We start our example with the usual stuff you've seen in other examples:
5214  * @until show(bx)
5215  *
5216  * We now create a label to use as the content of our first notify:
5217  * @until show
5218  *
5219  * Having the label we move to creating our notify, telling it to block events,
5220  * setting its timeout(to autohide it):
5221  * @until pack_end
5222  *
5223  * To have the notify dissappear when a click outside its area occur we have to
5224  * listen to its "block,clicked" signal:
5225  * @until smart_callback
5226  *
5227  * Our callback will look like this:
5228  * @skip static
5229  * @until }
5230  * @dontinclude notify_example_01.c
5231  *
5232  * Next we create another label and another notify. Note, however, that this
5233  * time we don't set a timeout and don't have it block events. What we do is set
5234  * the orient so that this notify will appear in the bottom of its parent:
5235  * @skip smart_callback
5236  * @skip content
5237  * @until pack_end
5238  *
5239  * For our third notify the only change is the orient which is now center:
5240  * @until pack_end
5241  *
5242  * Now we tell the main loop to run:
5243  * @until ELM_MAIN
5244  *
5245  * Our example will initially look like this:
5246  *
5247  * @image html screenshots/notify_example_01.png
5248  * @image latex screenshots/notify_example_01.eps width=\textwidth
5249  *
5250  * Once the first notify is hidden:
5251  *
5252  * @image html screenshots/notify_example_01_a.png
5253  * @image latex screenshots/notify_example_01_a.eps width=\textwidth
5254  *
5255  * @example notify_example_01.c
5256  */
5257
5258 /**
5259  * @page popup_example_01_c popup_example_01.c
5260  * @include popup_example_01.c
5261  *
5262  * This example will initially look like this:
5263  *
5264  * @image html screenshots/popup_example_01.png
5265  * @image latex screenshots/popup_example_01.eps width=\textwidth
5266  *
5267  * Once the popup is hidden after timeout:
5268  *
5269  * @image html screenshots/popup_example_01_a.png
5270  * @image latex screenshots/popup_example_01_a.eps width=\textwidth
5271  *
5272  * @example popup_example_01.c
5273  */
5274
5275  /** @page popup_example_02_c popup_example_02.c
5276  * @include popup_example_02.c
5277  *
5278  * This example will look like this:
5279  *
5280  * @image html screenshots/popup_example_02.png
5281  * @image latex screenshots/popup_example_02.eps width=\textwidth
5282  *
5283  * @example popup_example_02.c
5284  */
5285
5286 /**
5287  * @page popup_example_03_c popup_example_03.c
5288  * @include popup_example_03.c
5289  *
5290  * This example will look like this:
5291  *
5292  * @image html screenshots/popup_example_03.png
5293  * @image latex screenshots/popup_example_03.eps width=\textwidth
5294  *
5295  * @example popup_example_03.c
5296  */
5297
5298 /**
5299  * @page tutorial_frame Frame example
5300  * @dontinclude frame_example_01.c
5301  *
5302  * In this example we are going to create 4 Frames with different styles and
5303  * add a rectangle of different color in each.
5304  *
5305  * We start we the usual setup code:
5306  * @until show(bg)
5307  *
5308  * And then create one rectangle:
5309  * @until show
5310  *
5311  * To add it in our first frame, which since it doesn't have it's style
5312  * specifically set uses the default style:
5313  * @until show
5314  *
5315  * And then create another rectangle:
5316  * @until show
5317  *
5318  * To add it in our second frame, which uses the "pad_small" style, note that
5319  * even tough we are setting a text for this frame it won't be show, only the
5320  * default style shows the Frame's title:
5321  * @until show
5322  * @note The "pad_small", "pad_medium", "pad_large" and "pad_huge" styles are
5323  * very similar, their only difference is the size of the empty area around
5324  * the content of the frame.
5325  *
5326  * And then create yet another rectangle:
5327  * @until show
5328  *
5329  * To add it in our third frame, which uses the "outdent_top" style, note
5330  * that even tough we are setting a text for this frame it won't be show,
5331  * only the default style shows the Frame's title:
5332  * @until show
5333  *
5334  * And then create one last rectangle:
5335  * @until show
5336  *
5337  * To add it in our fourth and final frame, which uses the "outdent_bottom"
5338  * style, note that even tough we are setting a text for this frame it won't
5339  * be show, only the default style shows the Frame's title:
5340  * @until show
5341  *
5342  * And now we are left with just some more setup code:
5343  * @until ELM_MAIN()
5344  *
5345  * Our example will look like this:
5346  *
5347  * @image html screenshots/frame_example_01.png
5348  * @image latex screenshots/frame_example_01.eps width=\textwidth
5349  *
5350  * @example frame_example_01.c
5351  */
5352
5353 /**
5354  * @page tutorial_check Check example
5355  * @dontinclude check_example_01.c
5356  *
5357  * This example will show 2 checkboxes, one with just a label and the second
5358  * one with both a label and an icon. This example also illustrates how to
5359  * have the checkbox change the value of a variable and how to react to those
5360  * changes.
5361  *
5362  * We will start with the usual setup code:
5363  * @skip EAPI_MAIN
5364  * @until elm_win_autodel_set
5365  *
5366  * And now we create our first checkbox, set its label, tell it to change
5367  * the value of @p value when the checkbox stats is changed and ask to be
5368  * notified of state changes:
5369  * @until show
5370  *
5371  * For our second checkbox we are going to set an icon so we need to create
5372  * and icon:
5373  * @until show
5374  * @note For simplicity we are using a rectangle as icon, but any evas object
5375  * can be used.
5376  *
5377  * And for our second checkbox we set the label, icon and state to true:
5378  * @until show
5379  *
5380  * We now do some more setup:
5381  * @until ELM_MAIN
5382  *
5383  * And finally implement the callback that will be called when the first
5384  * checkbox's state changes. This callback will use @p data to print a
5385  * message:
5386  * @dontinclude check_example_01.c
5387  * @skip static
5388  * @until }
5389  * @note This work because @p data is @p value(from the main function) and @p
5390  * value is changed when the checkbox is changed.
5391  *
5392  * Our example will look like this:
5393  *
5394  * @image html screenshots/check_example_01.png
5395  * @image latex screenshots/check_example_01.eps width=\textwidth
5396  *
5397  * @example check_example_01.c
5398  */
5399
5400 /**
5401  * @page tutorial_colorselector Color selector example
5402  * @dontinclude colorselector_example_01.c
5403  *
5404  * This example shows how to change the color of a rectangle using a color
5405  * selector. We aren't going to explain a lot of the code since it's the
5406  * usual setup code:
5407  * @until show(rect)
5408  *
5409  * Now that we have a window with background and a rectangle we can create
5410  * our color_selector
5411  * @until elm_colorselector_add
5412  *
5413  * Now colors can be loaded to color selector's palette by setting the palette name
5414  * @until show(cs)
5415  *
5416  * Next we ask to be notified whenever the color changes on selector:
5417  * @until changed
5418  *
5419  * Next we ask to be notified whenever the color item is selected and longpressed:
5420  * @until color,item,longpressed
5421  *
5422  * We add some more code to the usual setup code:
5423  * @until ELM_MAIN()
5424  *
5425  * now get to the "changed" callback that sets the color of the rectangle:
5426  * @until }
5427  *
5428  * And now get to the "color,item,selected" callback that sets the color of the rectangle:
5429  * @until }
5430  *
5431  * And now get to the "color,item,longpressed" callback that gets and displays
5432  * the color of the rectangle:
5433  * @until }
5434  *
5435  * This example will look like this:
5436  *
5437  * @image html screenshots/colorselector_example_01.png
5438  * @image latex screenshots/colorselector_example_01.eps width=\textwidth
5439  *
5440  * @example colorselector_example_01.c
5441  */
5442
5443 /**
5444  * @page slideshow_example Slideshow widget example
5445  *
5446  * This application is aimed to exemplify the slideshow widget. It
5447  * consists of a window with a slideshow widget set as "resize
5448  * object", along with a control bar, in the form of a notify. Those
5449  * controls will exercise most of the slideshow's API functions.
5450  *
5451  * We create the slideshow, itself, first, making it @b loop on its
5452  * image itens, when in slideshow mode:
5453  * @dontinclude slideshow_example.c
5454  * @skip slideshow = elm_slideshow_add
5455  * @until evas_object_show
5456  *
5457  * Next, we define the <b>item class</b> for our slideshow
5458  * items. Slideshow images are going to be Elementary @ref Photo "photo"
5459  * widgets, here, as pointed by our @c get class
5460  * function. We'll let the Elementary infrastructure to delete those
5461  * objects for us, and, as there's no additional data attached to our
5462  * slideshow items, the @c del class function can be left undefined:
5463  * @dontinclude slideshow_example.c
5464  * @skip itc
5465  * @until ;
5466  * @dontinclude slideshow_example.c
5467  * @skip itc.func
5468  * @until = NULL
5469  * @dontinclude slideshow_example.c
5470  * @skip get our images to make slideshow items
5471  * @until }
5472  *
5473  * We now get to populate the slideshow widget with items. Our images
5474  * are going to be some randomly chosen from the Elementary package,
5475  * nine of them. For the first eight, we insert them ordered in the
5476  * widget, by using elm_slideshow_item_sorted_insert(). The comparing
5477  * function will use the image names to sort items. The last item is
5478  * inserted at the end of the slideshow's items list, with
5479  * elm_slideshow_item_add(). We check out how that list ends with
5480  * elm_slideshow_items_get(), than:
5481  * @dontinclude slideshow_example.c
5482  * @skip static const char *img
5483  * @until _2
5484  * @dontinclude slideshow_example.c
5485  * @skip first =
5486  * @until data_get
5487  *
5488  * Note that we save the pointers to the first and last items in the
5489  * slideshow, for future use.
5490  *
5491  * What follows is the code creating a notify, to be shown over the
5492  * slideshow's viewport, with knobs to act on it. We're not showing
5493  * that boilerplate code, but only the callbacks attached to the
5494  * interesting smart events of those knobs. The first four are
5495  * buttons, which will:
5496  * - Select the @b next item in the slideshow
5497  * - Select the @b previous item in the slideshow
5498  * - Select the @b first item in the slideshow
5499  * - Select the @b last item in the slideshow
5500  *
5501  * Check out the code for those four actions, being the two last @c
5502  * data pointers the same @c first and @c last pointers we save
5503  * before, respectively:
5504  * @dontinclude slideshow_example.c
5505  * @skip jump to next
5506  * @until }
5507  * @until }
5508  * @until }
5509  * @until }
5510  *
5511  * What follow are two hoversels, meant for one to change the
5512  * slideshow's @b transition and @b layout styles, respectively. We
5513  * fetch all the available transition and layout names to populate
5514  * those widgets and, when one selects any of them, we apply the
5515  * corresponding setters on the slideshow:
5516  * @dontinclude slideshow_example.c
5517  * @skip hv = elm_hoversel_add
5518  * @until show(hv)
5519  * @until show(hv)
5520  * @dontinclude slideshow_example.c
5521  * @skip transition changed
5522  * @until }
5523  * @until }
5524  *
5525  * For one to change the transition @b time on the slideshow widget,
5526  * we use a spinner widget. We set it to the initial value of 3
5527  * (seconds), which will be probed by the next knob -- a button
5528  * starting the slideshow, de facto. Note that changing the transition
5529  * time while a slideshow is already happening will adjust its
5530  * transition time:
5531  * @dontinclude slideshow_example.c
5532  * @skip spin = elm_spinner_add
5533  * @until evas_object_show
5534  * @dontinclude slideshow_example.c
5535  * @skip slideshow transition time has
5536  * @until }
5537  *
5538  * Finally, we have two buttons which will, respectively, start and
5539  * stop the slideshow on our widget. Here are their "clicked"
5540  * callbacks:
5541  * @dontinclude slideshow_example.c
5542  * @skip start the show
5543  * @until }
5544  * @until }
5545  *
5546  * This is how the example program's window looks like:
5547  * @image html screenshots/slideshow_example.png
5548  * @image latex screenshots/slideshow_example.eps width=\textwidth
5549  *
5550  * See the full @ref slideshow_example_c "source code" for
5551  * this example.
5552  *
5553  */
5554
5555 /**
5556  * @page tutorial_photocam Photocam example
5557  * @dontinclude photocam_example_01.c
5558  *
5559  * In this example we will have a photocam and a couple of buttons and slider to
5560  * control the photocam. To avoid cluttering we'll only show the parts of the
5561  * example that relate to the photocam, the full source code can be seen @ref
5562  * photocam_example_01.c "here".
5563  *
5564  * Creating a photocam is as easy as creating any other widget:
5565  * @skipline elm_photocam_add
5566  *
5567  * A photocam is only useful if we have a image on it, so lets set a file for it
5568  * to work with:
5569  * @until file_set
5570  *
5571  * We now set the photocam to not bounce horizontally:
5572  * @until bounce_set
5573  *
5574  * And we want to know when the photocam has finished loading the image so:
5575  * @until smart_callback
5576  *
5577  * The reason to know when the image is loaded is so that we can bring the
5578  * center of the image into view:
5579  * @skip static
5580  * @until }
5581  *
5582  * As mentioned we have 2 buttons in this example, the "Fit" one will cause
5583  * the photocam to go in to a zoom mode that makes the image fit inside the
5584  * photocam. Tough this has no effect on the image we also print what region was
5585  * being viewed before setting the zoom mode:
5586  * @skip static
5587  * @until }
5588  * @note When in fit mode our slider(explained below) won't work.
5589  *
5590  * The second button("Unfit") will bring the photocam back into manual zoom
5591  * mode:
5592  * @skip static
5593  * @until }
5594  *
5595  * Our slider controls the level of zoom of the photocam:
5596  * @skip static
5597  * @until }
5598  * @note It is important to note that this only works when in manual zoom mode.
5599  *
5600  * Our example will initially look like this:
5601  *
5602  * @image html screenshots/photocam_example_01.png
5603  * @image latex screenshots/photocam_example_01.eps width=\textwidth
5604  *
5605  * @example photocam_example_01.c
5606  */
5607
5608 /**
5609  * @page inwin_example_01 Inwin - General overview
5610  *
5611  * Inwin is a very simple widget to show, so this example will be a very simple
5612  * one, just using all of the available API.
5613  *
5614  * The program is nothing but a window with a lonely button, as shown here.
5615  *
5616  * @image html screenshots/inwin_example.png
5617  * @image latex screenshots/inwin_example.eps width=\textwidth
5618  *
5619  * And pressing the button makes an inwin appear.
5620  *
5621  * @image html screenshots/inwin_example_a.png
5622  * @image latex screenshots/inwin_example_a.eps width=\textwidth
5623  *
5624  * And the code is just as simple. We being with some global variables to keep
5625  * track of our Inwin.
5626  * @dontinclude inwin_example.c
5627  * @skip static
5628  * @until current_style
5629  *
5630  * And two callbacks used by the buttons the above screenshot showed. In these,
5631  * we check if @c inwin exists and execute the proper action on it. If it's not
5632  * there anymore, then we were abandoned to our luck, so we disabled ourselves.
5633  * @until _inwin_destroy
5634  * @until }
5635  * @until }
5636  *
5637  * The lonely button from the beginning, when clicked, will call the following
5638  * function, which begins by checking if an inwin exists, and if it's there,
5639  * we bring it back to the front and exit from our function without any further
5640  * ado.
5641  * @until }
5642  *
5643  * But if no inwin is there to show, we need to create one. First we need the
5644  * top-most window for the program, as no inwin can be created using other
5645  * objects as parents. Then we create our popup, set the next style in the list
5646  * and show it.
5647  * @until current_style =
5648  *
5649  * As for the content of our inwin, it's just a box with a label and some
5650  * buttons inside.
5651  * @until _inwin_destroy
5652  * @until }
5653  *
5654  * Now, all the code above shows how every object must always be set as content
5655  * for some other object, be it by setting the full content, packing it in a
5656  * box or table or working as icon for some other widget. But we didn't do
5657  * anything like that for the inwin, this one is just created and shown and
5658  * everything works. Other widgets can be used this way, but they would need
5659  * to be placed and resized manually or nothing would be shown correctly. The
5660  * inwin, however, sets itself as a children of the top-level window and will
5661  * be resized as the parent window changes too.
5662  *
5663  * Another characteristic of Inwin is that when it's shown above everyone else,
5664  * it will work kind of like a modal window, blocking any other widget from
5665  * receiving events until the window is manually dismissed by pressing some
5666  * button to close it or having blocking task signalling its completion so
5667  * normal operations can be resumed. This is unlike the @ref Hover widget,
5668  * that would show its content on top of the designated target, but clicking
5669  * anywhere else would dismiss it automatically.
5670  *
5671  * To illustrate that last point, when we close the main window and an inwin
5672  * is still there, we'll take out the content from the inwin and place it in
5673  * a hover.
5674  * @until }
5675  * @until }
5676  *
5677  * And the rest of the program doesn't have anything else related to inwin,
5678  * so it won't be shown here, but you can find it in
5679  * @ref inwin_example.c "inwin_example.c".
5680  *
5681  * @example inwin_example.c
5682  */
5683
5684 /**
5685  * @page tutorial_scroller Scroller example
5686  * @dontinclude scroller_example_01.c
5687  *
5688  * This example is very short and will illustrate one way to use a scroller.
5689  * We'll omit the declaration of the @p text variable because it's a very long
5690  * @htmlonly<a href="http://lipsum.com/">@endhtmlonly ipsum lorem
5691  * @htmlonly</a>@endhtmlonly. If you really want to see the full code, it's @ref
5692  * scroller_example_01.c "scroller_example_01.c".
5693  *
5694  * We start our example by creating our window and background:
5695  * @skip EAPI
5696  * @until show(bg)
5697  *
5698  * Next we create a label and set it's text to @p text(very long ipsum lorem):
5699  * @until show(label)
5700  *
5701  * We then create our scroller, ask that it have the same size as the window and
5702  * set its content:
5703  * @until content_set
5704  *
5705  * We are now going to set a number of properties in our scroller:
5706  * @li We make it bounce horizontally but not vertically.
5707  * @li We make both scrollbars always be visible.
5708  * @li We have the events be propagated from the content to the scroller.
5709  * @li We enforce a page policy vertically(having a page be the size of the
5710  * viewport) and leave horizontal scrolling free.
5711  * @li And finally we ask the scroller to show us a region starting at 50,50 and
5712  * having a width and height of 200px.
5713  * @until region_show
5714  * @note Observant reader will note that the elm_scroller_region_show() didn't
5715  * scroll the view vertically, this is because we told the scroller to only
5716  * accept vertical scrolling in pages.
5717  *
5718  * And now we're done:
5719  * @until ELM_MAIN
5720  *
5721  * Our example will look like this:
5722  *
5723  * @image html screenshots/scroller_example_01.png
5724  * @image latex screenshots/scroller_example_01.eps width=\textwidth
5725  *
5726  * @example scroller_example_01.c
5727  */
5728
5729 /**
5730  * @page tutorial_table_01
5731  *
5732  * In this example we add four labels to a homogeneous table that has a padding
5733  * of 5px between cells.
5734  *
5735  * The interesting bits from this example are:
5736  * @li Where we set the table as homogeneous and the padding:
5737  * @dontinclude table_example_01.c
5738  * @skip padding_set
5739  * @until homogeneous_set
5740  * @li Where we add each label to the table:
5741  * @skipline elm_table_pack
5742  * @skipline elm_table_pack
5743  * @skipline elm_table_pack
5744  * @skipline elm_table_pack
5745  *
5746  * Here you can see the full source:
5747  * @include table_example_01.c
5748  *
5749  * Our example will look like this:
5750  *
5751  * @image html screenshots/table_example_01.png
5752  * @image latex screenshots/table_example_01.eps width=\textwidth
5753  *
5754  * @example table_example_01.c
5755  */
5756
5757 /**
5758  * @page tutorial_table_02
5759  *
5760  * For our second example we'll create a table with 4 rectangles in it. Since
5761  * our rectangles are of different sizes our table won't be homogeneous.
5762  *
5763  * The interesting bits from this example are:
5764  * @li Where we set the table as not homogeneous:
5765  * @dontinclude table_example_02.c
5766  * @skipline homogeneous_set
5767  * @li Where we add each rectangle to the table:
5768  * @skipline elm_table_pack
5769  * @skipline elm_table_pack
5770  * @skipline elm_table_pack
5771  * @skipline elm_table_pack
5772  *
5773  * Here you can see the full source:
5774  * @include table_example_02.c
5775  *
5776  * Our example will look like this:
5777  *
5778  * @image html screenshots/table_example_02.png
5779  * @image latex screenshots/table_example_02.eps width=\textwidth
5780  *
5781  * @example table_example_02.c
5782  */
5783
5784 /**
5785  * @page tutorial_menu Menu Example
5786  * @dontinclude menu_example_01.c
5787  *
5788  * This example shows how to create a menu with regular items, object items,
5789  * submenus and how to delete items from a menu. The full source for this
5790  * example is @ref menu_example_01.c "menu_example_01.c".
5791  *
5792  * We'll start looking at the menu creation and how to create a very simple
5793  * item:
5794  * @skip menu_add
5795  * @until item_add
5796  *
5797  * For our next item we are going to add an icon:
5798  * @until item_add
5799  *
5800  * Now we are going to add more items, but these icons are going to have a
5801  * parent, which will put them in a sub-menu. First just another item with an
5802  * icon:
5803  * @until item_add
5804  *
5805  * Next we are going to add a button to our menu(any elm widget can be added to
5806  * a menu):
5807  * @until item_add
5808  *
5809  * We are also going to have the button delete the first item of our
5810  * sub-menu when clicked:
5811  * @until smart_callback
5812  * @dontinclude menu_example_01.c
5813  * @skip static
5814  * @until }
5815  *
5816  * We now add a separator and three more regular items:
5817  * @until item_add
5818  * @until item_add
5819  * @until item_add
5820  *
5821  * We now add another item, however this time it won't go the sub-menu and it'll
5822  * be disabled:
5823  * @until disabled_set
5824  *
5825  * To make sure that our menu is shown whenever the window is clicked(and where
5826  * clicked) we use the following callback:
5827  * @dontinclude menu_example_01.c
5828  * @skip static
5829  * @skipline static
5830  * @until }
5831  *
5832  * Our example will look like this:
5833  *
5834  * @image html screenshots/menu_example_01.png
5835  * @image latex screenshots/menu_example_01.eps width=\textwidth
5836  *
5837  * @example menu_example_01.c
5838  */
5839
5840 /**
5841  * @page win_example_01 Win - General API overview
5842  *
5843  * For most users of the Elementary API, the @ref Win widget has a lot more
5844  * functions than what they need.
5845  *
5846  * In general, a developer will create a window, set some content on it and
5847  * forget about it for the rest of its program's life, letting whatever
5848  * Window Manager is there to handle the window. Here, however, we are going
5849  * to show how to generally manage a window.
5850  *
5851  * We'll have a bit more than the usual includes here, since part of the
5852  * example requires some low level fiddling.
5853  * @dontinclude win_example.c
5854  * @skip ifdef
5855  * @until Elementary.h
5856  *
5857  * The program then, consists of one window with two lists of buttons, each
5858  * of which operates on another two windows. One of them is a normal window,
5859  * the other has the @c override flag set so the Window Manager ignores it.
5860  *
5861  * Pressing each button will call the corresponding function to act on the
5862  * corresponding window. These are pretty self explanatory, so we'll show
5863  * them in one batch.
5864  * @skip static void
5865  * @until elm_win_sticky_set
5866  * @until }
5867  *
5868  * Next, we handle the main window closing. We have a @c "delete,request"
5869  * callback set to ask if really want to quit. If so, we end the main loop,
5870  * otherwise just delete the popup message and continue running normally.
5871  * @until _no_quit_cb
5872  * @until _no_quit_cb
5873  * @until }
5874  *
5875  * The non-managed window, being completely ignored by the Window Manager,
5876  * is likely to never receive keyboard focus, even if we click on its entry
5877  * to write something. So we have a button on it that will forcefully focus
5878  * it by using some lower level functions to act directly on the X window.
5879  * Then, each time one of the window is focused, we print some message on a
5880  * console to show this more clearly.
5881  * @until _win_focused_cb
5882  * @until }
5883  *
5884  * And to finalize, the main function creates a window to hold all the action
5885  * buttons and another two to show how (and what) works on each of them.
5886  *
5887  * First, the main window will be a normal window, we'll enable the focus
5888  * highlight regardless of how it is configured so it's easier to navigate
5889  * the window with the keyboard. Then we hook our focus and delete callbacks
5890  * and set up the rest of the window's content.
5891  * @until evas_object_show(box)
5892  *
5893  * The first of our sub-windows is the managed one. We'll create it as a
5894  * dialog, which should make the Window Manager treat it as a non-resizable
5895  * window. We are also setting the window to be auto-deleted when the close
5896  * button in the titlebar is pressed.
5897  * @until evas_object_show(o)
5898  *
5899  * Now, we added an icon to the window as a resize object. We also set this
5900  * icon to not scale, and no weight size hints have been set for it. This way,
5901  * even if we hadn't created the window as a dialog, it would still not be
5902  * resizable. The window size is defined by its content, so it would never be
5903  * smaller than the smallest of its resize objects, and for it to be resizable,
5904  * all of those objects have to allow it.
5905  *
5906  * Next, we add the buttons with the actions to perform on this window. Using
5907  * a macro saves us typing and makes the world a happier place.
5908  * @until WIN_ACTION(sticky)
5909  *
5910  * The maximize one is likely to not work, because the Window Manager will
5911  * probably not enforce it upon a window that states its maximum size, much
5912  * less a dialog. But that can be changed by editting the example to use
5913  * #ELM_WIN_BASIC when creating the window and adding the following line to
5914  * the icon set as content
5915  * @code
5916  * evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
5917  * @endcode
5918  *
5919  * Lastly, the second sub-window will have it's override flag set. In it we
5920  * have a label with some text, and entry and a button. The entry can be
5921  * clicked normally to set focus on it, but whether it actually gets keyboard
5922  * input will also depend on the window getting focus, and since the window
5923  * is an override one, it will probably not gain it by normal means. The
5924  * button is there to force the focus at the X level to go to our window.
5925  * And to finish, another list of buttons with actions to perform on this
5926  * last window. Remember that most of them are requests or hints for the
5927  * Window Manager, so they are likely to do nothing on this window.
5928  * Similarly, there won't be any way to move it or resize it, because we
5929  * haven't implemented that kind of control on this example and that's
5930  * something controlled by Window Managers on windows they are tracking, which
5931  * is not the case with this one.
5932  * @until ELM_MAIN
5933  *
5934  * The full code listing of this example can be found at
5935  * @ref win_example.c "win_example.c".
5936  *
5937  * @example win_example.c
5938  */
5939
5940 /**
5941  * @page web_example_02 Web - Simple example
5942  *
5943  * WebKit-EFL is independent of any particular toolkit, such as Elementary,
5944  * so using it on applications requires that the programmer writes a lot of
5945  * boiler plate code to manage to manage the web object.
5946  *
5947  * For a full featured browser this may make sense, as the programmer will
5948  * want to have full control of every aspect of the web object, since it's the
5949  * main component of the application. But other programs with simpler
5950  * requirements, having to write so much code is undesired.
5951  *
5952  * This is where elm_web comes in. Its purpose is to provide a simple way
5953  * for developers to embed a simple web object in their programs, simplifying
5954  * the common use cases.
5955  *
5956  * This is not to say that a browser can't be made out of it, as this example
5957  * shows.
5958  *
5959  * We'll be making a simple browser, consisting of one window with an URL bar,
5960  * a toolbar to be used for the tabs and a pager to show one page at a time.
5961  *
5962  * When all tabs are closed, we'll be showing a default view with some custom
5963  * content, for which we need to get the internal @c ewk_view object and use
5964  * some WebKit functions on it, thus we need to include the necessary headers
5965  * first.
5966  *
5967  * @dontinclude web_example_02.c
5968  * @skip include
5969  * @until EWebKit
5970  *
5971  * A struct to keep track of the different widgets in use and the currently
5972  * shown tab. There's also an @c exiting flag, used to work around the overly
5973  * simplistic way in which this example is written, just to avoid some
5974  * warnings when closing the program.
5975  *
5976  * @skip typedef
5977  * @skip typedef
5978  * @until App_Data
5979  *
5980  * Each tab has its own struct too, but there's not much to it.
5981  * @until };
5982  *
5983  * Whenever the currently selected tab changes, we need to update some state
5984  * on the application. The back and forward buttons need to be disabled
5985  * accordingly and the URL bar needs to show the right address.
5986  *
5987  * @skip static void
5988  * @until naviframe_item_simple_promote
5989  * @until }
5990  *
5991  * Other updates happen based on events from the web object, like title change
5992  * to update the name shown in the tab, and URL change which will update the
5993  * URL bar if the event came from the currently selected tab.
5994  *
5995  * @skip tab_current_set
5996  * @skip static void
5997  * @until }
5998  * @until }
5999  *
6000  * Adding a new tab is just a matter of creating a new web widget, its data
6001  * and pushing it into the pager. A lot of the things that we should handle
6002  * here, such as how to react to popups and JavaScript dialogs, are done
6003  * already in the @c elm_web widget, so we can rely on their default
6004  * implementations. For the JavaScript dialogs we are going to avoid having
6005  * them open in a new window by setting the @c Inwin mode.
6006  *
6007  * There is no default implementation, however, for the requests to create a
6008  * new window, so we have to handle them by setting a callback function that
6009  * will ultimately call this very same function to add a new tab.
6010  *
6011  * @skip td->tab = NULL
6012  * @skip Tab_Data
6013  * @until }
6014  *
6015  * Entering an address in the URL bar will check if a tab exists, and if not,
6016  * create one and set the URL for it. The address needs to conform to the URI
6017  * format, so we check that it does and add the protocol if it's missing.
6018  *
6019  * @skip static char
6020  * @until eina_stringshare_del
6021  * @until }
6022  *
6023  * The navigation buttons are simple enough. As for the refresh, it normally
6024  * reloads the page using anything that may exist in the caches if applicable,
6025  * but we can press it while holding the @c Shift key to avoid the cache.
6026  *
6027  * @skip static void
6028  * @until web_forward
6029  * @until }
6030  *
6031  * The callback set for the new window request creates a new tab and returns
6032  * the web widget associated with it. This is important, this function must
6033  * return a valid web widget returned by elm_web_add().
6034  *
6035  * @skip static Evas_Object
6036  * @until }
6037  *
6038  * Pressing @c Ctrl-F will bring up the search box. Nothing about the box
6039  * itself is worth mentioning here, but it works as you would expect from any
6040  * other browser. While typing on it, it will highlight all occurrences of the
6041  * searched word. Pressing @c Enter will go to the next instance and the two
6042  * buttons next to the entry will move forward and backwards through the found
6043  * keywords.
6044  *
6045  * @skip win_del_request
6046  * @skip static void
6047  * @until win_search_trigger
6048  * @until }
6049  *
6050  * Last, create the main window and put all of the things used above in it. It
6051  * contains a default web widget that will be shown when no tabs exist. This
6052  * web object is not browsable per se, so history is disabled in it, and we
6053  * set the same callback to create new windows, on top of setting some custom
6054  * content of our own on it, with some links that will open new tabs to start
6055  * browsing quickly.
6056  *
6057  * @skip static void
6058  * @until ELM_MAIN
6059  *
6060  * Some parts of the code were left out, as they are not relevant to the
6061  * example, but the full listing can be found at @ref web_example_02.c
6062  * "web_example_02.c".
6063  *
6064  * @example web_example_02.c
6065  */
6066
6067 /**
6068  * @page efl_thread_1 EFL Threading example 1
6069  *
6070  * You can use threads with Elementary (and EFL) but you need to be careful
6071  * to only use eina or eet calls inside a thread. Other libraries are not
6072  * totally threadsafe except for some specific ecore calls designed for
6073  * working from threads like the ecore_pipe_write() and ecore_thread calls.
6074  *
6075  * Below is an example of how to use EFL calls from a native thread you have
6076  * already created. You have to put the EFL calls inside the critical block
6077  * between ecore_thread_main_loop_begin() and ecore_thread_main_loop_end()
6078  * which ensure you gain a lock on the mainloop. Beware that this requires
6079  * that the thread WAIT to synchronize with the mainloop at the beginning of
6080  * the critical section. It is highly suggested you use as few of these
6081  * in your thread as possible and probably put just a single
6082  * ecore_thread_main_loop_begin() / ecore_thread_main_loop_end() section
6083  * at the end of the threads calculation or work when it is done and
6084  * would otherwise exit to sit idle.
6085  *
6086  * For a progression of examples that become more complex and show other
6087  * ways to use threading with EFL, please see:
6088  *
6089  * @ref efl_thread_2
6090  *
6091  * @ref efl_thread_3
6092  *
6093  * @ref efl_thread_4
6094  *
6095  * @ref efl_thread_5
6096  *
6097  * @ref efl_thread_6
6098  *
6099  * @include efl_thread_1.c
6100  */
6101
6102 /**
6103  * @page efl_thread_2 EFL Threading example 2
6104  *
6105  * You can also use ecore_main_loop_thread_safe_call_sync() to call a
6106  * specific function that needs to do EFL main loop operations. This call
6107  * will block and wait to synchronise to the mainloop just like
6108  * ecore_thread_main_loop_begin() / ecore_thread_main_loop_end() will,
6109  * but instead you simply provide it the function callback to call instead
6110  * of inlining your code.
6111  *
6112  * @ref efl_thread_3
6113  *
6114  * @ref efl_thread_4
6115  *
6116  * @ref efl_thread_5
6117  *
6118  * @ref efl_thread_6
6119  *
6120  * @include efl_thread_2.c
6121  */
6122
6123 /**
6124  * @page efl_thread_3 EFL Threading example 3
6125  *
6126  * Like with ecore_main_loop_thread_safe_call_sync() you can provide a
6127  * callback to call inline in the mainloop, but this time with
6128  * ecore_main_loop_thread_safe_call_async() the callback is queued and
6129  * called asynchronously, without the thread blocking. The mainloop will
6130  * call this function when it comes around to its synchronisation point. This
6131  * acts as a "fire and forget" way of having the mainloop do some work
6132  * for a thread that has finished processing some data and is read to hand it
6133  * off to the mainloop and the thread wants to march on and do some more work
6134  * while the main loop deals with "displaying" the results of the previous
6135  * calculation.
6136  *
6137  * @ref efl_thread_4
6138  *
6139  * @ref efl_thread_5
6140  *
6141  * @ref efl_thread_6
6142  *
6143  * @include efl_thread_3.c
6144  */
6145
6146 /**
6147  * @page efl_thread_4 EFL Threading example 4
6148  *
6149  * Now when you want to have a thread do some work, send back results to
6150  * the mainloop and continue running but the mainloop controls when the
6151  * thread should stop working, you need some extra flags. This is an example
6152  * of how you might use ecore_main_loop_thread_safe_call_async() and pthreads
6153  * to do this.
6154  *
6155  * @ref efl_thread_5
6156  *
6157  * @ref efl_thread_6
6158  *
6159  * @include efl_thread_4.c
6160  */
6161
6162 /**
6163  * @page efl_thread_5 EFL Threading example 5
6164  *
6165  * This is the same as @ref efl_thread_4 but now uses the ecore_thread
6166  * infrastructure to have a running worker thread that feeds results back
6167  * to the mainloop and can easily be cancelled. This saves some code in the
6168  * application and makes for fewer problem spots if you forget a mutex.
6169  *
6170  * @ref efl_thread_6
6171  *
6172  * @include efl_thread_5.c
6173  */
6174
6175 /**
6176  * @page efl_thread_6 EFL Threading example 6
6177  *
6178  * You can also use the ecore_thread infrastructure for compute tasks that
6179  * don't send feedback as they go - they are one-shot compute jobs and when
6180  * done they will trigger the end callback in the mainloop which is intended
6181  * to pick up the results and "display them".
6182  *
6183  * @include efl_thread_6.c
6184  */
6185
6186 /**
6187  * @page prefs_example_01 Prefs Example 01
6188  *
6189  * This example shows how to create a simple prefs widget with Elementary,
6190  * where the items values are "reset" on each timer tick. We do that
6191  * <b>programmatically</b>, to demonstrate that by touching a given prefs
6192  * widgets prefs data values, the changes reflect instantly on the UI.
6193  *
6194  * We'll create items on the .EPC file and after handle it on the .C file.
6195  *
6196  * @section prefs-epc-01 Creating items on EPC file
6197  * @dontinclude prefs_example_01.epc
6198  *
6199  * First we'll create prefs items on .EPC file that we'll use later on
6200  * the .C file. Note that the code is similar to .EDC (edje) files.
6201  *
6202  * @skip collection
6203  * @until subtitle: "Example 01";
6204  *
6205  * Here we define a page item. Pages are group of items grouped together,
6206  * on a given prefs widget.
6207  *
6208  * @skipline widget: "elm/vertical_box";
6209  *
6210  * In this part, we create a @c INT type item, that by default will
6211  * become a spinner widget in the UI, and default, min and max
6212  * parameters are optional as well as in @c FLOAT type.
6213  *
6214  * @skip items {
6215  * @until max: 150;
6216  * @skipline }
6217  * @skipline }
6218  *
6219  * Other @c INT type widget implementations may exist, as is exemplifyed
6220  * on the item that follows.
6221  *
6222  * @skip item {
6223  * @until min: 0;
6224  * @skipline }
6225  * @skipline }
6226  *
6227  * Now we create a LABEL type item and by default will become a read-only
6228  * label in UI.
6229  *
6230  * @skip item {
6231  * @until }
6232  *
6233  * Now we create a TEXT type item and by default will become a single-line
6234  * text entry in UI. Note that we use a Regular Expression to deny only
6235  * entries with numbers.
6236  *
6237  * @skip item {
6238  * @until }
6239  * @skipline }
6240  *
6241  * In this part we create a DATE type item, by default will become a datetime
6242  * in UI, and default, min and max parameters are optional.
6243  *
6244  * @skip item {
6245  * @until }
6246  *
6247  * Here we create a SEPARATOR type item, it has no value bound,
6248  * serves only to divide and organize prefs items.
6249  *
6250  * @skip item {
6251  * @until }
6252  *
6253  * In this part, we create a SAVE type item that will get all the values
6254  * bounded to items and save it on CFG file. Next time you execute the
6255  * application, all the values that you saved before will be loaded.
6256  *
6257  * @skip item {
6258  * @until }
6259  *
6260  * Here we create a RESET type item that will return all the values bounded
6261  * to items as default declared on .EPC file.
6262  *
6263  * @skip item {
6264  * @until }
6265  *
6266  * Pages and items have default implementation widgets, but, with the tag
6267  * 'widget', you can use different widgets for prefs items. To a list of
6268  * default widgets supported by each type, by default, refer to the Elementary
6269  * Prefs Collection reference sheet. One can also register, at run time,
6270  * custom item widget handlers too.
6271  *
6272  * @section prefs-c-01 Handling items on C File
6273  * @dontinclude prefs_example_01.c
6274  *
6275  * Now we're handling the .C file and first we'll create a prefs widget.
6276  *
6277  * @skip prefs = elm_prefs_add(win);
6278  * @until evas_object_show(prefs);
6279  *
6280  * Here we add some specific callbacks, for example "item,changed" that will
6281  * be called when any item that we created on EPC file changes.
6282  *
6283  * @skip evas_object_smart_callback_add
6284  * @until _item_changed_cb, win);
6285  *
6286  * Here we set the prefs to save its values back (on the user data file)
6287  * automatically on every UI element changes.
6288  *
6289  * @skipline elm_prefs_autosave_set(prefs, EINA_TRUE);
6290  *
6291  * In this part we create the prefs data handle and set the .EPB file
6292  * (.EPC compiled). This .EPB file contains all the default values from the
6293  * items that we created, this file will be loaded when the program starts or
6294  * when clicked on a RESET type item. There is another file created when
6295  * the values from prefs items are saved, the .CFG file, that contains all the
6296  * non-standard saved values from the prefs items, this file will be loaded
6297  * when program starts as well.
6298  *
6299  * @dontinclude prefs_example_01.c
6300  * @skipline Elm_Prefs_Data *prefs_data;
6301  *
6302  * @skip prefs_data = elm_prefs_data_new
6303  * @until elm_prefs_data_set(prefs, prefs_data);
6304  *
6305  * Here we just create a notify widget to appear when the values are reset.
6306  *
6307  * @skip label = elm_label_add(win);
6308  * @until evas_object_show(notify);
6309  *
6310  * Now we add a timer to reset the items values on each 5.0 seconds and
6311  * show the notify.
6312  *
6313  * @skipline evas_object_data_set(notify
6314  * @skipline timer = ecore_timer_add(5.0,
6315  *
6316  * @dontinclude prefs_example_01.c
6317  * @skip _elm_prefs_data_change(void *data)
6318  * @until return ECORE_CALLBACK_RENEW;
6319  * @skipline }
6320  *
6321  * Here we finish the example. The full source code can be found on
6322  * @ref prefs_example_01_c and
6323  * @ref prefs_example_01_epc
6324  *
6325  */
6326
6327 /**
6328  * @page prefs_example_02 Prefs Example 02
6329  *
6330  * This example shows how to create a simple prefs widget with Elementary,
6331  * where some items properties are changed on each timer tick.
6332  *
6333  * We'll create items on the .EPC file and after handle it on the .C file.
6334  *
6335  * @section prefs-epc-02 Creating items on EPC file
6336  * @dontinclude prefs_example_02.epc
6337  *
6338  * First we'll create prefs items on .EPC file that we'll use later on
6339  * the .C file. Note that the code is similar to .EDC (edje) files.
6340  *
6341  * @skip collection
6342  * @until widget: "elm/vertical_frame";
6343  *
6344  * In this part, we create a @c TEXTAREA item and, by default, it will
6345  * become a multi-line text entry in the UI. Note that we use a
6346  * regular expression to accept only characters and whitespaces in it.
6347  *
6348  * @skip items {
6349  * @until }
6350  * @skipline }
6351  *
6352  * Now we create a FLOAT type item, by default will become a spinner in UI,
6353  * and default, min and max parameters are optional as well as in INT type.
6354  *
6355  * @skip item {
6356  * @until }
6357  * @skipline }
6358  *
6359  * Here we create a BOOL type item, by default will become a checkbox in UI.
6360  *
6361  * @skip item {
6362  * @until }
6363  * @skipline }
6364  *
6365  * Here we create two items, separator and save types, that we've already
6366  * covered in
6367  * @ref prefs_example_01
6368  *
6369  * @skip item {
6370  * @until label: "Save";
6371  * @skipline }
6372  *
6373  * In this part, we create a ACTION type item. when clicked, the
6374  * action item will emit a signal to .C file and call a smart callback.
6375  *
6376  * @skip item {
6377  * @until }
6378  * @skipline }
6379  * @skipline }
6380  * @skipline }
6381  *
6382  * @section prefs-c-02 Handling items on C File
6383  * @dontinclude prefs_example_02.c
6384  *
6385  * Now we're handling the .C file and first we'll create a prefs widget.
6386  *
6387  * @skip prefs = elm_prefs_add(win);
6388  * @until evas_object_show(prefs);
6389  *
6390  * In this part we add the action smart callback, that will be called when
6391  * the action item be clicked.
6392  *
6393  * @skipline evas_object_smart_callback_add
6394  *
6395  * Here we add a simple action item callback that sets a text to another item.
6396  *
6397  * @dontinclude prefs_example_02.c
6398  * @skip _action_cb(void *data
6399  * @until }
6400  *
6401  * Now we set the prefs to save its values back (on the user data file)
6402  * automatically on every UI element changes.
6403  *
6404  * @skipline elm_prefs_autosave_set(prefs, EINA_TRUE);
6405  *
6406  * In this part we create the prefs data handle and set the .EPB file
6407  * (.EPC compiled).
6408  *
6409  * @dontinclude prefs_example_02.c
6410  * @skipline Elm_Prefs_Data *prefs_data;
6411  *
6412  * @skip prefs_data = elm_prefs_data_new
6413  * @until elm_prefs_data_set(prefs, prefs_data);
6414  *
6415  * Here we just create a notify widget to appear when the items properties
6416  * are changed.
6417  *
6418  * @skip label = elm_label_add(win);
6419  * @until evas_object_show(notify);
6420  *
6421  * Now we add a timer to change text editable, spinners visibility and checkbox
6422  * enable/disable properties on each 5.0 seconds and show the notify.
6423  *
6424  * @skip evas_object_data_set(notify
6425  * @until _elm_prefs_items_change, notify);
6426  *
6427  * @dontinclude prefs_example_02.c
6428  * @skip _elm_prefs_items_change(void *data)
6429  * @until return ECORE_CALLBACK_RENEW;
6430  * @skipline }
6431  *
6432  * Here we finish the example. The full source code can be found on
6433  * @ref prefs_example_02_c and
6434  * @ref prefs_example_02_epc
6435  *
6436  */
6437
6438 /**
6439  * @page prefs_example_03 Prefs Example 03
6440  *
6441  * This example shows how to create a prefs widget with Elementary, where some
6442  * prefs item values are changed, some actions take place on an object
6443  * different than the prefs widget (an Edge object). With this new object,
6444  * we're also exemplifying the prefs SWALLOW item type, as the Edje object is
6445  * put inside the prefs widget's viewport.
6446  *
6447  * It also shows how subpages can be created using the prefs PAGE item type.
6448  *
6449  * Explain step by step the .EDC file is out of scope, the source code
6450  * can be found at
6451  * @ref prefs_example_03_edc
6452  *
6453  * @section prefs-epc-03 Creating items on EPC file
6454  * @dontinclude prefs_example_03.epc
6455  *
6456  * First we'll create prefs items on .EPC file that we'll use later on
6457  * the .C file.
6458  *
6459  * @skip collection
6460  * @until widget: "elm/vertical_frame";
6461  *
6462  * In the following part, we create an item of the PAGE type, that will create a
6463  * subpage inside the main page. The source parameter is used to set which page
6464  * will be used to fill the subpage, in this example, the page named
6465  * "configpage" will be used.
6466  *
6467  * @skip items {
6468  * @until type: SEPARATOR;
6469  * @skipline }
6470  *
6471  * Now we create a SWALLOW type item, that, as the name suggests, will
6472  * swallow an Evas_Object.
6473  *
6474  * @skip item {
6475  * @until }
6476  *
6477  * Now we create the page that will be used to fill the item "config" of the
6478  * main page. It has another two subpages and a SEPARATOR item arranged
6479  * horizontally so we could achieve the desired layout.
6480  *
6481  * @skip page
6482  * @until source: "buttonspage";
6483  * @skipline }
6484  * @skipline }
6485  * @skipline }
6486  *
6487  * Then we create the pages used by the "configpage" page, whose items
6488  * were covered in @ref prefs_example_01 and @ref prefs_example_02.
6489  *
6490  * @skip page
6491  * @until label: "Reset";
6492  * @skipline }
6493  * @skipline }
6494  * @skipline }
6495  *
6496  * @section prefs-c-03 Handling items on C File
6497  * @dontinclude prefs_example_03.c
6498  *
6499  * Now we're handling the .C file and first we'll create a layout setting the
6500  * edje file to after a prefs item swallows it.
6501  *
6502  * @skip layout = elm_layout_add(win);
6503  * @until "prefs_edje");
6504  *
6505  * Here we create the prefs widget, add smart callbacks and create the prefs
6506  * data handle.
6507  *
6508  * @skip prefs = elm_prefs_add(win);
6509  * @until elm_prefs_data_set(prefs, prefs_data);
6510  *
6511  * Now we "swallow" the layout into the SWALLOW item of the prefs widget.
6512  *
6513  * @skipline elm_prefs_item_swallow(prefs,
6514  *
6515  * Page loaded and item changed callbacks will call update functions.
6516  *
6517  * @dontinclude prefs_example_03.c
6518  * @skip _page_loaded_cb(void *data,
6519  * @until _update_animation(obj, layout);
6520  * @skipline }
6521  *
6522  * These update functions will be called in order to get the new value from
6523  * the items and pass it as signal to edje handle it and affects on animation.
6524  *
6525  * @dontinclude prefs_example_03.c
6526  * @skip _update(Evas_Object *prefs,
6527  * @until }
6528  *
6529  * In this function we'll get the checkbox (bool) value and start or stop
6530  * the animation on edje.
6531  *
6532  * @dontinclude prefs_example_03.c
6533  * @skip _update_animation(Evas_Object *prefs,
6534  * @until }
6535  *
6536  * In this function we'll get the slider (float item) value and send it as
6537  * animation time to edje.
6538  *
6539  * @skip _update_animation_time(Evas_Object *prefs,
6540  * @until }
6541  *
6542  * Here we finish the example. The full source code can be found on
6543  * @ref prefs_example_03_c,
6544  * @ref prefs_example_03_epc and
6545  * @ref prefs_example_03_edc
6546  *
6547  */
6548
6549 /**
6550  * @page bg_example_01_c bg_example_01.c
6551  * @include bg_example_01.c
6552  * @example bg_example_01.c
6553  */
6554
6555
6556 /**
6557  * @page bg_example_02_c bg_example_02.c
6558  * @include bg_example_02.c
6559  * @example bg_example_02.c
6560  */
6561
6562 /**
6563  * @page bg_example_03_c bg_example_03.c
6564  * @include bg_example_03.c
6565  * @example bg_example_03.c
6566  */
6567
6568 /**
6569  * @page actionslider_example_01 Actionslider example
6570  * @include actionslider_example_01.c
6571  * @example actionslider_example_01.c
6572  */
6573
6574 /**
6575  * @page transit_example_01_c Transit example 1
6576  * @include transit_example_01.c
6577  * @example transit_example_01.c
6578  */
6579
6580 /**
6581  * @page transit_example_02_c Transit example 2
6582  * @include transit_example_02.c
6583  * @example transit_example_02.c
6584  */
6585
6586 /**
6587  * @page general_functions_example_c General (top-level) functions example
6588  * @include general_funcs_example.c
6589  * @example general_funcs_example.c
6590  */
6591
6592 /**
6593  * @page clock_example_c Clock example
6594  * @include clock_example.c
6595  * @example clock_example.c
6596  */
6597
6598  /**
6599  * @page datetime_example_c Datetime example
6600  * @include datetime_example.c
6601  * @example datetime_example.c
6602  */
6603
6604 /**
6605  * @page dayselector_example_c Dayselector example
6606  * @include dayselector_example.c
6607  * @example dayselector_example.c
6608  */
6609
6610 /**
6611  * @page flipselector_example_c Flipselector example
6612  * @include flipselector_example.c
6613  * @example flipselector_example.c
6614  */
6615
6616 /**
6617  * @page fileselector_example_c Fileselector example
6618  * @include fileselector_example.c
6619  * @example fileselector_example.c
6620  */
6621
6622 /**
6623  * @page fileselector_button_example_c Fileselector button example
6624  * @include fileselector_button_example.c
6625  * @example fileselector_button_example.c
6626  */
6627
6628 /**
6629  * @page fileselector_entry_example_c Fileselector entry example
6630  * @include fileselector_entry_example.c
6631  * @example fileselector_entry_example.c
6632  */
6633
6634 /**
6635  * @page index_example_01_c Index example
6636  * @include index_example_01.c
6637  * @example index_example_01.c
6638  */
6639
6640 /**
6641  * @page index_example_02_c Index example
6642  * @include index_example_02.c
6643  * @example index_example_02.c
6644  */
6645
6646 /**
6647  * @page layout_example_01_c layout_example_01.c
6648  * @include layout_example_01.c
6649  * @example layout_example_01.c
6650  */
6651
6652 /**
6653  * @page layout_example_02_c layout_example_02.c
6654  * @include layout_example_02.c
6655  * @example layout_example_02.c
6656  */
6657
6658 /**
6659  * @page layout_example_03_c layout_example_03.c
6660  * @include layout_example_03.c
6661  * @example layout_example_03.c
6662  */
6663
6664 /**
6665  * @page layout_example_edc An example of layout theme file
6666  *
6667  * This theme file contains two groups. Each of them is a different theme, and
6668  * can be used by an Elementary Layout widget. A theme can be used more than
6669  * once by many different Elementary Layout widgets too.
6670  *
6671  * @include layout_example.edc
6672  * @example layout_example.edc
6673  */
6674
6675 /**
6676  * @page gengrid_example_c Gengrid example
6677  * @include gengrid_example.c
6678  * @example gengrid_example.c
6679  */
6680
6681 /**
6682  * @page genlist_example_01_c genlist_example_01.c
6683  * @include genlist_example_01.c
6684  * @example genlist_example_01.c
6685  */
6686
6687 /**
6688  * @page genlist_example_02_c genlist_example_02.c
6689  * @include genlist_example_02.c
6690  * @example genlist_example_02.c
6691  */
6692
6693 /**
6694  * @page genlist_example_04_c genlist_example_04.c
6695  * @include genlist_example_04.c
6696  * @example genlist_example_04.c
6697  */
6698
6699 /**
6700  * @page genlist_example_05_c genlist_example_05.c
6701  * @include genlist_example_05.c
6702  * @example genlist_example_05.c
6703  */
6704
6705 /**
6706  * @page thumb_example_01_c thumb_example_01.c
6707  * @include thumb_example_01.c
6708  * @example thumb_example_01.c
6709  */
6710
6711 /**
6712  * @page progressbar_example_c Progress bar example
6713  * @include progressbar_example.c
6714  * @example progressbar_example.c
6715  */
6716
6717 /**
6718  * @page slideshow_example_c Slideshow example
6719  * @include slideshow_example.c
6720  * @example slideshow_example.c
6721  */
6722
6723 /**
6724  * @page efl_thread_1_c EFL Threading example 1
6725  * @include efl_thread_1.c
6726  * @example efl_thread_1.c
6727  */
6728
6729 /**
6730  * @page efl_thread_2_c EFL Threading example 2
6731  * @include efl_thread_2.c
6732  * @example efl_thread_2.c
6733  */
6734
6735 /**
6736  * @page efl_thread_3_c EFL Threading example 3
6737  * @include efl_thread_3.c
6738  * @example efl_thread_3.c
6739  */
6740
6741 /**
6742  * @page efl_thread_4_c EFL Threading example 4
6743  * @include efl_thread_4.c
6744  * @example efl_thread_4.c
6745  */
6746
6747 /**
6748  * @page efl_thread_5_c EFL Threading example 5
6749  * @include efl_thread_5.c
6750  * @example efl_thread_5.c
6751  */
6752
6753 /**
6754  * @page efl_thread_6_c EFL Threading example 6
6755  * @include efl_thread_6.c
6756  * @example efl_thread_6.c
6757  */
6758
6759 /**
6760  * @page prefs_example_01_c prefs_example_01.c
6761  * @include prefs_example_01.c
6762  * @example prefs_example_01.c
6763  */
6764
6765 /**
6766  * @page prefs_example_01_epc prefs_example_01.epc
6767  * @include prefs_example_01.epc
6768  * @example prefs_example_01.epc
6769  */
6770
6771 /**
6772  * @page prefs_example_02_c prefs_example_02.c
6773  * @include prefs_example_02.c
6774  * @example prefs_example_02.c
6775  */
6776
6777 /**
6778  * @page prefs_example_02_epc prefs_example_02.epc
6779  * @include prefs_example_02.epc
6780  * @example prefs_example_02.epc
6781  */
6782
6783 /**
6784  * @page prefs_example_03_c prefs_example_03.c
6785  * @include prefs_example_03.c
6786  * @example prefs_example_03.c
6787  */
6788
6789 /**
6790  * @page prefs_example_03_epc prefs_example_03.epc
6791  * @include prefs_example_03.epc
6792  * @example prefs_example_03.epc
6793  */
6794
6795 /**
6796  * @page prefs_example_03_edc prefs_example_03.edc
6797  * @include prefs_example_03.edc
6798  * @example prefs_example_03.edc
6799  */
6800
6801 /**
6802  * @example prefs_data_example.c
6803  * @example glview_example_01.c
6804  * @example track_example_01.c
6805  * @example codegen_example.c
6806  * @example efl_thread_win32_1.c
6807  * @example efl_thread_win32_2.c
6808  * @example efl_thread_win32_3.c
6809  * @example efl_thread_win32_4.c
6810  * @example location_example_01.c
6811  * @example naviframe_example.c
6812  */