elementary/genlist - Examples 04 and 05 explained.
[framework/uifw/elementary.git] / doc / examples.dox
1 /**
2  * @page Examples Examples
3  *
4  * Here is a page with 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 elm_animator_example_page_01
15  *
16  * @ref transit_example_01_explained
17  *
18  * @ref transit_example_02_explained
19  *
20  * @ref general_functions_example_page
21  *
22  * @ref calendar_example_01
23  *
24  * @ref calendar_example_02
25  *
26  * @ref calendar_example_03
27  *
28  * @ref calendar_example_04
29  *
30  * @ref calendar_example_05
31  *
32  * @ref calendar_example_06
33  *
34  * @ref spinner_example
35  *
36  * @ref slider_example
37  *
38  * @ref panes_example
39  *
40  * @ref clock_example
41  *
42  * @ref diskselector_example_01
43  *
44  * @ref diskselector_example_02
45  *
46  * @ref list_example_01
47  *
48  * @ref list_example_02
49  *
50  * @ref list_example_03
51  *
52  * @ref flipselector_example
53  *
54  * @ref fileselector_example
55  *
56  * @ref fileselector_button_example
57  *
58  * @ref fileselector_entry_example
59  *
60  * @ref index_example_01
61  *
62  * @ref index_example_02
63  *
64  * @ref gengrid_example
65  *
66  * @ref genlist_example_01
67  *
68  * @ref genlist_example_02
69  *
70  * @ref genlist_example_04
71  *
72  * @ref genlist_example_05
73  *
74  * @ref progressbar_example
75  *
76  * @ref slideshow_example
77  */
78
79 /**
80  * @page bg_01_example_page elm_bg - Plain color background.
81  * @dontinclude bg_example_01.c
82  *
83  * The full code for this example can be found at @ref bg_example_01_c,
84  * in the function @c test_bg_plain. It's part of the @c elementar_test
85  * suite, and thus has the code for the three examples referenced by this
86  * documentation.
87  *
88  * This first example just sets a default background with a plain color. The
89  * first part consists of creating an Elementary window. It's the common
90  * piece of code that you'll see everywhere in Elementary: @skip elm_main
91  * @until autodel_set
92  *
93  * Now we really create our background object, using the window object as
94  * its parent:
95  *
96  * @skipline bg_add
97  *
98  * Then we set the size hints of the background object so that it will use
99  * all space available for it, and then add it as a resize object to the
100  * window, making it visible in the end:
101  *
102  * @skip size_hint_weight_set
103  * @until resize_object_add
104  *
105  * See @ref evas_object_size_hint_weight_set and elm_win_resize_object_add()
106  * for more detailed info about these functions.
107  *
108  * The end of the example is quite simple, just setting the minimum and
109  * maximum size of the background, so the Elementary window knows that it
110  * has to have at least the minimum size. The background also won't scale to
111  * a size above its maximum. Then we resize the window and show it in the
112  * end:
113  *
114  * @skip set size hints
115  * @until }
116  *
117  * And here we finish our very simple background object usage example.
118  */
119
120 /**
121  * @page bg_02_example_page elm_bg - Image background.
122  * @dontinclude bg_example_02.c
123  *
124  * The full code for this example can be found at @ref bg_example_02_c,
125  * in the function @c test_bg_image. It's part of the @c elementar_test
126  * suite, and thus has the code for the three examples referenced by this
127  * documentation.
128  *
129  * This is the second example, and shows how to use the Elementary
130  * background object to set an image as background of your application.
131  *
132  * We start this example exactly in the same way as the previous one, even
133  * when creating the background object:
134  *
135  * @skip elm_main
136  * @until bg_add
137  *
138  * Now it's the different part.
139  *
140  * Our background will have an image, that will be displayed over the
141  * background color. Before loading the image, we set the load size of the
142  * image. The load size is a hint about the size that we want the image
143  * displayed in the screen. It's not the exact size that the image will have,
144  * but usually a bit bigger. The background object can still be scaled to a
145  * size bigger than the one set here. Setting the image load size to
146  * something smaller than its real size will reduce the memory used to keep
147  * the pixmap representation of the image, and the time to load it. Here we
148  * set the load size to 20x20 pixels, but the image is loaded with a size
149  * bigger than that (since it's just a hint):
150  *
151  * @skipline load_size_set
152  *
153  * And set our background image to be centered, instead of stretched or
154  * scaled, so the effect of the elm_bg_load_size_set() can be easily
155  * understood:
156  *
157  * @skipline option_set
158  *
159  * We need a filename to set, so we get one from the previous installed
160  * images in the @c PACKAGE_DATA_DIR, and write its full path to a buffer.
161  * Then we use this buffer to set the filename in the background object:
162  *
163  * @skip snprintf
164  * @until bg_file_set
165  *
166  * Notice that the third argument of the elm_bg_file_set() function is @c
167  * NULL, since we are setting an image to this background. This function
168  * also supports setting an edje group as background, in which case the @c
169  * group parameter wouldn't be @c NULL, but be the name of the group
170  * instead.
171  *
172  * Finally, we can set the size hints, add the background as a resize
173  * object, and resize the window, exactly the same thing we do in the @ref
174  * bg_01_example_page example:
175  *
176  * @skip size_hint
177  * @until }
178  *
179  * And this is the end of this example.
180  *
181  * This example will look like this:
182  *
183  * @image html screenshots/bg_01.png
184  * @image latex screenshots/bg_01.eps width=\textwidth
185  */
186
187 /**
188  * @page bg_03_example_page elm_bg - Background properties.
189  * @dontinclude bg_example_03.c
190  *
191  * The full code for this example can be found at @ref bg_example_03_c, in the
192  * function @c test_bg_options, with the callbacks @c _cb_overlay_changed, @c
193  * _cb_color_changed and @c _cb_radio_changed defined in the beginning of the
194  * file. It's part of the @c elementar_test suite, and thus has the code for
195  * the three examples referenced by this documentation.
196  *
197  * This example will show the properties available for the background object,
198  * and will use of some more widgets to set them.
199  *
200  * In order to do this, we will set some callbacks for these widgets. The
201  * first is for the radio buttons that will be used to choose the option
202  * passed as argument to elm_bg_option_set():
203  *
204  * @skip _cb_radio_changed
205  * @until }
206  *
207  * The next callback will be used when setting the overlay (using
208  * elm_bg_overlay_set()):
209  *
210  * @skip _cb_overlay_changed
211  * @until }
212  * @until }
213  *
214  * And the last one, used to set the color (with elm_bg_color_set()):
215  *
216  * @skip _cb_color_changed
217  * @until }
218  *
219  * We will get back to what these functions do soon. If you want to know more
220  * about how to set these callbacks and what these widgets are, look for:
221  * @li elm_radio_add()
222  * @li elm_check_add()
223  * @li elm_spinner_add()
224  *
225  * Now going to the main function, @c test_bg_options, we have the common
226  * code with the other examples:
227  *
228  * @skip bg-options
229  * @until autodel_set
230  *
231  * We add a plain background to this window, so it will have the default
232  * background color behind everything:
233  *
234  * @skip bg = elm_bg_add
235  * @until evas_object_show(bg)
236  *
237  * Then we add a vertical box (elm_box_add()) that will hold the background
238  * object that we are going to play with, as well as a horizontal box that
239  * will hold widgets:
240  *
241  * @skip elm_box_add
242  * @until evas_object_show
243  *
244  * Now we add the background object that is going to be of use for our
245  * example. It is an image background, as used in @ref bg_02_example_page ,
246  * so the code should be familiar:
247  *
248  * @skip elm_bg_add
249  * @until evas_object_show
250  *
251  * Notice the call to elm_box_pack_end(): it will pack the background object
252  * in the end of the Elementary box declared above. Just refer to that
253  * documentation for more info.
254  *
255  * Since this Elementary background is already an image background, we are
256  * going to play with its other properties. We will change its option
257  * (CENTER, SCALE, STRETCH, TILE), its color (RGB), and add an overlay to it.
258  * For all of these properties, we are going to add widgets that will
259  * configure them.
260  *
261  * First, lets add the horizontal box that will hold these widgets:
262  * @skip hbox
263  * @until align_set
264  *
265  * For now, just consider this @c hbox as a rectangle that will contain the
266  * widgets, and will distribute them horizontally inside its content. Then we
267  * add radio buttons that will allow us to choose the property to use with
268  * this background:
269  *
270  * @skip radio_add
271  * @until evas_object_show
272  *
273  * Again, I won't give details about the use of these widgets, just look for
274  * their documentation if necessary. It's enough to know for now that we are
275  * packing them in the @c hbox, setting a label for them, and the most
276  * important parts: setting its value to @c ELM_BG_OPTION_CENTER and its
277  * callback to @c _cb_radio_changed (the function defined in the beginning of
278  * this example). We do this for the next 3 radio buttons added after this
279  * one, each of them with a different value.
280  *
281  * Now taking a look at the code of the callback @c _cb_radio_changed again,
282  * it will call elm_bg_option_set() with the value set from the checked radio
283  * button, thus setting the option for this background. The background is
284  * passed as argument to the @p data parameter of this callback, and is
285  * referenced here as @c o_bg.
286  *
287  * Later we set the default value for this radio button:
288  *
289  * @skipline elm_radio_value_set
290  *
291  * Then we add a checkbox for the elm_bg_overlay_set() function:
292  *
293  * @skip check_add
294  * @until evas_object_show
295  *
296  * Now look at the code of the @c _cb_overlay_changed again. If the checkbox
297  * state is checked, an overlay will be added to the background. It's done by
298  * creating an Edje object, and setting it with elm_bg_overlay_set() to the
299  * background object. For information about what are and how to set Edje
300  * object, look at the Edje documentation.
301  *
302  * Finally we add a spinner object (elm_spinner_add()) to be used to select
303  * the color of our background. In its callback it's possible to see the call
304  * to elm_bg_color_set(), which will change the color of this background.
305  * This color is used by the background to fill areas where the image doesn't
306  * cover (in this case, where we have an image background). The spinner is
307  * also packed into the @c hbox :
308  *
309  * @skip elm_spinner_add
310  * @until evas_object_show
311  *
312  * Then we just have to pack the @c hbox inside the @c box, set some size
313  * hints, and show our window:
314  *
315  * @skip pack_end
316  * @until }
317  *
318  * Now to see this code in action, open elementary_test, and go to the "Bg
319  * Options" test. It should demonstrate what was implemented here.
320  */
321
322 /**
323  * @page actionslider_example_page Actionslider usage
324  * @dontinclude actionslider_example_01.c
325  *
326  * For this example we are going to assume knowledge of evas smart callbacks
327  * and some basic evas object functions. Elementary is not meant to be used
328  * without evas, if you're not yet familiar with evas it probably is worth
329  * checking that out.
330  *
331  * And now to the example, when using Elementary we start by including
332  * Elementary.h:
333  * @skipline #include
334  *
335  * Next we define some callbacks, they all share the same signature because
336  * they are all to be used with evas_object_smart_callback_add().
337  * The first one just prints the selected label(in two different ways):
338  * @until }
339  *
340  * This next callback is a little more interesting, it makes the selected
341  * label magnetic(except if it's the center label):
342  * @until }
343  *
344  * This callback enables or disables the magnetic propertty of the center
345  * label:
346  * @until }
347  *
348  * And finally a callback to stop the main loop when the window is closed:
349  * @until }
350  *
351  * To be able to create our actionsliders we need to do some setup, but this
352  * isn't really relevant here, so if you want to know about that go @ref
353  * Win "here".
354  *
355  * With all that boring stuff out of the way we can proceed to creating some
356  * actionsliders.@n
357  * All actionsliders are created the same way:
358  * @skipline actionslider_add
359  * Next we must choose where the indicator starts, and for this one we choose
360  * the right, and set the right as magnetic:
361  * @skipline indicator_pos_set
362  * @until magnet_pos_set
363  *
364  * We then set the labels for the left and right, passing NULL as an argument
365  * to any of the labels makes that position have no label.
366  * @until Stop
367  *
368  * Furthermore we mark both left and right as enabled positions, if we didn't
369  * do this all three positions would be enabled:
370  * @until RIGHT
371  *
372  * Having the the enabled positions we now add a smart callback to change
373  * which position is magnetic, so that only the last selected position is
374  * magnetic:
375  * @until NULL
376  *
377  * And finally we set our printing callback and show the actionslider:
378  * @until object_show
379  * @skip pack_end
380  *
381  * For our next actionslider we are going to do much as we did for the
382  * previous except we are going to have the center as the magnet(and not
383  * change it):
384  * @skipline actionslider_add
385  * @skipline indicator_pos_set
386  * @until object_show
387  *
388  * And another actionslider, in this one the indicator starts on the left.
389  * It has labels only in the center and right, and both bositions are
390  * magnetic. Because the left doesn't have a label and is not magnetic once
391  * the indicator leaves it can't return:
392  * @skipline actionslider_add
393  * @skipline indicator_pos_set
394  * @until object_show
395  * @note The greyed out area is a @ref Styles "style".
396  *
397  * And now an actionslider with a label in the indicator, and whose magnet
398  * properties change based on what was last selected:
399  * @skipline actionslider_add
400  * @skipline indicator_pos_set
401  * @until object_show
402  * @note The greyed out area is a @ref Styles "style".
403  *
404  * We are almost done, this next one is just an actionslider with all
405  * positions magnetized and having every possible label:
406  * @skipline actionslider_add
407  * @skipline indicator_pos_set
408  * @until object_show
409  *
410  * And for our last actionslider we have one that turns the magnetic property
411  * on and off:
412  * @skipline actionslider_add
413  * @skipline indicator_pos_set
414  * @until object_show
415  *
416  * The example will look like this:
417  *
418  * @image html screenshots/actionslider_01.png
419  * @image latex screenshots/actionslider_01.eps width=\textwidth
420  *
421  * See the full source code @ref actionslider_example_01 "here"
422  */
423
424 /**
425  * @page elm_animator_example_page_01 Animator usage
426  * @dontinclude animator_example_01.c
427  *
428  * For this example we will be using a bit of evas, you could animate a
429  * elementary widget in much the same way, but to keep things simple we use
430  * an evas_object_rectangle.
431  *
432  * As every other example we start with our include and a simple callback to
433  * exit the app when the window is closed:
434  * @skipline #include
435  * @until }
436  *
437  * This next callback is the one that actually creates our animation, it
438  * changes the size, position and color of a rectangle given to it in @a
439  * data:
440  * @until }
441  *
442  * Next we have a callback that prints a string, nothing special:
443  * @until }
444  *
445  * This next callback is a little more interesting, it has a state variable
446  * to know if the animation is currently paused or running, and it toogles
447  * the state of the animation accordingly:
448  * @until }
449  * @until }
450  * @until }
451  *
452  * Finally we have a callback to stop the animation:
453  * @until }
454  *
455  * As with every example we need to do a bit of setup before we can actually
456  * use an animation, but for the purposes of this example that's not relevant
457  * so let's just skip to the good stuff, creating an animator:
458  * @skipline animator_add
459  * @note Since elm_animator is not a widget we can give it a NULL parent.
460  *
461  * Now that we have an elm_animator we set it's duration to 1 second:
462  * @line duration_set
463  *
464  * We would also like our animation to be reversible, so:
465  * @line reverse_set
466  *
467  * We also set our animation to repeat as many times as possible, which will
468  * mean that _end_cb will only be called after UINT_MAX * 2 seconds(UINT_MAX
469  * for the animation running forward and UNIT_MAX for the animation running
470  * backwards):
471  * @line repeat_set
472  *
473  * To add some fun to our animation we will use the IN_OUT curve style:
474  * @line curve_style
475  *
476  * To actually animate anything we need an operation callback:
477  * @line operation_callback
478  *
479  * Even though we set our animation to repeat for a very long time we are
480  * going to set a end callback to it:
481  * @line completion_callback
482  * @note Notice that stoping the animation with the stop button will not make
483  * _end_cb be called.
484  *
485  * Now that we have fully set up our animator we can tell it to start
486  * animating:
487  * @line animate
488  *
489  * There's a bit more of code that doesn't really matter to use so we skip
490  * right down to our last interesting point:
491  * @skipline animator_del
492  * @note Because we created our animator with no parent we need to delete it
493  * ourselves.
494  *
495  * The example should look like this:
496  *
497  * @image html screenshots/animator_example_01.png
498  * @image latex screenshots/animator_example_01.eps width=\textwidth
499  * @n
500  * @image html screenshots/animator_example_02.png
501  * @image latex screenshots/animator_example_02.eps width=\textwidth
502  * @n
503  * @image html screenshots/animator_example_03.png
504  * @image latex screenshots/animator_example_03.eps width=\textwidth
505  *
506  * The full source code for this example can be found @ref
507  * animator_example_01_c "here"
508  */
509
510 /**
511  * @page transit_example_03_c elm_transit - Combined effects and options.
512  *
513  * This example shows how to apply the following transition effects:
514  * @li translation
515  * @li color
516  * @li rotation
517  * @li wipe
518  * @li zoom
519  * @li resizing
520  *
521  * It allows you to apply more than one effect at once, and also allows to
522  * set properties like event_enabled, auto_reverse, repeat_times and
523  * tween_mode.
524  *
525  * @include transit_example_03.c
526  */
527
528 /**
529  * @page transit_example_04_c elm_transit - Combined effects over two objects.
530  *
531  * This example shows how to apply the transition effects:
532  * @li flip
533  * @li resizable_flip
534  * @li fade
535  * @li blend
536  * over two objects. This kind of transition effect is used to make one
537  * object disappear and another one appear on its place.
538  *
539  * You can mix more than one effect of this type on the same objects, and the
540  * transition will apply both.
541  *
542  * @include transit_example_04.c
543  */
544
545 /**
546  * @page transit_example_01_explained elm_transit - Basic transit usage.
547  * @dontinclude transit_example_01.c
548  *
549  * The full code for this example can be found at @ref transit_example_01_c.
550  *
551  * This example shows the simplest way of creating a transition and applying
552  * it to an object. Similarly to every other elementary example, we create a
553  * window, set its title, size, autodel property, and setup a callback to
554  * exit the program when finished:
555  *
556  * @skip on_done
557  * @until evas_object_resize
558  *
559  * We also add a resizeable white background to use behind our animation:
560  *
561  * @skip bg_add
562  * @until evas_object_show
563  *
564  * And then we add a button that we will use to demonstrate the effects of
565  * our animation:
566  *
567  * @skip button_add
568  * @until evas_object_show(win)
569  *
570  * Notice that we are not adding the button with elm_win_resize_object_add()
571  * because we don't want the window to control the size of the button. We
572  * will use the transition to change the button size, so it could conflict
573  * with something else trying to control that size.
574  *
575  * Now, the simplest code possible to create the resize animation:
576  *
577  * @skip transit_add
578  * @until transit_go
579  *
580  * As you can see, this code is very easy to understand. First, we create the
581  * transition itself with elm_transit_add(). Then we add the button to this
582  * transition with elm_transit_object_add(), which means that the transition
583  * will operate over this button. The effect that we want now is changing the
584  * object size from 100x50 to 300x150, and can be achieved by adding the
585  * resize effect with elm_transit_effect_resizing_add().
586  *
587  * Finally, we set the transition time to 5 seconds and start the transition
588  * with elm_transit_go(). If we wanted more effects applied to this
589  * button, we could add them to the same transition. See the
590  * @ref transit_example_03_c to watch many transitions being applied to an
591  * object.
592  */
593
594 /**
595  * @page transit_example_02_explained elm_transit - Chained transitions.
596  * @dontinclude transit_example_02.c
597  *
598  * The full code for this example can be found at @ref transit_example_02_c.
599  *
600  * This example shows how to implement a chain of transitions. This chain is
601  * used to start a transition just after another transition ended. Similarly
602  * to every other elementary example, we create a window, set its title,
603  * size, autodel property, and setup a callback to exit the program when
604  * finished:
605  *
606  * @skip on_done
607  * @until evas_object_resize
608  *
609  * We also add a resizeable white background to use behind our animation:
610  *
611  * @skip bg_add
612  * @until evas_object_show
613  *
614  * This example will have a chain of 4 transitions, each of them applied to
615  * one button. Thus we create 4 different buttons:
616  *
617  * @skip button_add
618  * @until evas_object_show(bt4)
619  *
620  * Now we create a simple translation transition that will be started as soon
621  * as the program loads. It will be our first transition, and the other
622  * transitions will be started just after this transition ends:
623  *
624  * @skip transit_add
625  * @until transit_go
626  *
627  * The code displayed until now has nothing different from what you have
628  * already seen in @ref transit_example_01_explained, but now comes the new
629  * part: instead of creating a second transition that will start later using
630  * a timer, we create the it normally, and use
631  * elm_transit_chain_transit_add() instead of elm_transit_go. Since we are
632  * adding it in a chain after the first transition, it will start as soon as
633  * the first transition ends:
634  *
635  * @skip transit_add
636  * @until transit_chain_transit_add
637  *
638  * Finally we add the 2 other transitions to the chain, and run our program.
639  * It will make one transition start after the other finish, and there is the
640  * transition chain.
641  */
642
643 /**
644  * @page general_functions_example_page General (top-level) functions example
645  * @dontinclude general_funcs_example.c
646  *
647  * As told in their documentation blocks, the
648  * elm_app_compile_*_dir_set() family of functions have to be called
649  * before elm_app_info_set():
650  * @skip tell elm about
651  * @until elm_app_info_set
652  *
653  * We are here setting the fallback paths to the compiling time target
654  * paths, naturally. If you're building the example out of the
655  * project's build system, we're assuming they are the canonical ones.
656  *
657  * After the program starts, elm_app_info_set() will actually run and
658  * then you'll see an intrincasy: Elementary does the prefix lookup @b
659  * twice. This is so because of the quicklaunch infrastructure in
660  * Elementary (@ref Start), which will register a predefined prefix
661  * for possible users of the launch schema. We're not hooking into a
662  * quick launch, so this first call can't be avoided.
663  *
664  * If you ran this example from your "bindir" installation
665  * directiory, no output will emerge from these both attempts -- it
666  * will find the "magic" file there registered and set the prefixes
667  * silently. Otherwise, you could get something like:
668  @verbatim
669  WARNING: Could not determine its installed prefix for 'ELM'
670        so am falling back on the compiled in default:
671          usr
672        implied by the following:
673          bindir    = usr/lib
674          libdir    = usr/lib
675          datadir   = usr/share/elementary
676          localedir = usr/share/locale
677        Try setting the following environment variables:
678          ELM_PREFIX     - points to the base prefix of install
679        or the next 4 variables
680          ELM_BIN_DIR    - provide a specific binary directory
681          ELM_LIB_DIR    - provide a specific library directory
682          ELM_DATA_DIR   - provide a specific data directory
683          ELM_LOCALE_DIR - provide a specific locale directory
684  @endverbatim
685  * if you also didn't change those environment variables (remember
686  * they are also a valid way of communicating your prefix to the
687  * binary) - this is the scenario where it fallbacks to the paths set
688  * for compile time.
689  *
690  * Then, you can check the prefixes set on the standard output:
691  * @skip prefix was set to
692  * @until locale directory is
693  *
694  * In the fragment
695  * @skip by using this policy
696  * @until elm_win_autodel_set
697  * we demonstrate the use of Elementary policies. The policy defining
698  * under which circunstances our application should quit automatically
699  * is set to when its last window is closed (this one has just one
700  * window, though). This will save us from having to set a callback
701  * ourselves on the window, like done in @ref bg_example_01_c "this"
702  * example. Note that we need to tell the window to delete itself's
703  * object on a request to destroy the canvas coming, with
704  * elm_win_autodel_set().
705  *
706  * What follows is some boilerplate code, creating a frame with a @b
707  * button, our object of interest, and, below, widgets to change the
708  * button's behavior and exemplify the group of functions in question.
709  *
710  * @dontinclude general_funcs_example.c
711  * We enabled the focus highlight object for this window, so that you
712  * can keep track of the current focused object better:
713  * @skip elm_win_focus_highlight_enabled_set
714  * @until evas_object_show
715  * Use the tab key to navigate through the focus chain.
716  *
717  * @dontinclude general_funcs_example.c
718  * While creating the button, we exemplify how to use Elementary's
719  * finger size information to scale our UI:
720  * @skip fprintf(stdout, "Elementary
721  * @until evas_object_show
722  *
723  * @dontinclude general_funcs_example.c
724  * The first checkbox's callback is:
725  * @skip static void
726  * @until }
727  * When unsetting the checkbox, we disable the button, which will get a new
728  * decoration (greyed out) and stop receiving events. The focus chain
729  * will also ignore it.
730  *
731  * Following, there are 2 more buttons whose actions are focus/unfocus
732  * the top button, respectively:
733  * @skip focus callback
734  * @until }
735  * and
736  * @skip unfocus callback
737  * @until }
738  * Note the situations in which they won't take effect:
739  * - the button is not allowed to get focus or
740  * - the button is disabled
741  *
742  * The first restriction above you'll get by a second checkbox, whose
743  * callback is:
744  * @skip focus allow callback
745  * @until }
746  * Note that the button will still get mouse events, though.
747  *
748  * Next, there's a slider controlling the button's scale:
749  * @skip scaling callback
750  * @until }
751  *
752  * Experiment with it, so you understand the effect better. If you
753  * change its value, it will mess with the button's original size,
754  * naturally.
755  *
756  * The full code for this example can be found
757  * @ref general_functions_example_c "here".
758  */
759
760 /**
761  * @page theme_example_01 Theme - Using extensions
762  *
763  * @dontinclude theme_example_01.c
764  *
765  * Using extensions is extremely easy, discarding the part where you have to
766  * write the theme for them.
767  *
768  * In the following example we'll be creating two buttons, one to load or
769  * unload our extension theme and one to cycle around three possible styles,
770  * one of which we created.
771  *
772  * After including our one and only header we'll jump to the callback for
773  * the buttons. First one takes care of loading or unloading our extension
774  * file, relative to the default theme set (thus the @c NULL in the
775  * functions first parameter).
776  * @skipline Elementary.h
777  * @skip static void
778  * @until }
779  * @until }
780  * @until }
781  *
782  * The second button, as we said before, will just switch around different
783  * styles. In this case we have three of them. The first one is our custom
784  * style, named after something very unlikely to find in the default theme.
785  * The other two styles are the standard and one more, anchor, which exists
786  * in the default and is similar to the default, except the button vanishes
787  * when the mouse is not over it.
788  * @skip static void
789  * @until }
790  * @until }
791  *
792  * So what happens if the style switches to our custom one when the
793  * extension is loaded? Elementary falls back to the default for the
794  * widget.
795  *
796  * And the main function, simply enough, will create the window, set the
797  * buttons and their callbacks, and just to begin with our button styled
798  * we're also loading our extension at the beginning.
799  * @skip int
800  * @until ELM_MAIN
801  *
802  * In this case we wanted to easily remove extensions, but all adding an
803  * extension does is tell Elementary where else it should look for themes
804  * when it can't find them in the default theme. Another way to do this
805  * is to set the theme search order using elm_theme_set(), but this requires
806  * that the developer is careful not to override any user configuration.
807  * That can be helped by adding our theme to the end of whatver is already
808  * set, like in the following snippet.
809  * @code
810  * char buf[4096];
811  * snprintf(buf, sizeof(buf), "%s:./theme_example.edj", elme_theme_get(NULL);
812  * elm_theme_set(NULL, buf);
813  * @endcode
814  *
815  * If we were using overlays instead of extensions, the same thing applies,
816  * but the custom theme must be added to the front of the search path.
817  *
818  * In the end, we should be looking at something like this:
819  *
820  * @image html screenshots/theme_example_01.png
821  * @image latex screenshots/theme_example_01.eps width=\textwidth
822  *
823  * That's all. Boringly simple, and the full code in one piece can be found
824  * @ref theme_example_01.c "here".
825  *
826  * And the code for our extension is @ref theme_example.edc "here".
827  *
828  * @example theme_example_01.c
829  * @example theme_example.edc
830  */
831
832 /**
833  * @page theme_example_02 Theme - Using overlays
834  *
835  * @dontinclude theme_example_02.c
836  *
837  * Overlays are like extensions in that you tell Elementary that some other
838  * theme contains the styles you need for your program. The difference is that
839  * they will be look in first, so they can override the default style of any
840  * widget.
841  *
842  * There's not much to say about them that hasn't been said in our previous
843  * example about @ref theme_example_01 "extensions", so going quickly through
844  * the code we have a function to load or unload the theme, which will be
845  * called when we click any button.
846  * @skipline Elementary.h
847  * @skip static void
848  * @until }
849  *
850  * And the main function, creating the window and adding some buttons to it.
851  * We load our theme as an overlay and nothing else. Notice there's no style
852  * set for any button there, which means they should be using the default
853  * that we override.
854  * @skip int
855  * @until ELM_MAIN
856  *
857  * That's pretty much it. The full code is @ref theme_example_02.c "here" and
858  * the definition of the theme is the same as before, and can be found in
859  * @ref theme_example.edc "here".
860  *
861  * @example theme_example_02.c
862  */
863
864  /**
865   * @page button_example_01 Button - Complete example
866   *
867   * @dontinclude button_example_01.c
868   *
869   * A button is simple, you click on it and something happens. That said,
870   * we'll go through an example to show in detail the button API less
871   * commonly used.
872   *
873   * In the end, we'll be presented with something that looks like this:
874   *
875   * @image html screenshots/button_01.png
876   * @image latex screenshots/button_01.eps width=\textwidth
877   *
878   * The full code of the example is @ref button_example_01.c "here" and we
879   * will follow here with a rundown of it.
880   *
881   * @skip Elementary.h
882   * @until Elementary.h
883   * @skip struct
884   * @until App_Data
885   *
886   * We have several buttons to set different times for the autorepeat timeouts
887   * of the buttons that use it and a few more that we keep track of in our
888   * data struct. The mid button doesn't do much, just moves around according
889   * to what other buttons the user presses. Then four more buttons to move the
890   * central one, and we're also keeping track of the icon set in the middle
891   * button, since when this one moves, we change the icon, and when movement
892   * is finished (by releasing one of the four arrow buttons), we set back the
893   * normal icon.
894   * @skip static void
895   * @until }
896   *
897   * Keeping any of those four buttons pressed will trigger their autorepeat
898   * callback, where we move the button doing some size hint magic. To
899   * understand how that works better, refer to the @ref Box documentation.
900   * Also, the first time the function is called, we change the icon in the
901   * middle button, using elm_button_icon_unset() first to keep the reference
902   * to the previous one, so we don't need to recreate it when we are done
903   * moving it.
904   * @skip static void
905   * @until }
906   * @until size_hint_align_set
907   * @until }
908   *
909   * One more callback for the option buttons, that just sets the timeouts for
910   * the different autorepeat options.
911   *
912   * @skip static void
913   * @until }
914   * @until }
915   * @until }
916   *
917   * And the main function, which does some setting up of the buttons in boxes
918   * to make things work. Here we'll go through some snippets only.
919   *
920   * For the option buttons, it's just the button with its label and callback.
921   * @skip elm_button_add
922   * @until smart_callback_add
923   *
924   * For the ones that move the central button, we have no labels. There are
925   * icons instead, and the autorepeat option is toggled.
926   * @skip Gap: 1.0
927   * @skip elm_button_add
928   * @until data.cursors.up
929   *
930   * And just to show the mid button, which doesn't have anything special.
931   * @skip data.cursors.left
932   * @skip elm_button_add
933   * @until data.mid
934   *
935   * And we are done.
936   *
937   * @example button_example_01.c
938   */
939
940 /**
941  * @page bubble_01_example_page elm_bubble - Simple use.
942  * @dontinclude bubble_example_01.c
943  *
944  * This example shows a bubble with all fields set(label, info, content and
945  * icon) and the selected corner changing when the bubble is clicked. To be
946  * able use a bubble we need to do some setup and create a window, for this
947  * example we are going to ignore that part of the code since it isn't
948  * relevant to the bubble.
949  *
950  * To have the selected corner change in a clockwise motion we are going to
951  * use the following callback:
952  * @skip static
953  * @until }
954  * @until }
955  *
956  * Here we are creating an elm_label that is going to be used as the content
957  * for our bubble:
958  * @skipline elm_label
959  * @until show
960  * @note You could use any evas_object for this, we are using an elm_label
961  * for simplicity.
962  *
963  * Despite it's name the bubble's icon doesn't have to be an icon, it can be
964  * any evas_object. For this example we are going to make the icon a simple
965  * blue rectangle:
966  * @until show
967  *
968  * And finally we have the actual bubble creation and the setting of it's
969  * label, info and content:
970  * @until content
971  * @skipline show
972  * @note Because we didn't set a corner, the default("top_left") will be
973  * used.
974  *
975  * Now that we have our bubble all that is left is connecting the "clicked"
976  * signals to our callback:
977  * @line smart_callback
978  *
979  * This last bubble we created was very complete, so it's pertinent to show
980  * that most of that stuff is optional a bubble can be created with nothing
981  * but content:
982  * @until content
983  * @skipline show
984  *
985  * Our example will look like this:
986  *
987  * @image html screenshots/bubble_example_01.png
988  * @image latex screenshots/bubble_example_01.eps width=\textwidth
989  *
990  * See the full source code @ref bubble_example_01.c here.
991  * @example bubble_example_01.c
992  */
993
994 /**
995  * @page box_example_01 Box - Basic API
996  *
997  * @dontinclude button_example_01.c
998  *
999  * As a special guest tonight, we have the @ref button_example_01 "simple
1000  * button example". There are plenty of boxes in it, and to make the cursor
1001  * buttons that moved a central one around when pressed, we had to use a
1002  * variety of values for their hints.
1003  *
1004  * To start, let's take a look at the handling of the central button when
1005  * we were moving it around. To achieve this effect without falling back to
1006  * a complete manual positioning of the @c Evas_Object in our canvas, we just
1007  * put it in a box and played with its alignment within it, as seen in the
1008  * following snippet of the callback for the pressed buttons.
1009  * @skip evas_object_size_hint_align_get
1010  * @until evas_object_size_hint_align_set
1011  *
1012  * Not much to it. We get the current alignment of the object and change it
1013  * by just a little, depending on which button was pressed, then set it
1014  * again, making sure we stay within the 0.0-1.0 range so the button moves
1015  * inside the space it has, instead of disappearing under the other objects.
1016  *
1017  * But as useful as an example as that may have been, the usual case with boxes
1018  * is to set everything at the moment they are created, like we did for
1019  * everything else in our main function.
1020  *
1021  * The entire layout of our program is made with boxes. We have one set as the
1022  * resize object for the window, which means it will always be resized with
1023  * the window. The weight hints set to @c EVAS_HINT_EXPAND will tell the
1024  * window that the box can grow past it's minimum size, which allows resizing
1025  * of it.
1026  * @skip elm_main
1027  * @skip elm_box_add
1028  * @until evas_object_show
1029  *
1030  * Two more boxes, set to horizontal, hold the buttons to change the autorepeat
1031  * configuration used by the buttons. We create each to take over all the
1032  * available space horizontally, but we don't want them to grow vertically,
1033  * so we keep that axis of the weight with 0.0. Then it gets packed in the
1034  * main box.
1035  * @skip box2
1036  * @until evas_object_show
1037  *
1038  * The buttons in each of those boxes have nothing special, they are just packed
1039  * in with their default values and the box will use their minimum size, as set
1040  * by Elementary itself based on the label, icon, finger size and theme.
1041  *
1042  * But the buttons used to move the central one have a special disposition.
1043  * The top one first, is placed right into the main box like our other smaller
1044  * boxes. Set to expand horizontally and not vertically, and in this case we
1045  * also tell it to fill that space, so it gets resized to take the entire
1046  * width of the window.
1047  * @skip Gap: 1.0
1048  * @skip elm_button_add
1049  * @until evas_object_show
1050  *
1051  * The bottom one will be the same, but for the other two we need to use a
1052  * second box set to take as much space as we have, so we can place our side
1053  * buttons in place and have the big empty space where the central button will
1054  * move.
1055  * @skip elm_box_add
1056  * @until evas_object_show
1057  *
1058  * Then the buttons will have their hints inverted to the other top and bottom
1059  * ones, to expand and fill vertically and keep their minimum size horizontally.
1060  * @skip elm_button_add
1061  * @until evas_object_show
1062  *
1063  * The central button takes every thing else. It will ask to be expanded in
1064  * both directions, but without filling its cell. Changing its alignment by
1065  * pressing the buttons will make it move around.
1066  * @skip elm_button_add
1067  * @until evas_object_show
1068  *
1069  * To end, the rightmost button is packed in the smaller box after the central
1070  * one, and back to the main box we have the bottom button at the end.
1071  */
1072
1073 /**
1074  * @page box_example_02 Box - Layout transitions
1075  *
1076  * @dontinclude box_example_02.c
1077  *
1078  * Setting a customized layout for a box is simple once you have the layout
1079  * function, which is just like the layout function for @c Evas_Box. The new
1080  * and fancier thing we can do with Elementary is animate the transition from
1081  * one layout to the next. We'll see now how to do that through a simple
1082  * example, while also taking a look at some of the API that was left
1083  * untouched in our @ref box_example_01 "previous example".
1084  *
1085  * @image html screenshots/box_example_02.png
1086  * @image latex screenshots/box_example_02.eps width=\textwidth
1087  *
1088  * @skipline Elementary.h
1089  *
1090  * Our application data consists of a list of layout functions, given by
1091  * @c transitions. We'll be animating through them throughout the entire run.
1092  * The box with the stuff to move around and the last layout that was set to
1093  * make things easier in the code.
1094  * @skip typedef
1095  * @until Transitions_Data
1096  *
1097  * The box starts with three buttons, clicking on any of them will take it
1098  * out of the box without deleting the object. There are also two more buttons
1099  * outside, one to add an object to the box and the other to clear it.
1100  * This is all to show how you can interact with the items in the box, add
1101  * things and even remove them, while the transitions occur.
1102  *
1103  * One of the callback we'll be using creates a new button, asks the box for
1104  * the list of its children and if it's not empty, we add the new object after
1105  * the first one, otherwise just place at the end as it will not make any
1106  * difference.
1107  * @skip static void
1108  * @until }
1109  * @until }
1110  *
1111  * The clear button is even simpler. Everything in the box will be deleted,
1112  * leaving it empty and ready to fill it up with more stuff.
1113  * @skip static void
1114  * @until }
1115  *
1116  * And a little function to remove buttons from the box without deleting them.
1117  * This one is set for the @c clicked callback of the original buttons,
1118  * unpacking them when clicked and placing it somewhere in the screen where
1119  * they will not disturb. Once we do this, the box no longer has any control
1120  * of it, so it will be left untouched until the program ends.
1121  * @skip static void
1122  * @until }
1123  *
1124  * If we wanted, we could just call @c evas_object_del() on the object to
1125  * destroy it. In this case, no unpack is really necessary, as the box would
1126  * be notified of a child being deleted and adjust its calculations accordingly.
1127  *
1128  * The core of the program is the following function. It takes whatever
1129  * function is first on our list of layouts and together with the
1130  * @c last_layout, it creates an ::Elm_Box_Transition to use with
1131  * elm_box_layout_transition(). In here, we tell it to start from whatever
1132  * layout we last set, end with the one that was at the top of the list and
1133  * when everything is finished, call us back so we can create another
1134  * transition. Finally, move the new layout to the end of the list so we
1135  * can continue running through them until the program ends.
1136  * @skip static void
1137  * @until }
1138  *
1139  * The main function doesn't have antyhing special. Creation of box, initial
1140  * buttons and some callback setting. The only part worth mentioning is the
1141  * initialization of our application data.
1142  * @skip tdata.box
1143  * @until evas_object_box_layout_stack
1144  *
1145  * We have a simple static variable, set the box, the first layout we are
1146  * using as last and create the list with the different functions to go
1147  * through.
1148  *
1149  * And in the end, we set the first layout and call the same function we went
1150  * through before to start the run of transitions.
1151  * @until _test_box_transition_change
1152  *
1153  * For the full code, follow @ref box_example_02.c "here".
1154  *
1155  * @example box_example_02.c
1156  */
1157
1158 /**
1159  * @page calendar_example_01 Calendar - Simple creation.
1160  * @dontinclude calendar_example_01.c
1161  *
1162  * As a first example, let's just display a calendar in our window,
1163  * explaining all steps required to do so.
1164  *
1165  * First you should declare objects we intend to use:
1166  * @skipline Evas_Object
1167  *
1168  * Then a window is created, a title is set and its set to be autodeleted.
1169  * More details can be found on windows examples:
1170  * @until elm_win_autodel
1171  *
1172  * Next a simple background is placed on our windows. More details on
1173  * @ref bg_01_example_page:
1174  * @until evas_object_show(bg)
1175  *
1176  * Now, the exciting part, let's add the calendar with elm_calendar_add(),
1177  * passing our window object as parent.
1178  * @until evas_object_show(cal);
1179  *
1180  * To conclude our example, we should show the window and run elm mainloop:
1181  * @until ELM_MAIN
1182  *
1183  * Our example will look like this:
1184  *
1185  * @image html screenshots/calendar_example_01.png
1186  * @image latex screenshots/calendar_example_01.eps width=\textwidth
1187  *
1188  * See the full source code @ref calendar_example_01.c here.
1189  * @example calendar_example_01.c
1190  */
1191
1192 /**
1193  * @page calendar_example_02 Calendar - Layout strings formatting.
1194  * @dontinclude calendar_example_02.c
1195  *
1196  * In this simple example, we'll explain how to format the label displaying
1197  * month and year, and also set weekday names.
1198  *
1199  * To format month and year label, we need to create a callback function
1200  * to create a string given the selected time, declared under a
1201  * <tt> struct tm </tt>.
1202  *
1203  * <tt> struct tm </tt>, declared on @c time.h, is a structure composed by
1204  * nine integers:
1205  * @li tm_sec   seconds [0,59]
1206  * @li tm_min   minutes [0,59]
1207  * @li tm_hour  hour [0,23]
1208  * @li tm_mday  day of month [1,31]
1209  * @li tm_mon   month of year [0,11]
1210  * @li tm_year  years since 1900
1211  * @li tm_wday  day of week [0,6] (Sunday = 0)
1212  * @li tm_yday  day of year [0,365]
1213  * @li tm_isdst daylight savings flag
1214  * @note glib version has 2 additional fields.
1215  *
1216  * For our function, only stuff that matters are tm_mon and tm_year.
1217  * But we don't need to access it directly, since there are nice functions
1218  * to format date and time, as @c strftime.
1219  * We will get abbreviated month (%b) and year (%y) (check strftime manpage
1220  * for more) in our example:
1221  * @skipline static char
1222  * @until }
1223  *
1224  * We need to alloc the string to be returned, and calendar widget will
1225  * free it when it's not needed, what is done by @c strdup.
1226  * So let's register our callback to calendar object:
1227  * @skipline elm_calendar_format_function_set
1228  *
1229  * To set weekday names, we should declare them as an array of strings:
1230  * @dontinclude calendar_example_02.c
1231  * @skipline weekdays
1232  * @until }
1233  *
1234  * And finally set them to calendar:
1235  * skipline weekdays_names_set
1236  *
1237  * Our example will look like this:
1238  *
1239  * @image html screenshots/calendar_example_02.png
1240  * @image latex screenshots/calendar_example_02.eps width=\textwidth
1241  *
1242  * See the full source code @ref calendar_example_02.c here.
1243  * @example calendar_example_02.c
1244  */
1245
1246 /**
1247  * @page calendar_example_03 Calendar - Years restrictions.
1248  * @dontinclude calendar_example_03.c
1249  *
1250  * This example explains how to set max and min year to be displayed
1251  * by a calendar object. This means that user won't be able to
1252  * see or select a date before and after selected years.
1253  * By default, limits are 1902 and maximun value will depends
1254  * on platform architecture (year 2037 for 32 bits); You can
1255  * read more about time functions on @c ctime manpage.
1256  *
1257  * Straigh to the point, to set it is enough to call
1258  * elm_calendar_min_max_year_set(). First value is minimun year, second
1259  * is maximum. If first value is negative, it won't apply limit for min
1260  * year, if the second one is negative, won't apply for max year.
1261  * Setting both to negative value will clear limits (default state):
1262  * @skipline elm_calendar_min_max_year_set
1263  *
1264  * Our example will look like this:
1265  *
1266  * @image html screenshots/calendar_example_03.png
1267  * @image latex screenshots/calendar_example_03.eps width=\textwidth
1268  *
1269  * See the full source code @ref calendar_example_03.c here.
1270  * @example calendar_example_03.c
1271  */
1272
1273 /**
1274  * @page calendar_example_04 Calendar - Days selection.
1275  * @dontinclude calendar_example_04.c
1276  *
1277  * It's possible to disable date selection and to select a date
1278  * from your program, and that's what we'll see on this example.
1279  *
1280  * If isn't required that users could select a day on calendar,
1281  * only interacting going through months, disabling days selection
1282  * could be a good idea to avoid confusion. For that:
1283  * @skipline elm_calendar_day_selection_enabled_set
1284  *
1285  * Also, regarding days selection, you could be interested to set a
1286  * date to be highlighted on calendar from your code, maybe when
1287  * a specific event happens, or after calendar creation. Let's select
1288  * two days from current day:
1289  * @dontinclude calendar_example_04.c
1290  * @skipline SECS_DAY
1291  * @skipline current_time
1292  * @until elm_calendar_selected_time_set
1293  *
1294  * Our example will look like this:
1295  *
1296  * @image html screenshots/calendar_example_04.png
1297  * @image latex screenshots/calendar_example_04.eps width=\textwidth
1298  *
1299  * See the full source code @ref calendar_example_04.c here.
1300  * @example calendar_example_04.c
1301  */
1302
1303 /**
1304  * @page calendar_example_05 Calendar - Signal callback and getters.
1305  * @dontinclude calendar_example_05.c
1306  *
1307  * Most of setters explained on previous examples have associated getters.
1308  * That's the subject of this example. We'll add a callback to display
1309  * all calendar information every time user interacts with the calendar.
1310  *
1311  * Let's check our callback function:
1312  * @skipline static void
1313  * @until double interval;
1314  *
1315  * To get selected day, we need to call elm_calendar_selected_time_get(),
1316  * but to assure nothing wrong happened, we must check for function return.
1317  * It'll return @c EINA_FALSE if fail. Otherwise we can use time set to
1318  * our structure @p stime.
1319  * @skipline elm_calendar_selected_time_get
1320  * @until return
1321  *
1322  * Next we'll get information from calendar and place on declared vars:
1323  * @skipline interval
1324  * @until elm_calendar_weekdays_names_get
1325  *
1326  * The only tricky part is that last line gets an array of strings
1327  * (char arrays), one for each weekday.
1328  *
1329  * Then we can simple print that to stdin:
1330  * @skipline printf
1331  * @until }
1332  *
1333  * <tt> struct tm </tt> is declared on @c time.h. You can check @c ctime
1334  * manpage to read about it.
1335  *
1336  * To register this callback, that will be called every time user selects
1337  * a day or goes to next or previous month, just add a callback for signal
1338  * @b changed.
1339  * @skipline evas_object_smart_callback_add
1340  *
1341  * Our example will look like this:
1342  *
1343  * @image html screenshots/calendar_example_05.png
1344  * @image latex screenshots/calendar_example_05.eps width=\textwidth
1345  *
1346  * See the full source code @ref calendar_example_05.c here.
1347  * @example calendar_example_05.c
1348  */
1349
1350 /**
1351  * @page calendar_example_06 Calendar - Calendar marks.
1352  * @dontinclude calendar_example_06.c
1353  *
1354  * On this example marks management will be explained. Functions
1355  * elm_calendar_mark_add(), elm_calendar_mark_del() and
1356  * elm_calendar_marks_clear() will be covered.
1357  *
1358  * To add a mark, will be required to choose three things:
1359  * @li mark style
1360  * @li mark date, or start date if it will be repeated
1361  * @li mark periodicity
1362  *
1363  * Style defines the kind of mark will be displayed over marked day,
1364  * on caledar. Default theme supports @b holiday and @b checked.
1365  * If more is required, is possible to set a new theme to calendar
1366  * widget using elm_object_style_set(), and use
1367  * the signal that will be used by such marks.
1368  *
1369  * Date is a <tt> struct tm </tt>, as defined by @c time.h. More can
1370  * be read on @c ctime manpage.
1371  * If a date relative from current is required, this struct can be set
1372  * as:
1373  * @skipline current_time
1374  * @until localtime_r
1375  *
1376  * Or if it's an absolute date, you can just declare the struct like:
1377  * @dontinclude calendar_example_06.c
1378  * @skipline sunday
1379  * @until christmas.tm_mon
1380  *
1381  * Periodicity is how frequently the mark will be displayed over the
1382  * calendar.  Can be a unique mark (that don't repeat), or it can repeat
1383  * daily, weekly, monthly or annually. It's enumerated by
1384  * @c Elm_Calendar_Mark_Repeat.
1385  *
1386  * So let's add some marks to our calendar. We will add christmas holiday,
1387  * set Sundays as holidays, and check current day and day after that.
1388  * @dontinclude calendar_example_06.c
1389  * @skipline sunday
1390  * @until christmas.tm_mon
1391  * @skipline current_time
1392  * @until ELM_CALENDAR_WEEKLY
1393  *
1394  * We kept the return of first mark add, because we don't really won't it
1395  * to be checked, so let's remove it:
1396  * @skipline elm_calendar_mark_del
1397  *
1398  * After all marks are added and removed, is required to draw them:
1399  * @skipline elm_calendar_marks_draw
1400  *
1401  * Finally, to clear all marks, let's set a callback for our button:
1402  * @skipline elm_button_add
1403  * @until evas_object_show(bt);
1404  *
1405  * This callback will receive our calendar object, and should clear it:
1406  * @dontinclude calendar_example_06.c
1407  * @skipline static
1408  * @until }
1409  * @note Remember to draw marks after clear the calendar.
1410  *
1411  * Our example will look like this:
1412  *
1413  * @image html screenshots/calendar_example_06.png
1414  * @image latex screenshots/calendar_example_06.eps width=\textwidth
1415  *
1416  * See the full source code @ref calendar_example_06.c here.
1417  * @example calendar_example_06.c
1418  */
1419
1420 /**
1421  * @page spinner_example Spinner widget example
1422  *
1423  * This code places seven Elementary spinner widgets on a window, each of
1424  * them exemplifying a part of the widget's API.
1425  *
1426  * The first of them is the default spinner:
1427  * @dontinclude spinner_example.c
1428  * @skipline elm_spinner_add
1429  * @until evas_object_show
1430  * As you see, the defaults for a spinner are:
1431  * @li no wrap
1432  * @li min value set to 0
1433  * @li max value set to 100
1434  * @li step value set to 1
1435  * @li label format set to "%0.f"
1436  *
1437  * If another format is required, see the second spinner. It will put a text
1438  * before and after the value, and also format value to display two decimals:
1439  * @skipline format_set
1440  *
1441  * The third one will use a customized step, define new minimum and maximum
1442  * values and enable wrap, so when value reaches minimum it jumps to maximum,
1443  * or jumps to minimum after maximum value is reached. Format is set to display
1444  * a decimal:
1445  * @skipline elm_spinner_add
1446  * @until evas_object_show
1447  *
1448  * The fourth uses @c vertical style, so instead of left and right arrows,
1449  * top and bottom are displayed. Also the change interval is reduced, so
1450  * user can change value faster.
1451  * @skipline style
1452  * @skipline interval
1453  *
1454  * In the fifth the user won't be allowed to set value directly, i.e., will
1455  * be obligate change value only using arrows:
1456  * @skipline editable
1457  *
1458  * The sixth widget will receive a lot of special values, so
1459  * instead of reading numeric values, user will see labels for each one.
1460  * Also direct edition is disabled, otherwise users would see the numeric
1461  * value on edition mode. User will be able to select a month in this widget:
1462  * @skipline elm_spinner_add
1463  * @until evas_object_show
1464  *
1465  * Finally the last widget will exemplify how to listen to widget's signals,
1466  * <tt> changed </tt> and <tt> delay,changed </tt>. First we need to
1467  * implement callback functions that will simply print spinner's value:
1468  * @dontinclude spinner_example.c
1469  * @skip static
1470  * @skip }
1471  * @skipline static
1472  * @until }
1473  * @until }
1474  *
1475  * The first callback function should be called everytime value changes,
1476  * the second one only after user stops to increment or decrement. Try
1477  * to keep arrows pressed and check the difference.
1478  * @skip smart_callback
1479  * @skipline smart_callback
1480  * @skipline smart_callback
1481  *
1482  * See the full @ref spinner_example.c "example", whose window should
1483  * look like this picture:
1484  *
1485  * @image html screenshots/spinner_example.png
1486  * @image latex screenshots/spinner_example.eps width=\textwidth
1487  *
1488  * See the full @ref spinner_example_c "source code" for this example.
1489  *
1490  * @example spinner_example.c
1491  */
1492
1493 /**
1494  * @page slider_example Slider widget example
1495  *
1496  * This code places seven Elementary slider widgets on a window, each of
1497  * them exemplifying a part of the widget's API.
1498  *
1499  * The first of them is the default slider:
1500  * @dontinclude slider_example.c
1501  * @skipline elm_slider_add
1502  * @until evas_object_show
1503  *
1504  * As you see, the defaults for a slider are:
1505  * @li horizontal
1506  * @li no label
1507  * @li no values (on indicator or unit labels)
1508  *
1509  * Actually it's pretty useless this way. So let's learn how to improve it.
1510  *
1511  * If some decoration is required, a label can be set, and icon before and
1512  * after the bar as well. On the second slider will add a @c home icon
1513  * and a @c folder icon at @c end.
1514  * @skipline text_set
1515  * @until end_set
1516  *
1517  * If the bar size need to be changed, it can be done with span set function,
1518  * that doesn't accounts other widget's parts size. Also the bar can starts
1519  * with a not default value (0.0), as we done on third slider:
1520  * @skipline value_set
1521  * @skipline span_size_set
1522  *
1523  * So far, users won't be able to see the slider value. If it's required,
1524  * it can be displayed in two different areas, units label or above
1525  * the indicator.
1526  *
1527  * Let's place a units label on our widget, and also let's set minimum and
1528  * maximum value (uses 0.0 and 1.0 by default):
1529  * @skipline unit_format_set
1530  * @skipline min_max_set
1531  *
1532  * If above the indicator is the place to display the value, just set it.
1533  * Also, is possible to invert a bar, as you can see:
1534  * @skipline indicator_format_set
1535  * @skipline inverted_set
1536  *
1537  * But if you require to use a function a bit more customized to show the value,
1538  * is possible to registry a callback function that will be called
1539  * to display unit or indicator label. Only the value will be passed to this
1540  * function, that should return a string.
1541  * In this case, a function to free this string will be required.
1542  *
1543  * Let's exemplify with indicator label on our sixth slider:
1544  * @dontinclude slider_example.c
1545  * @skip static
1546  * @skip }
1547  * @skip static
1548  * @skip }
1549  * @skip static
1550  * @skip }
1551  * @skipline static
1552  * @until }
1553  * @until }
1554  *
1555  * Setting callback functions:
1556  * @skipline indicator_format_function_set
1557  * @skipline _indicator_free
1558  *
1559  * Also, a slider can be displayed vertically:
1560  * @dontinclude slider_example.c
1561  * @skipline elm_slider_horizontal_set
1562  *
1563  * Finally the last widget will exemplify how to listen to widget's signals,
1564  * <tt> changed </tt> and <tt> delay,changed </tt>. First we need to
1565  * implement callback functions that will simply print slider's value:
1566  * @dontinclude slider_example.c
1567  * @skip static
1568  * @skip }
1569  * @skipline static
1570  * @until }
1571  * @until }
1572  *
1573  * The first callback function should be called everytime value changes,
1574  * the second one only after user stops to increment or decrement. Try
1575  * to keep arrows pressed and check the difference.
1576  * @skip smart_callback
1577  * @skipline smart_callback
1578  * @skipline smart_callback
1579  *
1580  * See the full @ref slider_example.c "example", whose window should
1581  * look like this picture:
1582  *
1583  * @image html screenshots/slider_example.png
1584  * @image latex screenshots/slider_example.eps width=\textwidth
1585  *
1586  * See the full @ref slider_example_c "source code" for this example.
1587  *
1588  * @example slider_example.c
1589  */
1590
1591 /**
1592  * @page panes_example Panes widget example
1593  *
1594  * This code places two Elementary panes widgets on a window, one of them
1595  * displayed vertically and the other horizontally, to exemplify
1596  * a part of the widget's API. Also, all the signals emitted by this
1597  * widget will be covered.
1598  *
1599  * Let's start adding a panes to our window:
1600  * @dontinclude panes_example.c
1601  * @skipline elm_panes_add
1602  * @until evas_object_show
1603  *
1604  * Now we will set a content (a simple button) to the left side of our
1605  * panes widget:
1606  * @skipline elm_button_add
1607  * @until content_left_set
1608  *
1609  * The content of the right side will be something a bit more elaborated, we'll
1610  * place another panes, displayed vertically (it's displayed horizontally
1611  * by default):
1612  * @skipline elm_panes_add
1613  * @until content_right_set
1614  *
1615  * When populating a panes displayed vertically, remember that left content
1616  * will be placed at top, and right content will place at bottom. Next
1617  * we will add two buttons to exemplify that:
1618  * @skipline elm_button_add
1619  * @until content_right_set
1620  *
1621  * Panes widgets emits 4 different signals, depending on users interaction
1622  * with the draggable bar. We'll add a callback function for each of them.
1623  *
1624  * <tt> "clicked" signal </tt>:
1625  *
1626  * Callback function that just print "Clicked" to stdin:
1627  * @dontinclude panes_example.c
1628  * @skip static void
1629  * @skip }
1630  * @skip static void
1631  * @skip }
1632  * @skip static void
1633  * @skip }
1634  * @skipline static void
1635  * @until }
1636  *
1637  * Also, add callback function to the panes:
1638  * @skipline "clicked"
1639  *
1640  * <tt> "press" signal </tt>:
1641  *
1642  * Callback function that just print "Pressed" to stdin:
1643  * @dontinclude panes_example.c
1644  * @skip static void
1645  * @skip }
1646  * @skipline static void
1647  * @until }
1648  *
1649  * Also, add callback function to the panes:
1650  * @skipline "press"
1651  *
1652  * Now, let's try to make our callback functions a bit more useful:
1653  *
1654  * <tt> "unpress" signal </tt>:
1655  *
1656  * Suppose we want to know the size proportion of left content after
1657  * user drags the bar. We need to listen for @c unpress signal, and
1658  * get this size from our panes widget. It's done on the following
1659  * function:
1660  * @dontinclude panes_example.c
1661  * @skip static void
1662  * @skip }
1663  * @skip static void
1664  * @skip }
1665  * @skipline static void
1666  * @until }
1667  *
1668  * Adding the callback function to the panes:
1669  * @skipline "unpress"
1670
1671  * <tt> "clicked,double" signal </tt>:
1672  *
1673  * Now, a interesting feature that could be addded to panes widget.
1674  * Hide a content when user double click the draggable bar. It's done
1675  * using a variable to store size and content left size getter and setter
1676  * on the following function:
1677  * @dontinclude panes_example.c
1678  * @skipline static double
1679  * @skip static void
1680  * @skip }
1681  * @skip static void
1682  * @skip }
1683  * @skip static void
1684  * @skip }
1685  * @skipline static void
1686  * @until }
1687  * @until }
1688  * @until }
1689  *
1690  * Adding the callback function to the panes:
1691  * @skipline "clicked,double"
1692  * @until panes);
1693  *
1694  * See the full @ref panes_example.c "example", whose window should
1695  * look like this picture:
1696  *
1697  * @image html screenshots/panes_example.png
1698  * @image latex screenshots/panes_example.eps width=\textwidth
1699  *
1700  * @example panes_example.c
1701  */
1702
1703 /**
1704  * @page clock_example Clock widget example
1705  *
1706  * This code places five Elementary clock widgets on a window, each of
1707  * them exemplifying a part of the widget's API.
1708  *
1709  * The first of them is the pristine clock:
1710  * @dontinclude clock_example.c
1711  * @skip pristine
1712  * @until evas_object_show
1713  * As you see, the defaults for a clock are:
1714  * - military time
1715  * - no seconds shown
1716  *
1717  * For am/pm time, see the second clock:
1718  * @dontinclude clock_example.c
1719  * @skip am/pm
1720  * @until evas_object_show
1721  *
1722  * The third one will show the seconds digits, which will flip in
1723  * synchrony with system time. Note, besides, that the time itself is
1724  * @b different from the system's -- it was customly set with
1725  * elm_clock_time_set():
1726  * @dontinclude clock_example.c
1727  * @skip with seconds
1728  * @until evas_object_show
1729  *
1730  * In both fourth and fifth ones, we turn on the <b>edition
1731  * mode</b>. See how you can change each of the sheets on it, and be
1732  * sure to try holding the mouse pressed over one of the sheet
1733  * arrows. The forth one also starts with a custom time set:
1734  * @dontinclude clock_example.c
1735  * @skip in edition
1736  * @until evas_object_show
1737  *
1738  * The fifth, besides editable, has only the time @b units editable,
1739  * for hours, minutes and seconds. This exemplifies
1740  * elm_clock_digit_edit_set():
1741  * @dontinclude clock_example.c
1742  * @skip but only
1743  * @until evas_object_show
1744  *
1745  * See the full @ref clock_example.c "example", whose window should
1746  * look like this picture:
1747  *
1748  * @image html screenshots/clock_example.png
1749  * @image latex screenshots/clock_example.eps width=\textwidth
1750  *
1751  * See the full @ref clock_example_c "source code" for this example.
1752  *
1753  * @example clock_example.c
1754  */
1755
1756 /**
1757  * @page diskselector_example_01 Diskselector widget example
1758  *
1759  * This code places 4 Elementary diskselector widgets on a window, each of
1760  * them exemplifying a part of the widget's API.
1761  *
1762  * All of them will have weekdays as items, since we won't focus
1763  * on items management on this example. For an example about this subject,
1764  * check @ref diskselector_example_02.
1765  *
1766  * The first of them is a default diskselector.
1767  * @dontinclude diskselector_example_01.c
1768  * @skipline lbl
1769  * @until }
1770  * @skipline elm_diskselector_add
1771  * @until evas_object_show
1772  *
1773  * We are just adding the diskselector, so as you can see, defaults for it are:
1774  * @li Only 3 items visible each time.
1775  * @li Only 3 characters are displayed for labels on side positions.
1776  * @li The first added item remains centeres, i.e., it's the selected item.
1777  *
1778  * To add items, we are just appending it on a loop, using function
1779  * elm_diskselector_item_append(), that will be better exaplained on
1780  * items management example.
1781  *
1782  * For a circular diskselector, check the second widget. A circular
1783  * diskselector will display first item after last, and last previous to
1784  * the first one. So, as you can see, @b Sa will appears on left side
1785  * of selected @b Sunday. This property is set with
1786  * elm_diskselector_round_set().
1787  *
1788  * Also, we decide to display only 2 character for side labels, instead of 3.
1789  * For this we call elm_diskselector_side_label_length_set(). As result,
1790  * we'll see @b Mo displayed instead of @b Mon, when @b Monday is on a
1791  * side position.
1792  *
1793  * @skipline elm_diskselector_add
1794  * @until evas_object_show
1795  *
1796  * But so far, we are only displaying 3 items at once. If more are wanted,
1797  * is enough to call elm_diskselector_display_item_num_set(), as you can
1798  * see here:
1799  * @skipline elm_diskselector_add
1800  * @until evas_object_show
1801  *
1802  * @note You can't set less than 3 items to be displayed.
1803  *
1804  * Finally, if a bounce effect is required, or you would like to see
1805  * scrollbars, it is possible. But, for default theme, diskselector
1806  * scrollbars will be invisible anyway.
1807  * @skipline elm_diskselector_add
1808  * @until evas_object_show
1809  *
1810  * See the full @ref diskselector_example_01.c "diskselector_example_01.c"
1811  * code, whose window should look like this picture:
1812  *
1813  * @image html screenshots/diskselector_example_01.png
1814  * @image latex screenshots/diskselector_example_01.eps width=\textwidth
1815  *
1816  * @example diskselector_example_01.c
1817  */
1818
1819 /**
1820  * @page diskselector_example_02 Diskselector - Items management
1821  *
1822  * This code places a Elementary diskselector widgets on a window,
1823  * along with some buttons trigerring actions on it (though its API).
1824  * It covers most of Elm_Diskselector_Item functions.
1825  *
1826  * On our @c main function, we are adding a default diskselector with
1827  * 3 items. We are only setting their labels (second parameter of function
1828  * elm_diskselector_item_append):
1829  * @dontinclude diskselector_example_02.c
1830  * @skipline elm_diskselector_add
1831  * @until Item 2
1832  *
1833  * Next we are adding lots of buttons, each one for a callback function
1834  * that will realize a task covering part of diskselector items API.
1835  * Lets check the first one:
1836  * @skipline elm_button_add
1837  * @until evas_object_show
1838  *
1839  * We are labeling the button with a task description with
1840  * elm_object_text_set() and setting a callback
1841  * function evas_object_smart_callback_add().
1842  * Each callback function will have the signature:
1843  * <tt> static void _task_cb(void *data, Evas_Object *obj,
1844  * void *event_info)</tt> with the function name varying for each task.
1845  *
1846  * Now let's cover all of them.
1847  *
1848  * <b> Appending an item: </b>
1849  * @dontinclude diskselector_example_02.c
1850  * @skipline _add_cb
1851  * @until }
1852  *
1853  * All items are included on diskselector after last one. You @b can't
1854  * preprend items.
1855  *
1856  * The first parameter of elm_diskselector_item_append() is the diskselector
1857  * object, that we are receiving as data on our callback function.
1858  * The second one is a label, the string that will be placed in the center
1859  * of our item. As we don't wan't icons or callback functions, we can
1860  * send NULL as third, fourth and fifth parameters.
1861  *
1862  * <b> Appending an item with icon: </b>
1863  * @dontinclude diskselector_example_02.c
1864  * @skipline _add_ic_cb
1865  * @until }
1866  *
1867  * If an icon is required, you can pass it as third paramenter on our
1868  * elm_diskselector_item_append() function. It will be place on the
1869  * left side of item's label, that will be shifted to right a bit.
1870  *
1871  * For more details about how to create icons, look for elm_icon examples.
1872  *
1873  * <b> Appending an item with callback function for selected: </b>
1874  * @dontinclude diskselector_example_02.c
1875  * @skipline _sel_cb
1876  * @until }
1877  * @until }
1878  *
1879  * To set a callback function that will be called every time an item is
1880  * selected, i.e., everytime the diskselector stops with this item in
1881  * center position, just pass the function as fourth paramenter.
1882  *
1883  * <b> Appending an item with callback function for selected with data: </b>
1884  * @dontinclude diskselector_example_02.c
1885  * @skipline _sel_data_cb
1886  * @until }
1887  * @until }
1888  * @until }
1889  * @until }
1890  *
1891  * If the callback function request an extra data, it can be attached to our
1892  * item passing a pointer for data as fifth parameter.
1893  * Our function _sel_data_cb will receive it as <tt> void *data </tt>.
1894  *
1895  * If you want to free this data, or handle that the way you need when the
1896  * item is deleted, set a callback function for that, with
1897  * elm_diskselector_item_del_cb_set().
1898  *
1899  * As you can see we check if @c it is not @c NULL after appending it.
1900  * If an error happens, we won't try to set a function for it.
1901  *
1902  * <b> Deleting an item: </b>
1903  * @dontinclude diskselector_example_02.c
1904  * @skip _del_cb
1905  * @skipline _del_cb
1906  * @until }
1907  *
1908  * To delete an item we simple need to call elm_diskselector_item_del() with
1909  * a pointer for such item.
1910  *
1911  * If you need, you can get selected item with
1912  * elm_diskselector_selected_item_get(), that will return a pointer for it.
1913  *
1914  * <b> Unselecting an item: </b>
1915  * @dontinclude diskselector_example_02.c
1916  * @skipline _unselect_cb
1917  * @until }
1918  *
1919  * To select an item, you should call elm_diskselector_item_selected_set()
1920  * passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
1921  *
1922  * If you unselect the selected item, diskselector will automatically select
1923  * the first item.
1924  *
1925  * <b> Printing all items: </b>
1926  * @dontinclude diskselector_example_02.c
1927  * @skipline _print_cb
1928  * @until }
1929  *
1930  * <b> Clearing the diskselector: </b>
1931  * @dontinclude diskselector_example_02.c
1932  * @skipline _clear_cb
1933  * @until }
1934  *
1935  * <b> Selecting the first item: </b>
1936  * @dontinclude diskselector_example_02.c
1937  * @skipline _select_first_cb
1938  * @until }
1939  *
1940  * <b> Selecting the last item: </b>
1941  * @dontinclude diskselector_example_02.c
1942  * @skipline _select_last_cb
1943  * @until }
1944  *
1945  * <b> Selecting the next item: </b>
1946  * @dontinclude diskselector_example_02.c
1947  * @skipline _select_next_cb
1948  * @until }
1949  *
1950  * <b> Selecting the previous item: </b>
1951  * @dontinclude diskselector_example_02.c
1952  * @skipline _select_prev_cb
1953  * @until }
1954  *
1955  * See the full @ref diskselector_example_02.c "diskselector_example_02.c"
1956  * code, whose window should look like this picture:
1957  *
1958  * @image html screenshots/diskselector_example_02.png
1959  * @image latex screenshots/diskselector_example_02.eps width=\textwidth
1960  *
1961  * @example diskselector_example_02.c
1962  */
1963
1964 /**
1965  * @page list_example_01 List widget example
1966  *
1967  * This code places a single Elementary list widgets on a window, just
1968  * to exemplify the more simple and common use case: a list will be created
1969  * and populated with a few items.
1970  *
1971  * To keep it simple, we won't show how to customize the list, for this check
1972  * @ref list_example_02. Also, we won't focus
1973  * on items management on this example. For an example about this subject,
1974  * check @ref list_example_03.
1975  *
1976  * To add a list widget.
1977  * @dontinclude list_example_01.c
1978  * @skipline elm_list_add
1979  *
1980  * We are just adding the list, so as you can see, defaults for it are:
1981  * @li Items are displayed vertically.
1982  * @li Only one item can be selected.
1983  * @li The list doesn't bouce.
1984  *
1985  * To add items, we are just appending it on a loop, using function
1986  * elm_list_item_append(), that will be better exaplained on
1987  * items management example.
1988  * @dontinclude list_example_01.c
1989  * @skipline lbl[]
1990  * @until };
1991  * @skipline for
1992  * @skipline elm_list_item_append
1993  *
1994  * After we just want to show the list. But first we need to start the widget.
1995  * It was done this way to improve widget's performance. So, always remember
1996  * that:
1997  * @warning Call elm_list_go before showing the object
1998  * @skipline elm_list_go
1999  * @skipline show
2000  *
2001  * See the full @ref list_example_01.c "list_example_01.c"
2002  * code, whose window should look like this picture:
2003  *
2004  * @image html screenshots/list_example_01.png
2005  * @image latex screenshots/list_example_01.eps width=\textwidth
2006  *
2007  * @example list_example_01.c
2008  */
2009
2010 /**
2011  * @page list_example_02 List widget example
2012  *
2013  * This code places a single Elementary list widgets on a window,
2014  * exemplifying a part of the widget's API.
2015  *
2016  * First, we will just create a simple list, as done on @ref list_example_01 :
2017  * @dontinclude list_example_02.c
2018  * @skipline lbl
2019  * @until }
2020  * @skipline elm_list_add
2021  * @until elm_list_item_append
2022  *
2023  * Now, let's customize this list a bit. First we will display items
2024  * horizontally:
2025  * @skipline horizontal_set
2026  *
2027  * Then we will choose another list mode. There are four of them, and
2028  * the default #Elm_List_Mode is #ELM_LIST_SCROLL. Let's set compress mode:
2029  * @skipline mode_set
2030  *
2031  * To enable multiple items selection, we need to enable it, since only one
2032  * selected item is allowed by default:
2033  * @skipline elm_list_multi_select_set
2034  *
2035  * We are not adding items with callback functions here,
2036  * since we'll explain it better on  @ref list_example_03. But if the callback
2037  * need to be called everytime user clicks an item, even if already selected,
2038  * it's required to enable this behavior:
2039  * @skipline elm_list_always_select_mode_set
2040  *
2041  * Finally, if a bounce effect is required, or you would like to see
2042  * scrollbars, it is possible. But, for default theme, list
2043  * scrollbars will be invisible anyway.
2044  * @skipline bounce_set
2045  * @until SCROLLER_POLICY_ON
2046  *
2047  * See the full @ref list_example_02.c "list_example_02.c"
2048  * code, whose window should look like this picture:
2049  *
2050  * @image html screenshots/list_example_02.png
2051  * @image latex screenshots/list_example_02.eps width=\textwidth
2052  *
2053  * @example list_example_02.c
2054  */
2055
2056 /**
2057  * @page list_example_03 List - Items management
2058  *
2059  * This code places a Elementary list widgets on a window,
2060  * along with some buttons trigerring actions on it (though its API).
2061  * It covers most of Elm_List_Item functions.
2062  *
2063  * On our @c main function, we are adding a default list with
2064  * 3 items. We are only setting their labels (second parameter of function
2065  * elm_list_item_append):
2066  * @dontinclude list_example_03.c
2067  * @skipline elm_list_add
2068  * @until Item 2
2069  *
2070  * Next we are adding lots of buttons, each one for a callback function
2071  * that will realize a task covering part of list items API.
2072  * Lets check the first one:
2073  * @skipline elm_button_add
2074  * @until evas_object_show
2075  *
2076  * We are labeling the button with a task description with
2077  * elm_object_text_set() and setting a callback
2078  * function evas_object_smart_callback_add().
2079  * Each callback function will have the signature:
2080  * <tt> static void _task_cb(void *data, Evas_Object *obj,
2081  * void *event_info)</tt> with the function name varying for each task.
2082  *
2083  * Now let's cover all of them.
2084  *
2085  * <b> Prepending an item: </b>
2086  * @dontinclude list_example_03.c
2087  * @skipline _prepend_cb
2088  * @until }
2089  *
2090  * The item will be placed on the begining of the list,
2091  * i.e. it will be the first one.
2092  *
2093  * The first parameter of elm_list_item_prepend() is the list
2094  * object, that we are receiving as data on our callback function.
2095  * The second one is a label, the string that will be placed in the center
2096  * of our item. As we don't wan't icons or callback functions, we can
2097  * send NULL as third, fourth, fifth and sixth parameters.
2098  *
2099  * <b> Appending an item: </b>
2100  * @dontinclude list_example_03.c
2101  * @skipline _add_cb
2102  * @until }
2103  *
2104  * Items included with append will be inserted inserted after the last one.
2105  *
2106  * <b> Appending an item with icon: </b>
2107  * @dontinclude list_example_03.c
2108  * @skipline _add_ic_cb
2109  * @until }
2110  *
2111  * If an icon is required, you can pass it as third paramenter on our
2112  * elm_list_item_append() function. It will be place on the
2113  * left side of item's label. If an icon is wanted on the right side,
2114  * it should be passed as fourth parameter.
2115  *
2116  * For more details about how to create icons, look for elm_icon examples
2117  * @ref tutorial_icon.
2118  *
2119  * <b> Appending an item with callback function for selected: </b>
2120  * @dontinclude list_example_03.c
2121  * @skipline _sel_cb
2122  * @until }
2123  * @until }
2124  *
2125  * To set a callback function that will be called every time an item is
2126  * selected, i.e., everytime the list stops with this item in
2127  * center position, just pass the function as fifth paramenter.
2128  *
2129  * <b> Appending an item with callback function for selected with data: </b>
2130  * @dontinclude list_example_03.c
2131  * @skipline _sel_data_cb
2132  * @until }
2133  * @until }
2134  * @until }
2135  * @until }
2136  *
2137  * If the callback function request an extra data, it can be attached to our
2138  * item passing a pointer for data as sixth parameter.
2139  * Our function _sel_data_cb will receive it as <tt> void *data </tt>.
2140  *
2141  * If you want to free this data, or handle that the way you need when the
2142  * item is deleted, set a callback function for that, with
2143  * elm_list_item_del_cb_set().
2144  *
2145  * As you can see we check if @c it is not @c NULL after appending it.
2146  * If an error happens, we won't try to set a function for it.
2147  *
2148  * <b> Deleting an item: </b>
2149  * @dontinclude list_example_03.c
2150  * @skipline _del_cb(
2151  * @until }
2152  *
2153  * To delete an item we simple need to call elm_list_item_del() with
2154  * a pointer for such item.
2155  *
2156  * If you need, you can get selected item with
2157  * elm_list_selected_item_get(), that will return a pointer for it.
2158  *
2159  * <b> Unselecting an item: </b>
2160  * @dontinclude list_example_03.c
2161  * @skipline _unselect_cb
2162  * @until }
2163  *
2164  * To select an item, you should call elm_list_item_selected_set()
2165  * passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
2166  *
2167  * <b> Printing all items: </b>
2168  * @dontinclude list_example_03.c
2169  * @skipline _print_cb
2170  * @until }
2171  *
2172  * <b> Clearing the list: </b>
2173  * @dontinclude list_example_03.c
2174  * @skipline _clear_cb
2175  * @until }
2176  *
2177  * <b> Selecting the next item: </b>
2178  * @dontinclude list_example_03.c
2179  * @skipline _select_next_cb
2180  * @until }
2181  *
2182  * <b> Inserting after an item: </b>
2183  * @dontinclude list_example_03.c
2184  * @skipline _insert_after_cb
2185  * @until }
2186  *
2187  * <b> Selecting the previous item: </b>
2188  * @dontinclude list_example_03.c
2189  * @skipline _select_prev_cb
2190  * @until }
2191  *
2192  * <b> Inserting before an item: </b>
2193  * @dontinclude list_example_03.c
2194  * @skipline _insert_before_cb
2195  * @until }
2196  *
2197  * If a separator is required, just set an item as such:
2198  * @dontinclude list_example_03.c
2199  * @skipline _set_separator_cb
2200  * @until }
2201  *
2202  * Also an item can be disabled, and the user won't be allowed to (un)select it:
2203  * @dontinclude list_example_03.c
2204  * @skipline _disable_cb
2205  * @until }
2206  *
2207  * See the full @ref list_example_03.c "list_example_03.c"
2208  * code, whose window should look like this picture:
2209  *
2210  * @image html screenshots/list_example_03.png
2211  * @image latex screenshots/list_example_03.eps width=\textwidth
2212  *
2213  * @example list_example_03.c
2214  */
2215
2216 /**
2217  * @page flipselector_example Flip selector widget example
2218  *
2219  * This code places an Elementary flip selector widget on a window,
2220  * along with two buttons trigerring actions on it (though its API).
2221  *
2222  * The selector is being populated with the following items:
2223  * @dontinclude flipselector_example.c
2224  * @skip lbl[]
2225  * @until ;
2226  *
2227  * Next, we create it, populating it with those items and registering
2228  * two (smart) callbacks on it:
2229  * @dontinclude flipselector_example.c
2230  * @skip fp = elm_flipselector_add
2231  * @until object_show
2232  *
2233  * Those two callbacks will take place whenever one of those smart
2234  * events occur, and they will just print something to @c stdout:
2235  * @dontinclude flipselector_example.c
2236  * @skip underflow callback
2237  * @until static void
2238  * Flip the sheets on the widget while looking at the items list, in
2239  * the source code, and you'll get the idea of those events.
2240  *
2241  * The two buttons below the flip selector will take the actions
2242  * described in their labels:
2243  * @dontinclude flipselector_example.c
2244  * @skip bt = elm_button_add
2245  * @until callback_add(win
2246  *
2247  * @dontinclude flipselector_example.c
2248  * @skip unselect the item
2249  * @until underflow
2250  *
2251  * Click on them to exercise those flip selector API calls. To
2252  * interact with the other parts of this API, there's a command line
2253  * interface, whose help string can be asked for with the 'h' key:
2254  * @dontinclude flipselector_example.c
2255  * @skip commands
2256  * @until ;
2257  *
2258  * The 'n' and 'p' keys will exemplify elm_flipselector_flip_next()
2259  * and elm_flipselector_flip_prev(), respectively. 'f' and 'l' account
2260  * for elm_flipselector_first_item_get() and
2261  * elm_flipselector_last_item_get(), respectively. Finally, 's' will
2262  * issue elm_flipselector_selected_item_get() on our example flip
2263  * selector widget.
2264  *
2265  * See the full @ref flipselector_example.c "example", whose window should
2266  * look like this picture:
2267  *
2268  * @image html screenshots/flipselector_example.png
2269  * @image latex screenshots/flipselector_example.eps width=\textwidth
2270  *
2271  * See the full @ref flipselector_example_c "source code" for this example.
2272  *
2273  * @example flipselector_example.c
2274  */
2275
2276 /**
2277  * @page fileselector_example File selector widget example
2278  *
2279  * This code places two Elementary file selector widgets on a window.
2280  * The one on the left is layouting file system items in a @b list,
2281  * while the the other is layouting them in a @b grid.
2282  *
2283  * The one having the majority of hooks of interest is on the left,
2284  * which we create as follows:
2285  * @dontinclude fileselector_example.c
2286  * @skip first file selector
2287  * @until object_show
2288  *
2289  * Note that we enable custom edition of file/directory selection, via
2290  * the text entry it has on its bottom, via
2291  * elm_fileselector_is_save_set(). It starts with the list view, which
2292  * is the default, and we make it not expandable in place
2293  * (elm_fileselector_expandable_set()), so that it replaces its view's
2294  * contents with the current directory's entries each time one
2295  * navigates to a different folder.  For both of file selectors we are
2296  * starting to list the contents found in the @c "/tmp" directory
2297  * (elm_fileselector_path_set()).
2298  *
2299  * Note the code setting it to "grid mode" and observe the differences
2300  * in the file selector's views, in the example. We also hide the
2301  * second file selector's Ok/Cancel buttons -- since it's there just
2302  * to show the grid view (and navigation) -- via
2303  * elm_fileselector_buttons_ok_cancel_set().
2304  *
2305  * The @c "done" event, which triggers the callback below
2306  * @dontinclude fileselector_example.c
2307  * @skip 'done' cb
2308  * @until }
2309  * will be called at the time one clicks the "Ok"/"Cancel" buttons of
2310  * the file selector (on the left). Note that it will print the path
2311  * to the current selection, if any.
2312  *
2313  * The @c "selected" event, which triggers the callback below
2314  * @dontinclude fileselector_example.c
2315  * @skip bt = 'selected' cb
2316  * @until }
2317  * takes place when one selects a file (if the file selector is @b not
2318  * under folders-only mode) or when one selects a folder (when in
2319  * folders-only mode). Experiment it by selecting different file
2320  * system entries.
2321  *
2322  * What comes next is the code creating the three check boxes and two
2323  * buttons below the file selector in the right. They will exercise a
2324  * bunch of functions on the file selector's API, for the instance on
2325  * the left. Experiment with them, specially the buttons, to get the
2326  * difference between elm_fileselector_path_get() and
2327  * elm_fileselector_selected_get().
2328  *
2329  * Finally, there's the code adding the second file selector, on the
2330  * right:
2331  * @dontinclude fileselector_example.c
2332  * @skip second file selector
2333  * @until object_show
2334  *
2335  * Pay attention to the code setting it to "grid mode" and observe the
2336  * differences in the file selector's views, in the example. We also
2337  * hide the second file selector's Ok/Cancel buttons -- since it's
2338  * there just to show the grid view (and navigation) -- via
2339  * elm_fileselector_buttons_ok_cancel_set().
2340  *
2341  * See the full @ref fileselector_example.c "example", whose window
2342  * should look like this picture:
2343  *
2344  * @image html screenshots/fileselector_example.png
2345  * @image latex screenshots/fileselector_example.eps width=\textwidth
2346  *
2347  * See the full @ref fileselector_example_c "source code" for this example.
2348  *
2349  * @example fileselector_example.c
2350  */
2351
2352 /**
2353  * @page fileselector_button_example File selector button widget example
2354  *
2355  * This code places an Elementary file selector button widget on a
2356  * window, along with some other checkboxes and a text entry. Those
2357  * are there just as knobs on the file selector button's state and to
2358  * display information from it.
2359  *
2360  * Here's how we instantiate it:
2361  * @dontinclude fileselector_button_example.c
2362  * @skip ic = elm_icon_add
2363  * @until evas_object_show
2364  *
2365  * Note that we set on it both icon and label decorations. It's set to
2366  * list the contents of the @c "/tmp" directory, too, with
2367  * elm_fileselector_button_path_set(). What follows are checkboxes to
2368  * exercise some of its API funtions:
2369  * @dontinclude fileselector_button_example.c
2370  * @skip ck = elm_check_add
2371  * @until evas_object_show(en)
2372  *
2373  * The checkboxes will toggle whether the file selector button's
2374  * internal file selector:
2375  * - must have an editable text entry for file names (thus, be in
2376  *   "save dialog mode")
2377  * - is to be raised as an "inner window" (note it's the default
2378  *   behavior) or as a dedicated window
2379  * - is to populate its view with folders only
2380  * - is to expand its folders, in its view, <b>in place</b>, and not
2381  *   repainting it entirely just with the contents of a sole
2382  *   directory.
2383  *
2384  * The entry labeled @c "Last selection" will exercise the @c
2385  * "file,chosen" smart event coming from the file selector button:
2386  * @dontinclude fileselector_button_example.c
2387  * @skip hook on the
2388  * @until toggle inwin
2389  *
2390  * Whenever you dismiss or acknowledges the file selector, after it's
2391  * raised, the @c event_info string will contain the last selection on
2392  * it (if any was made).
2393  *
2394  * This is how the example, just after called, should look like:
2395  *
2396  * @image html screenshots/fileselector_button_example_00.png
2397  * @image latex screenshots/fileselector_button_example_00.eps width=\textwidth
2398  *
2399  * Click on the file selector button to raise its internal file
2400  * selector, which will be contained on an <b>"inner window"</b>:
2401  *
2402  * @image html screenshots/fileselector_button_example_01.png
2403  * @image latex screenshots/fileselector_button_example_01.eps width=\textwidth
2404  *
2405  * Toggle the "inwin mode" switch off and, if you click on the file
2406  * selector button again, you'll get @b two windows, the original one
2407  * (note the last selection there!)
2408  *
2409  * @image html screenshots/fileselector_button_example_02.png
2410  * @image latex screenshots/fileselector_button_example_02.eps width=\textwidth
2411  *
2412  * and the file selector's new one
2413  *
2414  * @image html screenshots/fileselector_button_example_03.png
2415  * @image latex screenshots/fileselector_button_example_03.eps width=\textwidth
2416  *
2417  * Play with the checkboxes to get the behavior changes on the file
2418  * selector button. The respective API calls on the widget coming from
2419  * those knobs where shown in the code already.
2420  *
2421  * See the full @ref fileselector_button_example_c "source code" for
2422  * this example.
2423  *
2424  * @example fileselector_button_example.c
2425  */
2426
2427 /**
2428  * @page fileselector_entry_example File selector entry widget example
2429  *
2430  * This code places an Elementary file selector entry widget on a
2431  * window, along with some other checkboxes. Those are there just as
2432  * knobs on the file selector entry's state.
2433  *
2434  * Here's how we instantiate it:
2435  * @dontinclude fileselector_entry_example.c
2436  * @skip ic = elm_icon_add
2437  * @until evas_object_show
2438  *
2439  * Note that we set on it's button both icon and label
2440  * decorations. It's set to exhibit the path of (and list the contents
2441  * of, when internal file selector is launched) the @c "/tmp"
2442  * directory, also, with elm_fileselector_entry_path_set(). What
2443  * follows are checkboxes to exercise some of its API funtions:
2444  * @dontinclude fileselector_entry_example.c
2445  * @skip ck = elm_check_add
2446  * @until callback_add(fs_entry
2447  *
2448  * The checkboxes will toggle whether the file selector entry's
2449  * internal file selector:
2450  * - must have an editable text entry for file names (thus, be in
2451  *   "save dialog mode")
2452  * - is to be raised as an "inner window" (note it's the default
2453  *   behavior) or as a dedicated window
2454  * - is to populate its view with folders only
2455  * - is to expand its folders, in its view, <b>in place</b>, and not
2456  *   repainting it entirely just with the contents of a sole
2457  *   directory.
2458  *
2459  * Observe how the entry's text will match the string coming from the
2460  * @c "file,chosen" smart event:
2461  * @dontinclude fileselector_entry_example.c
2462  * @skip hook on the
2463  * @until }
2464  * Whenever you dismiss or acknowledges the file selector, after it's
2465  * raised, the @c event_info string will contain the last selection on
2466  * it (if any was made).
2467  *
2468  * Try, also, to type in a valid system path and, then, open the file
2469  * selector's window: it will start the file browsing there, for you.
2470  *
2471  * This is how the example, just after called, should look like:
2472  *
2473  * @image html screenshots/fileselector_entry_example_00.png
2474  * @image latex screenshots/fileselector_entry_example_00.eps width=\textwidth
2475  *
2476  * Click on the file selector entry to raise its internal file
2477  * selector, which will be contained on an <b>"inner window"</b>:
2478  *
2479  * @image html screenshots/fileselector_entry_example_01.png
2480  * @image latex screenshots/fileselector_entry_example_01.eps width=\textwidth
2481  *
2482  * Toggle the "inwin mode" switch off and, if you click on the file
2483  * selector entry again, you'll get @b two windows, the original one
2484  * (note the last selection there!)
2485  *
2486  * @image html screenshots/fileselector_entry_example_02.png
2487  * @image latex screenshots/fileselector_entry_example_02.eps width=\textwidth
2488  *
2489  * and the file selector's new one
2490  *
2491  * @image html screenshots/fileselector_entry_example_03.png
2492  * @image latex screenshots/fileselector_entry_example_03.eps width=\textwidth
2493  *
2494  * Play with the checkboxes to get the behavior changes on the file
2495  * selector entry. The respective API calls on the widget coming from
2496  * those knobs where shown in the code already.
2497  *
2498  * See the full @ref fileselector_entry_example_c "source code" for
2499  * this example.
2500  *
2501  * @example fileselector_entry_example.c
2502  */
2503
2504 /**
2505  * @page layout_example_01 Layout - Content, Table and Box
2506  *
2507  * This example shows how one can use the @ref Layout widget to create a
2508  * customized distribution of widgets on the screen, controled by an Edje theme.
2509  * The full source code for this example can be found at @ref
2510  * layout_example_01_c.
2511  *
2512  * Our custom layout is defined by a file, @ref layout_example_edc, which is an
2513  * Edje theme file. Look for the Edje documentation to understand it. For now,
2514  * it's enough to know that we describe some specific parts on this layout
2515  * theme:
2516  * @li a title text field;
2517  * @li a box container;
2518  * @li a table container;
2519  * @li and a content container.
2520  *
2521  * Going straight to the code, the following snippet instantiates the layout
2522  * widget:
2523  *
2524  * @dontinclude layout_example_01.c
2525  * @skip elm_layout_add
2526  * @until evas_object_show(layout)
2527  *
2528  * As any other widget, we set some properties for the size calculation. But
2529  * notice on this piece of code the call to the function elm_layout_file_set().
2530  * Here is where the theme file is loaded, and particularly the specific group
2531  * from this theme file. Also notice that the theme file here is referenced as
2532  * an .edj, which is a .edc theme file compiled to its binary form. Again, look
2533  * for the Edje documentation for more information about theme files.
2534  *
2535  * Next, we fetch from our theme a data string referenced by the key "title".
2536  * This data was defined in the theme, and can be used as parameters which the
2537  * program get from the specific theme that it is using. In this case, we store
2538  * the title of this window and program in the theme, as a "data" entry, just
2539  * for demonstration purposes:
2540  *
2541  * @until }
2542  *
2543  * This call elm_layout_data_get() is used to fetch the string based on the key,
2544  * and elm_object_text_part_set() will set the part defined in the theme as
2545  * "example/title" to contain this string. This key "example/title" has nothing
2546  * special. It's just an arbitrary convention that we are using in this example.
2547  * Every string in this example referencing a part of this theme will be of the
2548  * form "example/<something>".
2549  *
2550  * Now let's start using our layout to distribute things on the window space.
2551  * Since the layout was added as a resize object to the elementary window, it
2552  * will always occupy the entire space available for this window.
2553  *
2554  * The theme already has a title, and it also defines a table element which is
2555  * positioned approximately between 50% and 70% of the height of this window,
2556  * and has 100% of the width. We create some widgets (two icons, a clock and a
2557  * button) and pack them inside the table, in a distribution similar to a HTML
2558  * table:
2559  *
2560  * @until evas_object_show(bt)
2561  *
2562  * Notice that we just set size hints for every object, and call the function
2563  * elm_layout_table_pack(), which does all the work. It will place the elements
2564  * in the specified row/column, with row and column span if required, and then
2565  * the object's size and position will be controled by the layout widget. It
2566  * will also respect size hints, alignments and weight properties set to these
2567  * widgets. The resulting distribution on the screen depends on the table
2568  * properties (described in the theme), the size hints set on each widget, and
2569  * on the cells of the table that are being used.
2570  *
2571  * For instance, we add the two icons and the clock on the first, second and
2572  * third cells of the first row, and add the button the second row, making it
2573  * span for 3 columns (thus having the size of the entire table width). This
2574  * will result in a table that has 2 rows and 3 columns.
2575  *
2576  * Now let's add some widgets to the box area of our layout. This box is around
2577  * 20% and 50% of the vertical size of the layout, and 100% of its width. The
2578  * theme defines that it will use an "horizontal flow" distribution to its
2579  * elements. Unlike the table, a box will distribute elements without knowing
2580  * about rows and columns, and the distribution function selected will take care
2581  * of putting them in row, column, both, or any other available layout. This is
2582  * also described in the Edje documentation.
2583  *
2584  * This box area is similar to the @ref Box widget of elementary, with the
2585  * difference that its position and properties are controled by the theme of the
2586  * layout. It also contains more than one API to add items to it, since the
2587  * items position now is defined in terms of a list of items, not a matrix.
2588  * There's the first position (can have items added to it with
2589  * elm_layout_box_prepend()), the last position (elm_layout_box_append()), the
2590  * nth position (elm_layout_box_insert_at()) and the position right before an
2591  * element (elm_layout_box_insert_before()). We use insert_at and prepend
2592  * functions to add the first two buttons to this box, and insert_before on the
2593  * callback of each button. The callback code will be shown later, but it
2594  * basically adds a button just before the clicked button using the
2595  * elm_layout_box_insert_before() function. Here's the code for adding the first
2596  * 2 buttons:
2597  *
2598  * @until evas_object_show(item)
2599  * @until evas_object_show(item)
2600  *
2601  * Finally, we have an area in this layout theme, in the bottom part of it,
2602  * reserved for adding an specific widget. Differently from the 2 parts
2603  * described until now, this one can only receive one widget with the call
2604  * elm_layout_content_set(). If there was already an item on this specific part,
2605  * it will be deleted (one can use elm_layout_content_unset() in order to remove
2606  * it without deleting). An example of removing it without deleting, but
2607  * manually deleting this widget just after that, can be seen on the callback
2608  * for this button. Actually, the callback defined for this button will clean
2609  * the two other parts (deleting all of their elements) and then remove and
2610  * delete this button.
2611  *
2612  * @until _swallow_btn_cb
2613  *
2614  * Also notice that, for this last added button, we don't have to call
2615  * evas_object_show() on it. This is a particularity of the theme for layouts,
2616  * that will have total control over the properties like size, position,
2617  * visibility and clipping of a widget added with elm_layout_content_set().
2618  * Again, read the Edje documentation to understand this better.
2619  *
2620  * Now we just put the code for the different callbacks specified for each kind
2621  * of button and make simple comments about them:
2622  *
2623  * @dontinclude layout_example_01.c
2624  * @skip static void
2625  * @until evas_object_del(item)
2626  * @until }
2627  *
2628  * The first callback is used for the button in the table, and will just remove
2629  * itself from the table with elm_layout_table_unpack(), which remove items
2630  * without deleting them, and then calling evas_object_del() on itself.
2631  *
2632  * The second callback is for buttons added to the box. When clicked, these
2633  * buttons will create a new button, and add them to the same box, in the
2634  * position just before the clicked button.
2635  *
2636  * And the last callback is for the button added to the "content" area. It will
2637  * clear both the table and the box, passing @c EINA_TRUE to their respective @c
2638  * clear parameters, which will imply on the items of these containers being
2639  * deleted.
2640  *
2641  * A screenshot of this example can be seen on:
2642  *
2643  * @image html screenshots/layout_example_01.png
2644  * @image latex screenshots/layout_example_01.eps width=\textwidth
2645  *
2646  */
2647
2648 /**
2649  * @page layout_example_02 Layout - Predefined Layout
2650  *
2651  * This example shows how one can use the @ref Layout with a predefined theme
2652  * layout to add a back and next button to a simple window. The full source code
2653  * for this example can be found at @ref layout_example_02_c.
2654  *
2655  * After setting up the window and background, we add the layout widget to the
2656  * window. But instead of using elm_layout_file_set() to load its theme from a
2657  * custom theme file, we can use elm_layout_theme_set() to load one of the
2658  * predefined layouts that come with elementary. Particularly on this example,
2659  * we load the them of class "layout", group "application" and style
2660  * "content-back-next" (since we want the back and next buttons).
2661  *
2662  * @dontinclude layout_example_02.c
2663  * @skip elm_layout_add
2664  * @until evas_object_show(layout)
2665  *
2666  * This default theme contains only a "content" area named
2667  * "elm.swallow.content", where we can add any widget (it can be even a
2668  * container widget, like a box, frame, list, or even another layout). Since we
2669  * just want to show the resulting layout, we add a simple icon to it:
2670  *
2671  * @until layout_content_set
2672  *
2673  * This default layout also provides some signals when the next and prev buttons
2674  * are clicked. We can register callbacks to them with the
2675  * elm_object_signal_callback_add() function:
2676  *
2677  * @until elm,action,next
2678  *
2679  * In the @ref layout_example_03 you can see how to send signals to the layout with
2680  * elm_object_signal_emit().
2681  *
2682  * Now our callback just changes the picture being displayed when one of the
2683  * buttons are clicked:
2684  *
2685  * @dontinclude layout_example_02.c
2686  * @skip images
2687  * @until standard_set
2688  * @until }
2689  *
2690  * It's possible to see that it gets the name of the image being shown from the
2691  * array of image names, going forward on this array when "next" is clicked and
2692  * backward when "back" is clicked.
2693  *
2694  * A screenshot of this example can be seen on:
2695  *
2696  * @image html screenshots/layout_example_02.png
2697  * @image latex screenshots/layout_example_02.eps width=\textwidth
2698  */
2699
2700 /**
2701  * @page layout_example_03 Layout - Signals and Size Changed
2702  *
2703  * This example shows how one can send and receive signals to/from the layout,
2704  * and what to do when the layout theme has its size changed. The full source
2705  * code for this example can be found at @ref layout_example_03_c.
2706  *
2707  * In this exmaple we will use another group from the same layout theme file
2708  * used in @ref layout_example_01. Its instanciation and loading happens in the
2709  * following lines:
2710  *
2711  * @dontinclude layout_example_03.c
2712  * @skip elm_layout_add
2713  * @until evas_object_show
2714  *
2715  * This time we register a callback to be called whenever we receive a signal
2716  * after the end of the animation that happens in this layout:
2717  *
2718  * @until signal_callback_add
2719  *
2720  * We also add a button that will send signals to the layout:
2721  *
2722  * @until callback_add
2723  *
2724  * The callback for this button will check what type of signal it should send,
2725  * and then emit it. The code for this callback follows:
2726  *
2727  * @dontinclude layout_exmaple_03.c
2728  * @skip static Eina_Bool
2729  * @until Enlarge
2730  * @until }
2731  * @until }
2732  *
2733  * As we said before, we are receiving a signal whenever the animation started
2734  * by the button click ends. This is the callback for that signal:
2735  *
2736  * @until }
2737  *
2738  * Notice from this callback that the elm_layout_sizing_eval() function must be
2739  * called if we want our widget to update its size after the layout theme having
2740  * changed its minimum size. This happens because the animation specified in the
2741  * theme increases the size of the content area to a value higher than the
2742  * widget size, thus requiring more space. But the elementary layout widget
2743  * has no way to know this, thus needing the elm_layout_sizing_eval() to
2744  * be called on the layout, informing that this size has changed.
2745  *
2746  * A screenshot of this example can be seen on:
2747  *
2748  * @image html screenshots/layout_example_03.png
2749  * @image latex screenshots/layout_example_03.eps width=\textwidth
2750  */
2751
2752 /**
2753  * @page tutorial_hover Hover example
2754  * @dontinclude hover_example_01.c
2755  *
2756  * On this example we are going to have a button that when clicked will show our
2757  * hover widget, this hover will have content set on it's left, top, right and
2758  * middle positions. In the middle position we are placing a button that when
2759  * clicked will hide the hover. We are also going to use a non-default theme
2760  * for our hover. We won't explain the functioning of button for that see @ref
2761  * Button.
2762  *
2763  * We start our example with a couple of callbacks that show and hide the data
2764  * they're given(which we'll see later on is the hover widget):
2765  * @skip static
2766  * @until }
2767  * @until }
2768  *
2769  * In our main function we'll do some initialization and then create 3
2770  * rectangles, one red, one green and one blue to use in our hover. We'll also
2771  * create the 2 buttons that will show and hide the hover:
2772  * @until show(bt2)
2773  *
2774  * With all of that squared away we can now get to the heart of the matter,
2775  * creating our hover widget, which is easy as pie:
2776  * @until hover
2777  *
2778  * Having created our hover we now need to set the parent and target. Which if
2779  * you recall from the function documentations are going to tell the hover which
2780  * area it should cover and where it should be centered:
2781  * @until bt
2782  *
2783  * Now we set the theme for our hover. We're using the popout theme which gives
2784  * our contents a white background and causes their appearance to be animated:
2785  * @until popout
2786  *
2787  * And finally we set the content for our positions:
2788  * @until bt2
2789  *
2790  * So far so good? Great 'cause that's all there is too it, what is left now is
2791  * just connecting our buttons to the callbacks we defined at the beginning of
2792  * the example and run the main loop:
2793  * @until ELM_MAIN
2794  *
2795  * Our example will initially look like this:
2796  *
2797  * @image html screenshots/hover_example_01.png
2798  * @image latex screenshots/hover_example_01.eps width=\textwidth
2799  *
2800  * And after you click the "Show hover" button it will look like this:
2801  *
2802  * @image html screenshots/hover_example_01_a.png
2803  * @image latex screenshots/hover_example_01_a.eps width=\textwidth
2804  *
2805  * @example hover_example_01.c
2806  */
2807
2808 /**
2809   * @page tutorial_flip Flip example
2810   * @dontinclude flip_example_01.c
2811   *
2812   * This example will show a flip with two rectangles on it(one blue, one
2813   * green). Our example will allow the user to choose the animation the flip
2814   * uses and to interact with it. To allow the user to choose the interaction
2815   * mode we use radio buttons, we will however not explain them, if you would
2816   * like to know more about radio buttons see @ref radio.
2817   *
2818   * We start our example with the usual setup and then create the 2 rectangles
2819   * we will use in our flip:
2820   * @until show(rect2)
2821   *
2822   * The next thing to do is to create our flip and set it's front and back
2823   * content:
2824   * @until show
2825   *
2826   * The next thing we do is set the interaction mode(which the user can later
2827   * change) to the page animation:
2828   * @until PAGE
2829   *
2830   * Setting a interaction mode however is not sufficient, we also need to
2831   * choose which directions we allow interaction from, for this example we
2832   * will use all of them:
2833   * @until RIGHT
2834   *
2835   * We are also going to set the hitsize to the entire flip(in all directions)
2836   * to make our flip very easy to interact with:
2837   * @until RIGHT
2838   *
2839   * After that we create our radio buttons and start the main loop:
2840   * @until ELM_MAIN()
2841   *
2842   * When the user clicks a radio button a function that changes the
2843   * interaction mode and animates the flip is called:
2844   * @until }
2845   * @note The elm_flip_go() call here serves no purpose other than to
2846   * ilustrate that it's possible to animate the flip programmatically.
2847   *
2848   * Our example will look like this:
2849   *
2850   * @image html screenshots/flip_example_01.png
2851   * @image latex screenshots/flip_example_01.eps width=\textwidth
2852   *
2853   * @note Since this is an animated example the screenshot doesn't do it
2854   * justice, it is a good idea to compile it and see the animations.
2855   *
2856   * @example flip_example_01.c
2857   */
2858
2859  /**
2860   * @page tutorial_label Label example
2861   * @dontinclude label_example_01.c
2862   *
2863   * In this example we are going to create 6 labels, set some properties on
2864   * them and see what changes in appearance those properties cause.
2865   *
2866   * We start with the setup code that by now you should be familiar with:
2867   * @until show(bg)
2868   *
2869   * For our first label we have a moderately long text(that doesn't fit in the
2870   * label's width) so we will make it a sliding label. Since the text isn't
2871   * too long we don't need the animation to be very long, 3 seconds should
2872   * give us a nice speed:
2873   * @until show(label
2874   *
2875   * For our second label we have the same text, but this time we aren't going
2876   * to have it slide, we're going to ellipsize it. Because we ask our label
2877   * widget to ellipsize the text it will first diminsh the fontsize so that it
2878   * can show as much of the text as possible:
2879   * @until show(label
2880   *
2881   * For the third label we are going to ellipsize the text again, however this
2882   * time to make sure the fontsize isn't diminshed we will set a line wrap.
2883   * The wrap won't actually cause a line break because we set the label to
2884   * ellipsize:
2885   * @until show(label
2886   *
2887   * For our fourth label we will set line wrapping but won't set ellipsis, so
2888   * that our text will indeed be wrapped instead of ellipsized. For this label
2889   * we choose character wrap:
2890   * @until show(label
2891   *
2892   * Just two more, for our fifth label we do the same as for the fourth
2893   * except we set the wrap to word:
2894   * @until show(label
2895   *
2896   * And last but not least for our sixth label we set the style to "marker" and
2897   * the color to red(the default color is white which would be hard to see on
2898   * our white background):
2899   * @until show(label
2900   *
2901   * Our example will look like this:
2902   *
2903   * @image html screenshots/label_example_01.png
2904   * @image latex screenshots/label_example_01.eps width=\textwidth
2905   *
2906   * @example label_example_01.c
2907   */
2908
2909  /**
2910   * @page tutorial_image Image example
2911   * @dontinclude image_example_01.c
2912   *
2913   * This example is as simple as possible. An image object will be added to the
2914   * window over a white background, and set to be resizeable together with the
2915   * window. All the options set through the example will affect the behavior of
2916   * this image.
2917   *
2918   * We start with the code for creating a window and its background, and also
2919   * add the code to write the path to the image that will be loaded:
2920   *
2921   * @skip int
2922   * @until snprintf
2923   *
2924   * Now we create the image object, and set that file to be loaded:
2925   *
2926   * @until }
2927   *
2928   * We can now go setting our options.
2929   *
2930   * elm_image_no_scale_set() is used just to set this value to true (we
2931   * don't want to scale our image anyway, just resize it).
2932   *
2933   * elm_image_scale_set() is used to allow the image to be resized to a size
2934   * smaller than the original one, but not to a size bigger than it.
2935   *
2936   * elm_elm_image_smooth_set() will disable the smooth scaling, so the scale
2937   * algorithm used to scale the image to the new object size is going to be
2938   * faster, but with a lower quality.
2939   *
2940   * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
2941   * diagonal.
2942   *
2943   * elm_image_aspect_ratio_retained_set() is used to keep the original aspect
2944   * ratio of the image, even when the window is resized to another aspect ratio.
2945   *
2946   * elm_image_fill_outside_set() is used to ensure that the image will fill the
2947   * entire area available to it, even if keeping the aspect ratio. The image
2948   * will overflow its width or height (any of them that is necessary) to the
2949   * object area, instead of resizing the image down until it can fit entirely in
2950   * this area.
2951   *
2952   * elm_image_editable_set() is used just to cover the API, but won't affect
2953   * this example since we are not using any copy & paste property.
2954   *
2955   * This is the code for setting these options:
2956   *
2957   * @until editable
2958   *
2959   * Now some last touches in our object size hints, window and background, to
2960   * display this image properly:
2961   *
2962   * @until ELM_MAIN
2963   *
2964   * This example will look like this:
2965   *
2966   * @image html screenshots/image_example_01.png
2967   * @image latex screenshots/image_example_01.eps width=\textwidth
2968   *
2969   * @example image_example_01.c
2970   */
2971
2972  /**
2973   * @page tutorial_icon Icon example
2974   * @dontinclude icon_example_01.c
2975   *
2976   * This example is as simple as possible. An icon object will be added to the
2977   * window over a white background, and set to be resizeable together with the
2978   * window. All the options set through the example will affect the behavior of
2979   * this icon.
2980   *
2981   * We start with the code for creating a window and its background:
2982   *
2983   * @skip int
2984   * @until show(bg)
2985   *
2986   * Now we create the icon object, and set lookup order of the icon, and choose
2987   * the "home" icon:
2988   *
2989   * @until home
2990   *
2991   * An intersting thing is that after setting this, it's possible to check where
2992   * in the filesystem is the theme used by this icon, and the name of the group
2993   * used:
2994   *
2995   * @until printf
2996   *
2997   * We can now go setting our options.
2998   *
2999   * elm_icon_no_scale_set() is used just to set this value to true (we
3000   * don't want to scale our icon anyway, just resize it).
3001   *
3002   * elm_icon_scale_set() is used to allow the icon to be resized to a size
3003   * smaller than the original one, but not to a size bigger than it.
3004   *
3005   * elm_elm_icon_smooth_set() will disable the smooth scaling, so the scale
3006   * algorithm used to scale the icon to the new object size is going to be
3007   * faster, but with a lower quality.
3008   *
3009   * elm_icon_fill_outside_set() is used to ensure that the icon will fill the
3010   * entire area available to it, even if keeping the aspect ratio. The icon
3011   * will overflow its width or height (any of them that is necessary) to the
3012   * object area, instead of resizing the icon down until it can fit entirely in
3013   * this area.
3014   *
3015   * This is the code for setting these options:
3016   *
3017   * @until fill_outside
3018   *
3019   * However, if you try this example you may notice that this image is not being
3020   * affected by all of these options. This happens because the used icon will be
3021   * from elementary theme, and thus it has its own set of options like smooth
3022   * scaling and fill_outside options. You can change the "home" icon to use some
3023   * image (from your system) and see that then those options will be respected.
3024   *
3025   * Now some last touches in our object size hints, window and background, to
3026   * display this icon properly:
3027   *
3028   * @until ELM_MAIN
3029   *
3030   * This example will look like this:
3031   *
3032   * @image html screenshots/icon_example_01.png
3033   * @image latex screenshots/icon_example_01.eps width=\textwidth
3034   *
3035   * @example icon_example_01.c
3036   */
3037
3038 /**
3039  * @page tutorial_hoversel Hoversel example
3040  * @dontinclude hoversel_example_01.c
3041  *
3042  * In this example we will create a hoversel with 3 items, one with a label but
3043  * no icon and two with both a label and an icon. Every item that is clicked
3044  * will be deleted, but everytime the hoversel is activated we will also add an
3045  * item. In addition our first item will print all items when clicked and our
3046  * third item will clear all items in the hoversel.
3047  *
3048  * We will start with the normal creation of window stuff:
3049  * @until show(bg)
3050  *
3051  * Next we will create a red rectangle to use as the icon of our hoversel:
3052  * @until show
3053  *
3054  * And now we create our hoversel and set some of it's properties. We set @p win
3055  * as its parent, ask it to not be horizontal(be vertical) and give it a label
3056  * and icon:
3057  * @until icon_set
3058  *
3059  * Next we will add our three items, setting a callback to be called for the
3060  * first and third:
3061  * @until _rm_items
3062  *
3063  * We also set a pair of callbacks to be called whenever any item is selected or
3064  * when the hoversel is activated:
3065  * @until clicked
3066  *
3067  * And then ask that our hoversel be shown and run the main loop:
3068  * @until ELM_MAIN
3069  *
3070  * We now have the callback for our first item which prints all items in the
3071  * hoversel:
3072  * @until }
3073  *
3074  * Next we have the callback for our third item which removes all items from the
3075  * hoversel:
3076  * @until }
3077  *
3078  * Next we have the callback that is called whenever an item is clicked and
3079  * deletes that item:
3080  * @until }
3081  *
3082  * And the callback that is called when the hoversel is activated and adds an
3083  * item to the hoversel. Note that since we allocate memory for the item we need
3084  * to know when the item dies so we can free that memory:
3085  * @until }
3086  *
3087  * And finally the callback that frees the memory we allocated for items created
3088  * in the @p _add_item callback:
3089  * @until }
3090  *
3091  * Our example will initially look like this:
3092  *
3093  * @image html screenshots/hoversel_example_01.png
3094  * @image latex screenshots/hoversel_example_01.eps width=\textwidth
3095  *
3096  * And when the hoversel is clicked it will look like this:
3097  *
3098  * @image html screenshots/hoversel_example_01_a.png
3099  * @image latex screenshots/hoversel_example_01_a.eps width=\textwidth
3100  *
3101  * @example hoversel_example_01.c
3102  */
3103
3104 /**
3105  * @page conformant_example Conformant Example.
3106  *
3107  * In this example we'll explain how to create applications to work
3108  * with illume, considering space required for virtual keyboards, indicator
3109  * and softkeys.
3110  *
3111  * Illume is a module for Enlightenment that modifies the user interface
3112  * to work cleanly and nicely on a mobile device. It has support for
3113  * virtual keyboard, among other nice features.
3114  *
3115  * Let's start creating a very simple window with a vertical box
3116  * with multi-line entry between two buttons.
3117  * This entry will expand filling all space on window not used by buttons.
3118  *
3119  * @dontinclude conformant_example_01.c
3120  * @skipline elm_main
3121  * @until }
3122  *
3123  * For information about how to create windows, boxes, buttons or entries,
3124  * look for documentation for these widgets.
3125  *
3126  * It will looks fine when you don't need a virtual keyboard, as you
3127  * can see on the following image:
3128  *
3129  * @image html screenshots/conformant_example_01.png
3130  * @image latex screenshots/conformant_example_01.eps width=\textwidth
3131  *
3132  * But if you call a virtual keyboard, the window will resize, changing
3133  * widgets size and position. All the content will shrink.
3134  *
3135  * If you don't want such behaviour, you
3136  * will need a conformant to account for space taken up by the indicator,
3137  * virtual keyboard and softkey.
3138  *
3139  * In this case, using the conformant in a proper way, you will have
3140  * a window like the following:
3141  *
3142  * @image html screenshots/conformant_example_02.png
3143  * @image latex screenshots/conformant_example_02.eps width=\textwidth
3144  *
3145  * As you can see, it guess the space that will be required by the keyboard,
3146  * indicator and softkey bars.
3147  *
3148  * So, let's study each step required to transform our initial example on
3149  * the second one.
3150  *
3151  * First of all, we need to set the window as an illume conformant window:
3152  * @dontinclude conformant_example_02.c
3153  * @skipline elm_win_conformant_set
3154  *
3155  * Next, we'll add a conformant widget, and set it to resize with the window,
3156  * instead of the box.
3157  * @skipline conform
3158  * @until evas_object_show
3159  *
3160  * Finally, we'll set the box as conformant's content, just like this:
3161  * @skipline elm_conformant_content_set
3162  *
3163  * Compare both examples code:
3164  * @ref conformant_example_01.c "conformant_example_01.c"
3165  * @ref conformant_example_02.c "conformant_example_02.c"
3166  *
3167  * @example conformant_example_01.c
3168  * @example conformant_example_02.c
3169  */
3170
3171 /**
3172  * @page index_example_01 Index widget example 1
3173  *
3174  * This code places an Elementary index widget on a window, which also
3175  * has a very long list of arbitrary strings on it.  The list is
3176  * sorted alphabetically and the index will be used to index the first
3177  * items of each set of strings beginning with an alphabet letter.
3178  *
3179  * Below the list are some buttons, which are there just to exercise
3180  * some index widget's API.
3181  *
3182  * Here's how we instantiate it:
3183  * @dontinclude index_example_01.c
3184  * @skip elm_list_add
3185  * @until evas_object_show(d.index)
3186  * where we're showing also the list being created. Note that we issue
3187  * elm_win_resize_object_add() on the index, so that it's set to have
3188  * the whole window as its container. Then, we have to populate both
3189  * list and index widgets:
3190  * @dontinclude index_example_01.c
3191  * @skip for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++)
3192  * @until }
3193  * @until }
3194  *
3195  * The strings populating the list come from a file
3196  * @dontinclude index_example_01.c
3197  * @skip static const char *dict
3198  * @until }
3199  *
3200  * We use the @c curr char variable to hold the last initial letter
3201  * seen on that ordered list of strings, so that we're able to have an
3202  * index item pointing to each list item starting a new letter
3203  * "section". Note that our index item data pointers will be the list
3204  * item handles. We are also setting a callback function to index
3205  * items deletion events:
3206  * @dontinclude index_example_01.c
3207  * @skip static void
3208  * @until }
3209  *
3210  * There, we show you that the @c event_info pointer will contain the
3211  * item in question's data, i.e., a given list item's pointer. Because
3212  * item data is also returned in the @c data argument on
3213  * @c Evas_Smart_Cb functions, those two pointers must have the same
3214  * values. On this deletion callback, we're deleting the referred list
3215  * item too, just to exemplify that anything could be done there.
3216  *
3217  * Next, we hook to two smart events of the index object:
3218  * @dontinclude index_example_01.c
3219  * @skip smart_callback_add(d.index
3220  * @until _index_selected
3221  * @dontinclude index_example_01.c
3222  * @skip "delay,changed" hook
3223  * @until }
3224  * @until }
3225  *
3226  * Check that, whenever one holds the mouse pressed over a given index
3227  * letter for some time, the list beneath it will roll down to the
3228  * item pointed to by that index item. When one releases the mouse
3229  * button, the second callback takes place. There, we check that the
3230  * reported item data, on @c event_info, is the same reported by
3231  * elm_index_item_selected_get(), which gives the last selection's
3232  * data on the index widget.
3233  *
3234  * The first of the three buttons that follow will call
3235  * elm_index_active_set(), thus showing the index automatically for
3236  * you, if it's not already visible, what is checked with
3237  * elm_index_active_get(). The second button will exercise @b deletion
3238  * of index item objects, by the following code:
3239  * @dontinclude index_example_01.c
3240  * @skip delete an index item
3241  * @until }
3242  *
3243  * It will get the last index item selected's data and find the
3244  * respective #Elm_Index_Item handle with elm_index_item_find(). We
3245  * need the latter to query the indexing letter string from, with
3246  * elm_index_item_letter_get(). Next, comes the delition, itself,
3247  * which will also trigger the @c _index_item_del callback function,
3248  * as said above.
3249  *
3250  * The third button, finally, will exercise elm_index_item_clear(),
3251  * which will delete @b all of the index's items.
3252  *
3253  * This is how the example program's window looks like with the index
3254  * widget hidden:
3255  * @image html screenshots/index_example_00.png
3256  * @image latex screenshots/index_example_00.eps
3257  *
3258  * When it's shown, it's like the following figure:
3259  * @image html screenshots/index_example_01.png
3260  * @image latex screenshots/index_example_01.eps
3261  *
3262  * See the full @ref index_example_01_c "source code" for
3263  * this example.
3264  *
3265  * @example index_example_01.c
3266  */
3267
3268 /**
3269  * @page index_example_02 Index widget example 2
3270  *
3271  * This code places an Elementary index widget on a window, indexing
3272  * grid items. The items are placed so that their labels @b don't
3273  * follow any order, but the index itself is ordered (through
3274  * elm_index_item_sorted_insert()). This is a complement to to @ref
3275  * index_example_01 "the first example on indexes".
3276  *
3277  * Here's the list of item labels to be used on the grid (in that
3278  * order):
3279  * @dontinclude index_example_02.c
3280  * @skip static const char *items
3281  * @until };
3282  *
3283  * In the interesting part of the code, here, we first instantiate the
3284  * grid (more on grids on their examples) and, after creating our
3285  * index, for each grid item we also create an index one to reference
3286  * it:
3287  * @dontinclude index_example_02.c
3288  * @skip grid = elm_gengrid_add
3289  * @until }
3290  * @until smart_callback_add
3291  *
3292  * The order in which they'll appear in the index, though, is @b
3293  * alphabetical, becase of elm_index_item_sorted_insert() usage
3294  * together with the comparing function, where we take the letters of
3295  * each index item to base our ordering on. The parameters on
3296  * @c _index_cmp have to be declared as void pointers because of the
3297  * @c Eina_Compare_Cb prototype requisition, but in this case we know
3298  * they'll be #Elm_Index_Item's:
3299  * @dontinclude index_example_02.c
3300  * @skip ordering alphabetically
3301  * @until }
3302  *
3303  * The last interesting bit is the callback in the @c "delay,changed"
3304  * smart event, which will bring the given grid item to the grid's
3305  * visible area:
3306  * @dontinclude index_example_02.c
3307  * @skip static void
3308  * @until }
3309  *
3310  * Note how the grid will move kind of randomly while you move your
3311  * mouse pointer held over the index from top to bottom -- that's
3312  * because of the the random order the items have in the grid itself.
3313  *
3314  * This is how the example program's window looks like:
3315  * @image html screenshots/index_example_03.png
3316  * @image latex screenshots/index_example_03.eps
3317  *
3318  * See the full @ref index_example_c "source code" for
3319  * this example.
3320  *
3321  * @example index_example_02.c
3322  */
3323
3324 /**
3325  * @page tutorial_ctxpopup Ctxpopup example
3326  * @dontinclude ctxpopup_example_01.c
3327  *
3328  * In this example we have a list with two items, when either item is clicked
3329  * a ctxpopup for it will be shown. Our two ctxpopups are quite different, the
3330  * one for the first item is a vertical and it's items contain both labels and
3331  * icons, the one for the second item is horizontal and it's items have icons
3332  * but not labels.
3333  *
3334  * We will begin examining our example code by looking at the callback we'll use
3335  * when items in the ctxpopup are clicked. It's very simple, all it does is
3336  * print the label present in the ctxpopup item:
3337  * @until }
3338  *
3339  * Next we examine a function that creates ctxpopup items, it was created to
3340  * avoid repeating the same code whenever we needed to add an item to our
3341  * ctxpopup. Our function creates an icon from the standard set of icons, and
3342  * then creates the item, with the label received as an argument. We also set
3343  * the callback to be called when the item is clicked:
3344  * @until }
3345  *
3346  * Finally we have the function that will create the ctxpopup for the first item
3347  * in our list. This one is somewhat more complex though, so let's go through it
3348  * in parts. First we declare our variable and add the ctxpopup:
3349  * @until ctxpopup_add
3350  *
3351  * Next we create a bunch of items for our ctxpopup, marking two of them as
3352  * disabled just so we can see what that will look like:
3353  * @until disabled_set
3354  * @until disabled_set
3355  *
3356  * Then we ask evas where the mouse pointer was so that we can have our ctxpopup
3357  * appear in the right place, set a maximum size for the ctxpopup, move it and
3358  * show it:
3359  * @until show
3360  *
3361  * And last we mark the list item as not selected:
3362  * @until }
3363  *
3364  * Our next function is the callback that will create the ctxpopup for the
3365  * second list item, it is very similar to the previous function. A couple of
3366  * interesting things to note is that we ask our ctxpopup to be horizontal, and
3367  * that we pass NULL as the label for every item:
3368  * @until }
3369  *
3370  * And with all of that in place we can now get to our main function where we
3371  * create the window, the list, the list items and run the main loop:
3372  * @until ELM_MAIN()
3373  *
3374  * The example will initially look like this:
3375  *
3376  * @image html screenshots/ctxpopup_example_01.png
3377  * @image latex screenshots/ctxpopup_example_01.eps width=\textwidth
3378  *
3379  * @note This doesn't show the ctxpopup tough, since it will only appear when
3380  * we click one of the list items.
3381  *
3382  * Here is what our first ctxpopup will look like:
3383  *
3384  * @image html screenshots/ctxpopup_example_01_a.png
3385  * @image latex screenshots/ctxpopup_example_01_a.eps width=\textwidth
3386  *
3387  * And here the second ctxpopup:
3388  *
3389  * @image html screenshots/ctxpopup_example_01_b.png
3390  * @image latex screenshots/ctxpopup_example_01_b.eps width=\textwidth
3391  *
3392  * @example ctxpopup_example_01.c
3393  */
3394
3395 /**
3396  * @page tutorial_pager
3397  * @dontinclude pager_example_01.c
3398  *
3399  * In this example we'll have a pager with 3 rectangles on it, one blue, one
3400  * green and one blue, we'll also have 1 button for each rectangle. Pressing a
3401  * button will bring the associated rectangle to the front of the pager(promote
3402  * it).
3403  *
3404  * We start our example with some run of the mill code that you've seen in other
3405  * examples:
3406  * @until show
3407  *
3408  * And then we get right to creating our pager, setting a style and some basic
3409  * properties to it:
3410  * @until show
3411  *
3412  * Well a pager without any content is not of much use, so let's create the
3413  * first of our rectangles, add it to the pager and create the button for it:
3414  * @until smart_callback
3415  * @note The only line of above code that directly relates to our pager is the
3416  * call to elm_pager_content_push().
3417  *
3418  * And now we will do the same thing again twice for our next two rectangles:
3419  * @until smart_callback
3420  * @until smart_callback
3421  *
3422  * Now that we haver our widgets create we can get to running the main loop:
3423  * @until ELM_MAIN
3424  *
3425  * We also have the callback that is called when any of the buttons is pressed,
3426  * this callback is receiving the rectangle in it's @p data argument, so we
3427  * check if it's already on top and if not move it there:
3428  * @until }
3429  *
3430  * Our example will look like this:
3431  *
3432  * @image html screenshots/pager_example_01.png
3433  * @image latex screenshots/pager_example_01.eps width=\textwidth
3434  * @note Like all examples that involve animations the screenshot doesn't do it
3435  * justice, seeing it in action is a must.
3436  *
3437  * @example pager_example_01.c
3438  */
3439
3440 /**
3441  * @page tutorial_separator Separator example
3442  * @dontinclude separator_example_01.c
3443  *
3444  * In this example we are going to pack two rectangles in a box, and have a
3445  * separator in the middle.
3446  *
3447  * So we start we the window, background, box and rectangle creation, all pretty
3448  * normal stuff:
3449  * @until pack_end
3450  *
3451  * Once we have our first rectangle in the box we create and add our separator:
3452  * @until pack_end
3453  * @note Since our box is in horizontal mode it's a good idea to set the
3454  * separator to be horizontal too.
3455  *
3456  * And now we add our second rectangle and run the main loop:
3457  * @until ELM_MAIN
3458  *
3459  * This example will look like this:
3460  *
3461  * @image html screenshots/separator_example_01.png
3462  * @image eps screenshots/separator_example_01.eps width=\textwidth
3463  *
3464  * @example separator_example_01.c
3465  */
3466
3467 /**
3468  * @page tutorial_radio Radio example
3469  * @dontinclude radio_example_01.c
3470  *
3471  * In this example we will create 4 radio buttons, three of them in a group and
3472  * another one not in the group. We will also have the radios in the group
3473  * change the value of a variable directly and have then print it when the value
3474  * changes. The fourth button is in the example just to make clear that radios
3475  * outside the group don't affect the group.
3476  *
3477  * We'll start with the usual includes:
3478  * @until #endif
3479  *
3480  * And move right to declaring a static variable(the one whose value the radios
3481  * will change):
3482  * @until static
3483  *
3484  * We now need to have a window and all that good stuff to be able to place our
3485  * radios in:
3486  * @until show(bx)
3487  *
3488  * And now we create a radio button, since this is the first button in our group
3489  * we set the group to be the radio(so we can set the other radios in the same
3490  * group). We also set the state value of this radio to 1 and the value pointer
3491  * to @p val, since val is @p 1 this has the additional effect of setting the
3492  * radio value to @p 1. For this radio we choose the default home icon:
3493  * @until show
3494  *
3495  * To check that our radio buttons are working we'll add a callback to the
3496  * "changed" signal of the radio:
3497  * @until smart_callback
3498  *
3499  * The creation of our second radio button is almost identical, the 2
3500  * differences worth noting are, the value of this radio 2 and that we add this
3501  * radio to the group of the first radio:
3502  * @until smart_callback
3503  *
3504  * For our third callback we'll omit the icon and set the value to 3, we'll also
3505  * add it to the group of the first radio:
3506  * @until smart_callback
3507  *
3508  * Our fourth callback has a value of 4, no icon and most relevantly is not a
3509  * member of the same group as the other radios:
3510  * @until show
3511  *
3512  * We finally run the main loop:
3513  * @until ELM_MAIN
3514  *
3515  * And the last detail in our example is the callback that prints @p val so that
3516  * we can see that the radios are indeed changing its value:
3517  * @until }
3518  *
3519  * The example will look like this:
3520  *
3521  * @image html screenshots/radio_example_01.png
3522  * @image latex screenshots/radio_example_01.epx width=\textwidth
3523  *
3524  * @example radio_example_01.c
3525  */
3526
3527 /**
3528  * @page tutorial_toggle Toggle example
3529  * @dontinclude toggle_example_01.c
3530  *
3531  * In this example we'll create 2 toggle widgets. The first will have an icon
3532  * and the state names will be the default "on"/"off", it will also change the
3533  * value of a variable directly. The second won't have a icon, the state names
3534  * will be "Enabled"/"Disabled", it will  start "Enabled" and it won't set the
3535  * value of a variable.
3536  *
3537  * We start with the usual includes and prototype for callback which will be
3538  * implemented and detailed later on:
3539  * @until _cb2
3540  *
3541  * We then declare a static global variable(the one whose value will be changed
3542  * by the first toggle):
3543  * @until static
3544  *
3545  * We now have to create our window and all that usual stuff:
3546  * @until show(bx)
3547  *
3548  * The creation of a toggle is no more complicated than that of any other
3549  * widget:
3550  * @until add
3551  *
3552  * For our first toggle we don't set the states labels so they will stay the
3553  * default, however we do set a label for the toggle, an icon and the variable
3554  * whose value it should change:
3555  * @until show
3556  *
3557  * We also set the callback that will be called when the toggles value changes:
3558  * @until smart_callback
3559  *
3560  * For our second toggle it important to note that we set the states labels,
3561  * don't set an icon or variable, but set the initial state to
3562  * EINA_TRUE("Enabled"):
3563  * @until show
3564  *
3565  * For the second toggle we will use a different callback:
3566  * @until smart_callback
3567  *
3568  * We then ask the main loop to start:
3569  * @until ELM_MAIN
3570  *
3571  * The callback for our first toggle will look the value of @p val and print it:
3572  * @until }
3573  *
3574  * For our second callback we need to do a little bit more, since the second
3575  * toggle doesn't change the value of a variable we have to ask it what its
3576  * state is:
3577  * @until }
3578  *
3579  * This example will look like this:
3580  *
3581  * @image html screenshots/toggle_example_01.png
3582  * @image latex screenshots/toggle_example_01.eps width=\textwidth
3583  *
3584  * @example toggle_example_01.c
3585  */
3586
3587 /**
3588  * @page tutorial_panel Panel example
3589  * @dontinclude panel_example_01.c
3590  *
3591  * In this example will have 3 panels, one for each possible orientation. Two of
3592  * our panels will start out hidden, the third will start out expanded. For each
3593  * of the panels we will use a label as the content, it's however possible to
3594  * have any widget(including containers) as the content of panels.
3595  *
3596  * We start by doing some setup, code you should be familiar with from other
3597  * examples:
3598  * @until show(bx)
3599  *
3600  * And move right to creating our first panel, for this panel we are going to
3601  * choose the orientation as TOP and toggle it(tell it to hide itself):
3602  * @until pack_end
3603  *
3604  * For the second panel we choose the RIGHT orientation and explicitly set the
3605  * state as hidden:
3606  * @until pack_end
3607  *
3608  * For our third and last panel we won't set the orientation(which means it will
3609  * use the default: LEFT):
3610  * @until pack_end
3611  *
3612  * All that is left is running the main loop:
3613  * @until ELM_MAIN
3614  *
3615  * This example will look like this;
3616  *
3617  * @image html screenshots/panel_example_01.png
3618  * @image latex screenshots/panel_example_01.epx width=\textwidth
3619  * @note The buttons with arrow allow the user to hide/show the panels.
3620  *
3621  * @example panel_example_01.c
3622  */
3623
3624 /**
3625  * @page gengrid_example Gengrid widget example
3626  *
3627  * This application is a thorough exercise on the gengrid widget's
3628  * API. We place an Elementary gengrid widget on a window, with
3629  * various knobs below its viewport, each one acting on it somehow.
3630  *
3631  * The code's relevant part begins at the grid's creation. After
3632  * instantiating it, we set its items sizes, so that we don't end with
3633  * items one finger size wide, only. We're setting them to fat, 150
3634  * pixel wide ones, for this example. We give it some size hints, not
3635  * to be discussed in this context and, than, we register a callback
3636  * on one of its smart events -- the one coming each time an item gets
3637  * doubly clicked. There, we just print the item handle's value.
3638  * @dontinclude gengrid_example.c
3639  * @skip grid = elm_gengrid_add
3640  * @until evas_object_sho
3641  * @dontinclude gengrid_example.c
3642  * @skip item double click callback
3643  * @until }
3644  *
3645  * Before we actually start to deal with the items API, let's show
3646  * some things items will be using throughout all the code. The first
3647  * of them is a struct to be used as item data, for all of them:
3648  * @dontinclude gengrid_example.c
3649  * @skip typedef struct
3650  * @until Item;
3651  *
3652  * That path will be used to index an image, to be swallowed into one
3653  * of the item's icon spots. The imagens themselves are distributed
3654  * with Elementary:
3655  * @dontinclude gengrid_example.c
3656  * @skip static const char *imgs
3657  * @until ;
3658  *
3659  * We also have an (unique) gengrid item class we'll be using for
3660  * items in the example:
3661  * @dontinclude gengrid_example.c
3662  * @skip static Elm_Gengrid_Item_Class
3663  * @until static Elm_Gengrid_Item_Class
3664  * @dontinclude gengrid_example.c
3665  * @skip item_style =
3666  * @until _grid_del
3667  *
3668  * As you see, our items will follow the default theme on gengrid
3669  * items. For the label fetching code, we return a string composed of
3670  * the item's image path:
3671  * @dontinclude gengrid_example.c
3672  * @skip label fetching callback
3673  * @until }
3674  *
3675  * For item icons, we'll be populating the item default theme's two
3676  * icon spots, @c "elm.swallow.icon" and @c "elm.swallow.end". The
3677  * former will receive one of the images in our list (in the form of
3678  * a @ref bg_02_example_page "background"), while the latter will be
3679  * a check widget. Note that we prevent the check to propagate click
3680  * events, so that the user can toggle its state without messing with
3681  * the respective item's selection in the grid:
3682  * @dontinclude gengrid_example.c
3683  * @skip icon fetching callback
3684  * @until return NULL
3685  * @until }
3686  *
3687  * As the default gengrid item's theme does not have parts
3688  * implementing item states, we'll be just returning false for every
3689  * item state:
3690  * @dontinclude gengrid_example.c
3691  * @skip state fetching callback
3692  * @until }
3693  *
3694  * Finally, the deletion callback on gengrid items takes care of
3695  * freeing the item's label string and its data struct:
3696  * @dontinclude gengrid_example.c
3697  * @skip deletion callback
3698  * @until }
3699  *
3700  * Let's move to item insertion/deletion knobs, them. They are four
3701  * buttons, above the grid's viewport, namely
3702  * - "Append" (to append an item to the grid),
3703  * - "Prepend" (to prepend an item to the grid),
3704  * - "Insert before" (to insert an item before the selection, on the
3705  *   grid),
3706  * - "Insert after" (to insert an item after the selection, on the
3707  *   grid),
3708  * - "Clear" (to delete all items in the grid),
3709  * - "Bring in 1st" (to make the 1st item visible, by scrolling),
3710  * - "Show last" (to directly show the last item),
3711  * .
3712  * which are displaced and declared in that order. We're not dealing
3713  * with the buttons' creation code (see @ref button_example_01
3714  * "a button example", for more details on it), but with their @c
3715  * "clicked" registered callbacks.  For all of them, the grid's handle
3716  * is passed as @c data. The ones creating new items use a common
3717  * code, which just gives a new @c Example_Item struct, with @c path
3718  * filled with a random image in our images list:
3719  * @dontinclude gengrid_example.c
3720  * @skip new item with random path
3721  * @until }
3722  *
3723  * Moreover, that ones will set a common function to be issued on the
3724  * selection of the items. There, we print the item handle's value,
3725  * along with the callback function data. The latter will be @c NULL,
3726  * always, because it's what we pass when adding all icons. By using
3727  * elm_gengrid_item_data_get(), we can have the item data back and,
3728  * with that, we're priting the item's path string. Finally, we
3729  * exemplify elm_gengrid_item_pos_get(), printing the item's position
3730  * in the grid:
3731  * @dontinclude gengrid_example.c
3732  * @skip item selection callback
3733  * @until }
3734  *
3735  * The appending button will exercise elm_gengrid_item_append(), simply:
3736  * @dontinclude gengrid_example.c
3737  * @skip append an item
3738  * @until }
3739  *
3740  * The prepending, naturally, is analogous, but exercising
3741  * elm_gengrid_item_prepend(), on its turn. The "Insert before" one
3742  * will expect an item to be selected in the grid, so that it will
3743  * insert a new item just before it:
3744  * @dontinclude gengrid_example.c
3745  * @skip "insert before" callback
3746  * @until }
3747  *
3748  * The "Insert after" is analogous, just using
3749  * elm_gengrid_item_insert_after(), instead. The "Clear" button will,
3750  * as expected, just issue elm_gengrid_clear():
3751  * @dontinclude gengrid_example.c
3752  * @skip delete items
3753  * @until }
3754  *
3755  * The "Bring in 1st" button is there exercise two gengrid functions
3756  * -- elm_gengrid_first_item_get() and elm_gengrid_item_bring_in().
3757  * With the former, we get a handle to the first item and, with the
3758  * latter, you'll see that the widget animatedly scrolls its view
3759  * until we can see that item:
3760  * @dontinclude gengrid_example.c
3761  * @skip bring in 1st item
3762  * @until }
3763  *
3764  * The "Show last", in its turn, will use elm_gengrid_last_item_get()
3765  * and elm_gengrid_item_show(). The latter differs from
3766  * elm_gengrid_item_bring_in() in that it immediately replaces the
3767  * contents of the grid's viewport with the region containing the item
3768  * in question:
3769  * @dontinclude gengrid_example.c
3770  * @skip show last item
3771  * @until }
3772  *
3773  * To change the grid's cell (items) size, we've placed a spinner,
3774  * which has the following @c "changed" smart callback:
3775  * @dontinclude gengrid_example.c
3776  * @skip change items' size
3777  * @until }
3778  *
3779  * Experiment with it and see how the items are affected. The "Disable
3780  * item" button will, as the name says, disable the currently selected
3781  * item:
3782  * @dontinclude gengrid_example.c
3783  * @skip disable selected item
3784  * @until }
3785  * Note that we also make use of elm_gengrid_item_selected_set(),
3786  * there, thus making the item unselected before we actually disable
3787  * it.
3788  *
3789  * To toggle between horizontal and vertical layouting modes on the
3790  * grid, use the "Horizontal mode" check, which will call the
3791  * respective API function on the grid:
3792  * @dontinclude gengrid_example.c
3793  * @skip change layouting mode
3794  * @until }
3795  *
3796  * If you toggle the check right after that one, "Always select",
3797  * you'll notice all subsequent clicks on the @b same grid item will
3798  * still issue the selection callback on it, what is different from
3799  * when it's not checked. This is the
3800  * elm_gengrid_always_select_mode_set() behavior:
3801  * @dontinclude gengrid_example.c
3802  * @skip "always select" callback
3803  * @until }
3804  *
3805  * One more check follows, "Bouncing", which will turn on/off the
3806  * bouncing animations on the grid, when one scrolls past its
3807  * borders. Experiment with scrolling the grid to get the idea, having
3808  * it turned on and off:
3809  * @dontinclude gengrid_example.c
3810  * @skip "bouncing mode" callback
3811  * @until }
3812  *
3813  * The next two checks will affect items selection on the grid. The
3814  * first, "Multi-selection", will make it possible to select more the
3815  * one item on the grid. Because it wouldn't make sense to fetch for
3816  * an unique selected item on this case, we also disable two of the
3817  * buttons, which insert items relatively, if multi-selection is on:
3818  * @dontinclude gengrid_example.c
3819  * @skip multi-selection callback
3820  * @until }
3821  *
3822  * Note that we also @b unselect all items in the grid, when returning
3823  * from multi-selection mode, making use of
3824  * elm_gengrid_item_selected_set().
3825  *
3826  * The second check acting on selection, "No selection", is just what
3827  * its name depicts -- no selection will be allowed anymore, on the
3828  * grid, while it's on. Check it out for yourself, interacting with
3829  * the program:
3830  * @dontinclude gengrid_example.c
3831  * @skip no selection callback
3832  * @until }
3833  *
3834  * We have, finally, one more line of knobs, now sliders, to change
3835  * the grids behavior. The two first will change the horizontal @b
3836  * alignment of the whole actual grid of items within the gengrid's
3837  * viewport:
3838  * @dontinclude gengrid_example.c
3839  * @skip items grid horizontal alignment change
3840  * @until }
3841  *
3842  * Naturally, the vertical counterpart just issues
3843  * elm_gengrid_align_set() changing the second alignment component,
3844  * instead.
3845  *
3846  * The last slider will change the grid's <b>page size</b>, relative
3847  * to its own one. Try to change those values and, one manner of
3848  * observing the paging behavior, is to scroll softly and release the
3849  * mouse button, with different page sizes, at different grid
3850  * positions, while having lots of items in it -- you'll see it
3851  * snapping to page boundaries differenty, for each configuration:
3852  * @dontinclude gengrid_example.c
3853  * @skip page relative size change
3854  * @until }
3855  *
3856  * This is how the example program's window looks like:
3857  * @image html screenshots/gengrid_example.png
3858  * @image latex screenshots/gengrid_example.eps width=\textwidth
3859  *
3860  * Note that it starts with three items which we included at will:
3861  * @dontinclude gengrid_example.c
3862  * @skip _clicked(grid,
3863  * @until _clicked(grid,
3864  * @until _clicked(grid,
3865  * @until _clicked(grid,
3866  *
3867  * See the full @ref gengrid_example_c "source code" for
3868  * this example.
3869  *
3870  * @example gengrid_example.c
3871  */
3872 /**
3873  * @page entry_example_01 Entry - Example of simple editing
3874  *
3875  * As a general overview of @ref Entry we are going to write an, albeit simple,
3876  * functional editor. Although intended to show how elm_entry works, this
3877  * example also makes extensive use of several other widgets. The full code
3878  * can be found in @ref entry_example.c "entry_example.c" and in the following
3879  * lines we'll go through the parts especific to the @ref Entry widget.
3880  *
3881  * The program itself is a simple editor, with a file already set to it, that
3882  * can be set to autosave or not and allows insertion of emoticons and some
3883  * formatted text. As of this writing, the capabilities of format edition in
3884  * the entry are very limited, so a lot of manual work is required to change
3885  * the current text.
3886  *
3887  * In any case, the program allows some changes by using the buttons on the
3888  * top of the window and returning focus back to the main entry afterwards.
3889  *
3890  * @image html screenshots/entry_example.png
3891  * @image latex screenshots/entry_example.eps width=\textwidth
3892  *
3893  * We'll begin by showing a few structures used throught the program. First,
3894  * the application owns data that holds the main window and the main entry
3895  * where the editting happens. Then, an auxiliar structure we'll use later
3896  * when inserting icons in our text.
3897  * @dontinclude entry_example.c
3898  * @skip typedef
3899  * @until App_Inwin_Data
3900  *
3901  * A little convenience function will insert whatever text we need in the
3902  * buffer at the current cursor's position and set focus back to this entry.
3903  * This is done mostly because clicking on any button will make them steal
3904  * focus, which makes writing text more cumbersome.
3905  * @skip static void
3906  * @until }
3907  *
3908  * One of the buttons on the top will trigger an @ref Inwin to open and show
3909  * us several icons we can insert into the text. We'll jump over most of these
3910  * functions, but when all the options are chosen, we insert the special
3911  * markup text that will show the chosen icon in place.
3912  * @skip edje_file_collection_list_free(emos)
3913  * @skip static void
3914  * @until evas_object_del
3915  * @until }
3916  *
3917  * As can be seen in that function, the program lets us add icons to our entry
3918  * using all the possible configurations for them. That should help to
3919  * clarify how the different combinations work out by actually seeing them
3920  * in action.
3921  *
3922  * The same popup window has a page to set the settings of the chosen icon,
3923  * that is, the size and how the item will be placed within the line.
3924  *
3925  * The size is done with two entries, limitted to accept numbers and a fixed
3926  * size of characters. Changing the value in this entries will update the icon
3927  * size in our struct as seen in the next two callbacks.
3928  * @skip static void
3929  * @until }
3930  * @until }
3931  *
3932  * The rest of the options are handled with radio buttons, since only one type
3933  * of size can be used (@c size, @c absize or @c relsize) and for the vertical
3934  * sizing it needs to choose between @c ascent and @c full. Depending on which
3935  * is chosen, the @c item tag is formed accordingly as seen before.
3936  * @skip static Evas_Object
3937  * @until evas_object_show(rvascent)
3938  *
3939  * The first of our entries is here. There's something worth mentioning about
3940  * the way we'll create this one. Normally, any entry regardless of whether is
3941  * single line or not, will be set to scrollable, but in this case, since we
3942  * are limitting how many characters can fit in them and we know we don't need
3943  * scrolling, we are not setting this flag. This makes the entry have virtually
3944  * no appearance on screen, other than its text. This is because an entry is
3945  * just that, a box that holds text, and in order to have some frame around it
3946  * or a background color, another widget needs to provide this. When an entry
3947  * is scrollable, the same scroller used internally does this.
3948  * We are using @ref Frame "frames" here to provide some decoration around,
3949  * then creating our entries, set them to single line, add our two filters and
3950  * the callback for when their value change.
3951  * @until _height_changed_cb
3952  *
3953  * This function ends with the button that will finally call the item
3954  * into our editting string.
3955  * @until }
3956  *
3957  * Then we get to the format edition. Here we can add the @c bold and
3958  * @c emphasis tags to parts of our text. There's a lot of manual work to
3959  * know what to do here, since we are not implementing an entire state manager
3960  * and the entry itself doesn't, yet, support all the needed capabilities to
3961  * make this simpler. We begin by getting the format we are using in our
3962  * function from the button pressed.
3963  * @skip aid->pager = pager;
3964  * @until sizeof(fmt_close)
3965  *
3966  * Next we need to find out if we need to insert an opening or a closing tag.
3967  * For this, we store the current cursor position and create a selection
3968  * from this point until the beginning of our text, and then get the selected
3969  * text to look for any existing format tags in it. This is currently the only
3970  * way in which we can find out what formats is being used in the entry.
3971  * @until }
3972  * @until }
3973  *
3974  * Once we know what tag to insert, we need a second check in the case it was
3975  * a closing tag. This is because any other closing tag that comes after would
3976  * be left dangling alone, so we need to remove it to keep the text consistent.
3977  * @until }
3978  * @until }
3979  * Finally, we clear our fake selections and return the cursor back to the
3980  * position it had at first, since there is where we want to insert our format.
3981  * @until cursor_pos_set
3982  *
3983  * And finish by calling our convenience function from before, to insert the
3984  * text at the current cursor and give focus back to the entry.
3985  * @until }
3986  *
3987  * A checkbox on the top of our program tells us if the text we are editing
3988  * will autosave or not. In it's @c "changed" callback we get the value from
3989  * the checkbox and call the elm_entry_autosave_set() function with it. If
3990  * autosave is set, we also call elm_entry_file_save(). This is so the internal
3991  * timer used to periodically store to disk our changes is started.
3992  * @skip static void
3993  * @until }
3994  *
3995  * Two more functions to show some cursor playing. Whenever we double click
3996  * anywhere on our entry, we'll find what word is the cursor placed at and
3997  * select it. Likewise, for triple clicking, we select the entire line.
3998  * @skip static void
3999  * @until _edit_tplclick_cb
4000  * @until }
4001  *
4002  * And finally, the main window of the program contains the entry where we
4003  * do all the edition and some helping widgets to change format, add icons
4004  * or change the autosave flag.
4005  * @skip elm_exit
4006  * @skip int
4007  * @until _image_insert_cb
4008  *
4009  * And the main entry of the program. Set to scroll, by default we disable
4010  * autosave and we'll begin with a file set to it because no file selector
4011  * is being used here. The file is loaded with #ELM_TEXT_FORMAT_MARKUP_UTF8
4012  * so that any format contained in it is interpreted, otherwise the entry
4013  * would load it as just text, escaping any tags found and no format or icons
4014  * would be shown. Then we connect to the double and triple click signals
4015  * and set focus on the entry so we can start typing right away.
4016  * @until ELM_MAIN
4017  *
4018  * @example entry_example.c
4019  */
4020
4021 /**
4022  * @page genlist_example_01 Genlist - basic usage
4023  *
4024  * This example creates a simple genlist with a small number of items and
4025  * a callback that is called whenever an item is selected. All the properties of
4026  * this genlist are the default ones. The full code for this example can be seen
4027  * at @ref genlist_example_01_c.
4028  *
4029  * For the simplest list that you plan to create, it's necessary to define some
4030  * of the basic functions that are used for creating each list item, and
4031  * associating them with the "item class" for that list. The item class is just
4032  * an struct that contains pointers to the specific list item functions that are
4033  * common to all the items of the list.
4034  *
4035  * Let's show it by example. Our item class is declared globally and static as
4036  * it will be the only item class that we need (we are just creating one list):
4037  *
4038  * @dontinclude genlist_example_01.c
4039  * @skip static Elm_Genlist
4040  * @until static Elm_Genlist
4041  *
4042  * This item class will be used for every item that we create. The only
4043  * functions that we are going to set are @c label_get and @c icon_get. As the
4044  * name suggests, they are used by the genlist to generate the label for the
4045  * respective item, and to generate icon(s) to it too. Both the label and icon
4046  * get functions can be called more than once for each item, with different @c
4047  * part parameters, which represent where in the theme of the item that label or
4048  * icon is going to be set.
4049  *
4050  * The default theme for the genlist contains only one area for label, and two
4051  * areas for icon ("elm.swallow.icon" and "elm.swallow.end"). Since we just want
4052  * to set the first icon (that will be at the left side of the label), we
4053  * compare the part name given with "elm.swallow.icon". Notice that the
4054  * @c label_get function must return a strduped string, that will be freed later
4055  * automatically by the list. Here's the code for @c label_get and @c icon_get:
4056  *
4057  * @until static void
4058  *
4059  * We will also provide a function that will be called whenever an item is
4060  * selected in the genlist. However, this function is not part of the item
4061  * class, it will be passed for each item being added to the genlist explicitly.
4062  * Notice the similarity of the function signature with those used by @c
4063  * evas_object_smart_callback_add:
4064  *
4065  * @until }
4066  *
4067  * Now let's show the code used for really creating the list. Skipping
4068  * boilerplate code used for creating a window and background, the first piece
4069  * of code specific to our genlist example is setting the pointer functions of
4070  * the item class to our above defined functions:
4071  *
4072  * @skip _itc
4073  * @until func.del
4074  *
4075  * Notice that we also choose to use the "default" style for our genlist items.
4076  * Another interesting point is that @c state_get and @c del are set to @c NULL,
4077  * since we don't need these functions now. @c del doesn't need to be used
4078  * because we don't add any data that must be freed to our items, and @c
4079  * state_get is also not used since all of our items are the same and don't need
4080  * to have different states to be used for each item. Finally we create our
4081  * list:
4082  *
4083  * @until genlist_add
4084  *
4085  * Now we append several items to the list, and for all of them we need to give
4086  * the list pointer, a pointer to the item class, the data that will be used
4087  * with that item, a pointer to the parent of this item if it is in a group type
4088  * list (this is not the case so we pass @c NULL), possible flags for this item,
4089  * the callback for when the item is selected, and the data pointer that will be
4090  * given to the selected callback.
4091  *
4092  * @until }
4093  *
4094  * The rest of the code is also common to all the other examples, so it will be
4095  * omitted here (look at the full source code link above if you need it).
4096  *
4097  * You can try to play with this example, and see the selected callback being
4098  * called whenever an item is clicked. It also already has some features enabled
4099  * by default, like vertical bounce animation when reaching the end of the list,
4100  * automatically visible/invisible scrollbar, etc. Look at the @ref
4101  * genlist_example_02 to see an example of setting these properties to the list.
4102  *
4103  * The current example will look like this when running:
4104  *
4105  * @image html screenshots/genlist_example_01.png
4106  * @image latex screenshots/genlistexample_01.eps width=\textwidth
4107  */
4108
4109 /**
4110  * @page genlist_example_02 Genlist - list setup functions
4111  *
4112  * This example is very similar to the @ref genlist_example_01, but it fetch
4113  * most of the properties of the genlist and displays them on startup (thus
4114  * getting the default value for them) and then set them to some other values,
4115  * to show how to use that API. The full source code is at @ref
4116  * genlist_example_02_c.
4117  *
4118  * Considering that the base code for instantiating a genlist was already
4119  * described in the previous example, we are going to focus on the new code.
4120  *
4121  * Just a small difference for the @c _item_label_get function, we are going to
4122  * store the time that this function was called. This is the "realized" time,
4123  * the time when the visual representation of this item was created. This is the
4124  * code for the @c label_get function:
4125  *
4126  * @dontinclude genlist_example_02.c
4127  * @skip static char
4128  * @until return strdup
4129  *
4130  * Now let's go to the list creation and setup. First, just after creating the
4131  * list, we get most of the default properties from it, and print them on the
4132  * console:
4133  *
4134  * @skip genlist_add
4135  * @until printf("\n")
4136  *
4137  * We are going to change some of the properties of our list.
4138  *
4139  * There's no need to call the selected callback at every click, just when the
4140  * selected item changes, thus we call elm_genlist_always_select_mode_set() with
4141  * false.
4142  *
4143  * For this list we don't want bounce animations at all, so we set both the
4144  * horizontal bounce and the vertical bounce to false with
4145  * elm_genlist_bounce_set().
4146  *
4147  * We also want our list to compress items if they are wider than the list
4148  * width (thus we call elm_genlist_compress_mode_set().
4149  *
4150  * The items have different width, so they are not homogeneous:
4151  * elm_genlist_homogeneous_set() is set to false.
4152  *
4153  * Since the compress mode is active, the call to
4154  * elm_genlist_horizontal_mode_set() doesn't make difference, but the current
4155  * option would make the list to have at least the width of the largest item.
4156  *
4157  * This list will support multiple selection, so we call
4158  * elm_genlist_multi_select_set() on it.
4159  *
4160  * The option elm_genlist_height_for_width_mode_set() would allow text block to
4161  * wrap lines if the Edje part is configured with "text.min: 0 1", for example.
4162  * But since we are compressing the elements to the width of the list, this
4163  * option wouldn't take any effect.
4164  *
4165  * We want the vertical scrollbar to be always displayed, and the orizontal one
4166  * to never be displayed, and set this with elm_genlist_scroller_policy_set().
4167  *
4168  * The timeout to consider a longpress is set to half of a second with
4169  * elm_genlist_longpress_timeout_set().
4170  *
4171  * We also change the block count to a smaller value, but that should have not
4172  * impact on performance since the number of visible items is too small. We just
4173  * increase the granularity of the block count (setting it to have at most 4
4174  * items).
4175  *
4176  * @until block_count_set
4177  *
4178  * Now let's add elements to the list:
4179  *
4180  * @until item_append
4181  * @until }
4182  *
4183  * It's exactly the same as the previous example. The difference is on the
4184  * behavior of the list, if you try to scroll, select items and so.
4185  *
4186  * In this example we also need two buttons. One of them, when clicked, will
4187  * display several status info about the current selection, the "realized"
4188  * items, the item in the middle of the screen, and the current mode and active
4189  * item of that mode for the genlist.
4190  *
4191  * The other button will ask the genlist to "realize" again the items already
4192  * "realized", so their respective label_get and icon_get functions will be
4193  * called again.
4194  *
4195  * These are the callbacks for both of these buttons:
4196  *
4197  * @dontinclude genlist_example_02.c
4198  * @skip item_sel_cb
4199  * @skip static
4200  * @until }
4201  * @until }
4202  *
4203  * Try to scroll, select some items and click on the "Show status" button.
4204  * You'll notice that not all items of the list are "realized", thus consuming
4205  * just a small amount of memory. The selected items are listed in the order
4206  * that they were selected, and the current selected item printed using
4207  * elm_genlist_selected_item_get() is the first selected item of the multiple
4208  * selection.
4209  *
4210  * Now resize the window so that you can see the "realized time" of some items.
4211  * This is the time of when the label_get function was called. If you click on
4212  * the "Realize" button, all the already realized items will be rebuilt, so the
4213  * time will be updated for all of them.
4214  *
4215  * The current example will look like this when running:
4216  *
4217  * @image html screenshots/genlist_example_02.png
4218  * @image latex screenshots/genlistexample_02.eps width=\textwidth
4219  */
4220
4221 /**
4222  * @page genlist_example_04 Genlist - items manipulation
4223  *
4224  * This example is also similar ot the @ref genlist_example_01, but it
4225  * demonstrates most of the item manipulation functions. See the full source
4226  * code at @ref genlist_example_04_c.
4227  *
4228  * In this example, we also will use the concept of creating groups of items in
4229  * the genlist. Each group of items is composed by a parent item (which will be
4230  * the index of the group) and several children of this item. Thus, for the
4231  * children, we declare a normal item class. But we also are going to declare a
4232  * different item class for the group index (which in practice is another type
4233  * of item in the genlist):
4234  *
4235  * @dontinclude genlist_example_04.c
4236  * @skip _item_sel_cb
4237  * @skip static
4238  * @until }
4239  * @until }
4240  *
4241  * We will add buttons to the window, where each button provides one
4242  * functionality of the genlist item API. Each button will have a callback
4243  * attached, that will really execute this functionality. An example of these
4244  * callbacks is the next one, for the elm_genlist_item_insert_after() function:
4245  *
4246  * @skip insert_before_cb
4247  * @skip static
4248  * @until }
4249  *
4250  * If you want ot see the other button functions, look at the full source code
4251  * link above.
4252  *
4253  * Each button will be created with a function that already creates the button,
4254  * add it to an elementary box, and attach the specified callback. This is the
4255  * function that does it:
4256  *
4257  * @skip genlist_item_update
4258  * @skip static
4259  * @until }
4260  *
4261  * In our @c elm_main function, besides the code for setting up the window, box
4262  * and background, we also initialize our two item classes:
4263  *
4264  * @skip _itc.item_style
4265  * @until _itc_group.func.del
4266  *
4267  * This example uses a different style for the items, the @a double_label, which
4268  * provides a text field for the item text, and another text field for a subtext.
4269  *
4270  * For the group index we use the @a group_index style, which provides a
4271  * different appearance, helping to identify the end of a group and beginning of
4272  * another one.
4273  *
4274  * Now, after the code for creating the list, setting up the box and other
4275  * stuff, let's add the buttons with their respective callbacks:
4276  *
4277  * @skip _button_add
4278  * @until bt_top_show
4279  *
4280  * The main code for adding items to the list is a bit more complex than the one
4281  * from the previous examples. We check if each item is multiple of 7, and if
4282  * so, they are group indexes (thus each group has 6 elements by default, in
4283  * this example):
4284  *
4285  * @skip for
4286  * @until }
4287  * @until }
4288  *
4289  * Then we also check for specific items, and add callbacks to them on the
4290  * respective buttons, so we can show, bring in, etc.:
4291  *
4292  * @until }
4293  * @until }
4294  *
4295  * Once you understand the code from the @ref genlist_example_01, it should be
4296  * easy to understand this one too. Look at the full code, and also try to play
4297  * a bit with the buttons, adding items, bringing them to the viewport, and so.
4298  *
4299  * The example will look like this when running:
4300  *
4301  * @image html screenshots/genlist_example_04.png
4302  * @image latex screenshots/genlistexample_04.eps width=\textwidth
4303  */
4304
4305 /**
4306  * @page genlist_example_05 Genlist - working with subitems
4307  *
4308  * This is probably the most complex example of elementary @ref Genlist. We
4309  * create a tree of items, using the subitems properties of the items, and keep
4310  * it in memory to be able to expand/hide subitems of an item. The full source
4311  * code can be found at @ref genlist_example_05_c
4312  *
4313  * The main point is the way that Genlist manages subitems. Clicking on an
4314  * item's button to expand it won't really show its children. It will only
4315  * generate the "expand,request" signal, and the expansion must be done
4316  * manually.
4317  *
4318  * In this example we want to be able to add items as subitems of another item.
4319  * If an item has any child, it must be displayed using a parent class,
4320  * otherwise it will use the normal item class.
4321  *
4322  * It will be possible to delete items too. Once a tree is constructed (with
4323  * subitems of subitems), and the user clicks on the first parent (root of the
4324  * tree), the entire subtree must be hidden. However, just calling
4325  * elm_genlist_item_expanded_set(item, EINA_FALSE) won't hide them. The only
4326  * thing that happens is that the parent item will change its appearance to
4327  * represent that it's contracted. And the signal "contracted" will be emitted
4328  * from the genlist. Thus, we must call elm_genlist_item_subitems_clear() to
4329  * delete all its subitems, but still keep a way to recreate them when expanding
4330  * the parent again. That's why we are going to keep a node struct for each
4331  * item, that will be the data of the item, with the following information:
4332  *
4333  * @dontinclude genlist_example_05.c
4334  * @skip typedef
4335  * @until }
4336  *
4337  * This @c Node_Data contains the value for the item, a number indicating its
4338  * level under the tree, a list of children (to be able to expand it later) and
4339  * a boolean indicating if it's a favorite item or not.
4340  *
4341  * We use 3 different item classes in this example:
4342  *
4343  * One for items that don't have children:
4344  *
4345  * @skip nitems
4346  * @skip static
4347  * @until }
4348  * @until }
4349  *
4350  * One for items that have children:
4351  *
4352  * @skip item_sel
4353  * @skip static
4354  * @until }
4355  * @until }
4356  *
4357  * And one for items that were favorited:
4358  *
4359  * @skip static
4360  * @until }
4361  * @until }
4362  *
4363  * The favorite item class is there just to demonstrate the
4364  * elm_genlist_item_item_class_update() function in action. It would be much
4365  * simpler to implement the favorite behavior by just changing the icon inside
4366  * the icon_get functions when the @c favorite boolean is activated.
4367  *
4368  * Now we are going to declare the callbacks for the buttons that add, delete
4369  * and change items.
4370  *
4371  * First, a button for appending items to the list:
4372  *
4373  * @until item_append
4374  * @until }
4375  *
4376  * If an item is selected, a new item will be appended to the same level of that
4377  * item, but using the selected item's parent as its parent too. If no item is
4378  * selected, the new item will be appended to the root of the tree.
4379  *
4380  * Then the callback for marking an item as favorite:
4381  *
4382  * @until elm_genlist_item_update
4383  * @until }
4384  *
4385  * This callback is very simple, it just changes the item class of the selected
4386  * item for the "favorite" one, or go back to the "item" or "parent" class
4387  * depending on that item having children or not.
4388  *
4389  * Now, the most complex operation (adding a child to an item):
4390  *
4391  * @until elm_genlist_item_update
4392  * @until }
4393  *
4394  * This function gets the data of the selected item, create a new data (for the
4395  * item being added), and appends it to the children list of the selected item.
4396  *
4397  * Then we must check if the selected item (let's call it @c item1 now) to which
4398  * the new item (called @c item2 from now on) was already a parent item too
4399  * (using the parent item class) or just a normal item (using the default item
4400  * class). In the first case, we just have to append the item to the end of the
4401  * @c item1 children list.
4402  *
4403  * However, if the @c item1 didn't have any child previously, we have to change
4404  * it to a parent item now. It would be easy to just change its item class to
4405  * the parent type, but there's no way to change the item flags and make it be
4406  * of the type #ELM_GENLIST_ITEM_SUBITEMS. Thus, we have to delete it and create
4407  * a new item, and add this new item to the same position that the deleted one
4408  * was. That's the reason of the checks inside the bigger @c if.
4409  *
4410  * After adding the item to the newly converted parent, we set it to not
4411  * expanded (since we don't want to show the added item immediately) and select
4412  * it again, since the original item was deleted and no item is selected at the
4413  * moment.
4414  *
4415  * Finally, let's show the callback for deleting items:
4416  *
4417  * @until elm_genlist_item_update
4418  * @until }
4419  *
4420  * Since we have an iternal list representing each element of our tree, once we
4421  * delete an item we have to go deleting each child of that item, in our
4422  * internal list. That's why we have the function @c _clear_list, which
4423  * recursively goes freeing all the item data.
4424  *
4425  * This is necessary because only when we really want to delete the item is when
4426  * we need to delete the item data. When we are just contracting the item, we
4427  * need to hide the children by deleting them, but keeping the item data.
4428  *
4429  * Now there are two callbacks that will be called whenever the user clicks on
4430  * the expand/contract icon of the item. They will just request to items to be
4431  * contracted or expanded:
4432  *
4433  * @until elm_genlist_item_expanded_set(
4434  * @until elm_genlist_item_expanded_set(
4435  * @until }
4436  *
4437  * When the elm_genlist_item_expanded_set() function is called with @c
4438  * EINA_TRUE, the @c _expanded_cb will be called. And when this happens, the
4439  * subtree of that item must be recreated again. This is done using the internal
4440  * list stored as item data for each item. The function code follows:
4441  *
4442  * @until }
4443  *
4444  * Each appended item is set to contracted, so we don't have to deal with
4445  * checking if the item was contracted or expanded before its parent being
4446  * contracted. It could be easily implemented, though, by adding a flag expanded
4447  * inside the item data.
4448  *
4449  * Now, the @c _contracted_cb, which is much simpler:
4450  *
4451  * @until }
4452  *
4453  * We just have to call elm_genlist_item_subitems_clear(), that will take care
4454  * of deleting every item, and keep the item data still stored (since we don't
4455  * have any del function set on any of our item classes).
4456  *
4457  * Finally, the code inside @c elm_main is very similar to the other examples:
4458  *
4459  * @skip elm_main
4460  * @until ELM_MAIN
4461  *
4462  * The example will look like this when running:
4463  *
4464  * @image html screenshots/genlist_example_05.png
4465  * @image latex screenshots/genlistexample_05.eps width=\textwidth
4466  */
4467
4468 /**
4469  * @page progressbar_example Progress bar widget example
4470  *
4471  * This application is a thorough example of the progress bar widget,
4472  * consisting of a window with varios progress bars, each with a given
4473  * look/style one can give to those widgets. With two auxiliary
4474  * buttons, one can start or stop a timer which will fill in the bars
4475  * in synchrony, simulating an underlying task being completed.
4476  *
4477  * We create @b seven progress bars, being three of them horizontal,
4478  * three vertical and a final one under the "wheel" alternate style.
4479  *
4480  * For the first one, we add a progress bar on total pristine state,
4481  * with no other call than the elm_progressbar_add() one:
4482  * @dontinclude progressbar_example.c
4483  * @skip pb with no label
4484  * @until pb1
4485  * See, than, that the defaults of a progress bar are:
4486  * - no primary label shown,
4487  * - unit label set to @c "%.0f %%",
4488  * - no icon set
4489  *
4490  * The second progress bar is given a primary label, <c>"Infinite
4491  * bounce"</c>, and, besides, it's set to @b pulse. See how, after one
4492  * starts the progress timer, with the "Start" button, it animates
4493  * differently than the previous one. It won't account for the
4494  * progress, itself, and just dumbly animate a small bar within its
4495  * bar region.
4496  * @dontinclude progressbar_example.c
4497  * @skip pb with label
4498  * @until pb2
4499  *
4500  * Next, comes a progress bar with an @b icon, a primary label and a
4501  * @b custom unit label set. It's also made to grow its bar in an
4502  * @b inverted manner, so check that out during the timer's progression:
4503  * @dontinclude progressbar_example.c
4504  * @skip ic1 =
4505  * @until pb3
4506  * Another important thing in this one is the call to
4507  * elm_progressbar_span_size_set() -- this is how we forcefully set a
4508  * minimum horizontal size to our whole window! We're not resizing it
4509  * manually, as you can see in the @ref progressbar_example_c
4510  * "complete code".
4511  *
4512  * The next three progress bars are just variants on the ones already
4513  * shown, but now all being @b vertical. Another time we use one of
4514  * than to give the window a minimum vertical size, with
4515  * elm_progressbar_span_size_set().  To demonstrate this trick once
4516  * more, the fifth one, which is also set to pulse, has a smaller
4517  * hardcoded span size:
4518  * @dontinclude progressbar_example.c
4519  * @skip vertical pb, with pulse
4520  * @until pb5
4521  *
4522  * We end the widget demonstration by showing a progress bar with the
4523  * special @b "wheel" progress bar style. One does @b not need to set
4524  * it to pulse, with elm_progressbar_pulse_set(), explicitly, because
4525  * its theme does not take it in account:
4526  * @dontinclude progressbar_example.c
4527  * @skip "wheel"
4528  * @until pb7
4529  *
4530  * The two buttons exercising the bars, the facto, follow:
4531  * @dontinclude progressbar_example.c
4532  * @skip elm_button_add
4533  * @until evas_object_show(bt)
4534  * @until evas_object_show(bt)
4535  *
4536  * The first of the callbacks will, for the progress bars set to
4537  * pulse, start the pulsing animation at that time. For the others, a
4538  * timer callback will take care of updating the values:
4539  * @dontinclude progressbar_example.c
4540  * @skip static Eina_Bool
4541  * @until }
4542  * @until }
4543  * @until }
4544  *
4545  * Finally, the callback to stop the progress timer will stop the
4546  * pulsing on the pulsing progress bars and, for the others, to delete
4547  * the timer which was acting on their values:
4548  * @dontinclude progressbar_example.c
4549  * @skip end of show
4550  * @until }
4551  * @until }
4552  *
4553  * This is how the example program's window looks like:
4554  * @image html screenshots/progressbar_example.png
4555  * @image latex screenshots/progressbar_example.eps width=\textwidth
4556  *
4557  * See the full @ref progressbar_example_c "source code" for
4558  * this example.
4559  *
4560  * @example progressbar_example.c
4561  */
4562
4563 /**
4564  * @page tutorial_notify Notify example
4565  * @dontinclude notify_example_01.c
4566  *
4567  * In this example we will have 3 notifys in 3 different positions. The first of
4568  * which will dissapear after 5 seconds or when a click outside it occurs, the
4569  * second and third will not dissapear and differ from each other only in
4570  * position.
4571  *
4572  * We start our example with the usual stuff you've seen in other examples:
4573  * @until show(bx)
4574  *
4575  * We now create a label to use as the content of our first notify:
4576  * @until show
4577  *
4578  * Having the label we move to creating our notify, telling it to block events,
4579  * setting its timeout(to autohide it):
4580  * @until pack_end
4581  *
4582  * To have the notify dissapear when a click outside its area occur we have to
4583  * listen to its "block,clicked" signal:
4584  * @until smart_callback
4585  *
4586  * Our callback will look like this:
4587  * @skip static
4588  * @until }
4589  * @dontinclude notify_example_01.c
4590  *
4591  * Next we create another label and another notify. Note, however, that this
4592  * time we don't set a timeout and don't have it block events. What we do is set
4593  * the orient so that this notify will appear in the bottom of its parent:
4594  * @skip smart_callback
4595  * @skip content
4596  * @until pack_end
4597  *
4598  * For our third notify the only change is the orient which is now center:
4599  * @until pack_end
4600  *
4601  * Now we tell the main loop to run:
4602  * @until ELM_MAIN
4603  *
4604  * Our example will initially look like this:
4605  *
4606  * @image html screenshots/notify_example_01.png
4607  * @image latex screenshots/notify_example_01.eps width=\textwidth
4608  *
4609  * Once the first notify is hidden:
4610  *
4611  * @image html screenshots/notify_example_01_a.png
4612  * @image latex screenshots/notify_example_01_a.eps width=\textwidth
4613  *
4614  * @example notify_example_01.c
4615  */
4616
4617 /**
4618  * @page tutorial_frame Frame example
4619  * @dontinclude frame_example_01.c
4620  *
4621  * In this example we are going to create 4 Frames with different styles and
4622  * add a rectangle of different color in each.
4623  *
4624  * We start we the usual setup code:
4625  * @until show(bg)
4626  *
4627  * And then create one rectangle:
4628  * @until show
4629  *
4630  * To add it in our first frame, which since it doesn't have it's style
4631  * specifically set uses the default style:
4632  * @until show
4633  *
4634  * And then create another rectangle:
4635  * @until show
4636  *
4637  * To add it in our second frame, which uses the "pad_small" style, note that
4638  * even tough we are setting a text for this frame it won't be show, only the
4639  * default style shows the Frame's title:
4640  * @until show
4641  * @note The "pad_small", "pad_medium", "pad_large" and "pad_huge" styles are
4642  * very similar, their only difference is the size of the empty area around
4643  * the content of the frame.
4644  *
4645  * And then create yet another rectangle:
4646  * @until show
4647  *
4648  * To add it in our third frame, which uses the "outdent_top" style, note
4649  * that even tough we are setting a text for this frame it won't be show,
4650  * only the default style shows the Frame's title:
4651  * @until show
4652  *
4653  * And then create one last rectangle:
4654  * @until show
4655  *
4656  * To add it in our fourth and final frame, which uses the "outdent_bottom"
4657  * style, note that even tough we are setting a text for this frame it won't
4658  * be show, only the default style shows the Frame's title:
4659  * @until show
4660  *
4661  * And now we are left with just some more setup code:
4662  * @until ELM_MAIN()
4663  *
4664  * Our example will look like this:
4665  *
4666  * @image html screenshots/frame_example_01.png
4667  * @image latex screenshots/frame_example_01.eps width=\textwidth
4668  *
4669  * @example frame_example_01.c
4670  */
4671
4672 /**
4673  * @page tutorial_anchorblock_example Anchorblock/Anchorview example
4674  * This example will show both Anchorblock and @ref Anchorview,
4675  * since both are very similar and it's easier to show them once and side
4676  * by side, so the difference is more clear.
4677  *
4678  * We'll show the relevant snippets of the code here, but the full example
4679  * can be found here... sorry, @ref anchorblock_example_01.c "here".
4680  *
4681  * As for the actual example, it's just a simple window with an anchorblock
4682  * and an anchorview, both containing the same text. After including
4683  * Elementary.h and declaring some functions we'll need, we jump to our
4684  * elm_main (see ELM_MAIN) and create our window.
4685  * @dontinclude anchorblock_example_01.c
4686  * @skip int
4687  * @until const char
4688  * @until ;
4689  *
4690  * With the needed variables declared, we'll create the window and a box to
4691  * hold our widgets, but we don't need to go through that here.
4692  *
4693  * In order to make clear where the anchorblock ends and the anchorview
4694  * begins, they'll be each inside a @ref Frame. After creating the frame,
4695  * the anchorblock follows.
4696  * @skip elm_frame_add
4697  * @until elm_frame_content_set
4698  *
4699  * Nothing out of the ordinary there. What's worth mentioning is the call
4700  * to elm_anchorblock_hover_parent_set(). We are telling our widget that
4701  * when an anchor is clicked, the hover for the popup will cover the entire
4702  * window. This affects the area that will be obscured by the hover and
4703  * where clicking will dismiss it, as well as the calculations it does to
4704  * inform the best locations where to insert the popups content.
4705  * Other than that, the code is pretty standard. We also need to set our
4706  * callback for when an anchor is clicked, since it's our task to populate
4707  * the popup. There's no default for it.
4708  *
4709  * The anchorview is no different, we only change a few things so it looks
4710  * different.
4711  * @until elm_frame_content_set
4712  *
4713  * Then we run, so stuff works and close our main function in the usual way.
4714  * @until ELM_MAIN
4715  *
4716  * Now, a little note. Normally you would use either one of anchorblock or
4717  * anchorview, set your one callback to clicks and do your stuff in there.
4718  * In this example, however, there are a few tricks to make it easier to
4719  * show both widgets in one go (and to save me some typing). So we have
4720  * two callbacks, one per widget, that will call a common function to do
4721  * the rest. The trick is using ::Elm_Entry_Anchorblock_Info for the
4722  * anchorview too, since both are equal, and passing a callback to use
4723  * for our buttons to end the hover, because each widget has a different
4724  * function for it.
4725  * @until _anchorview_clicked_cb
4726  * @until }
4727  *
4728  * The meat of our popup is in the following function. We check what kind
4729  * of menu we need to show, based on the name set to the anchor in the
4730  * markup text. If there's no type (something went wrong, no valid contact
4731  * in the address list) we are just putting a button that does nothing, but
4732  * it's perfectly reasonable to just end the hover and call it quits.
4733  *
4734  * Our popup will consist of one main button in the middle of our hover,
4735  * and possibly a secondary button and a list of other options. We'll create
4736  * first our main button and check what kind of popup we need afterwards.
4737  * @skip static void
4738  * @skip static void
4739  * @until eina_stringshare_add
4740  * @until }
4741  *
4742  * Each button has two callbacks, one is our hack to close the hover
4743  * properly based on which widget it belongs to, the other a simple
4744  * printf that will show the action with the anchors own data. This is
4745  * not how you would usually do it. Instead, the common case is to have
4746  * one callback for the button that will know which function to call to end
4747  * things, but since we are doing it this way it's worth noting that
4748  * smart callbacks will be called in reverse in respect to the order they
4749  * were added, and since our @c btn_end_cb will close the hover, and thus
4750  * delete our buttons, the other callback wouldn't be called if we had
4751  * added it before.
4752  *
4753  * After our telephone popup, there are a few others that are practically
4754  * the same, so they won't be shown here.
4755  *
4756  * Once we are done with that, it's time to place our actions into our
4757  * hover. Main button goes in the middle without much questioning, and then
4758  * we see if we have a secondary button and a box of extra options.
4759  * Because I said so, secondary button goes on either side and box of
4760  * options either on top or below the main one, but to choose which
4761  * exactly, we use the hints our callback info has, which saves us from
4762  * having to do the math and see which side has more space available, with
4763  * a little special case where we delete our extra stuff if there's nowhere
4764  * to place it.
4765  * @skip url:
4766  * @skip }
4767  * @skip evas_object_smart
4768  * @until evas_object_del(box)
4769  * @until }
4770  * @until }
4771  *
4772  * The example will look like this:
4773  *
4774  * @image html screenshots/anchorblock_01.png
4775  * @image latex screenshots/anchorblock_01.eps width=\textwidth
4776  *
4777  * @example anchorblock_example_01.c
4778  */
4779
4780 /**
4781  * @page tutorial_check Check example
4782  * @dontinclude check_example_01.c
4783  *
4784  * This example will show 2 checkboxes, one with just a label and the second
4785  * one with both a label and an icon. This example also ilustrates how to
4786  * have the checkbox change the value of a variable and how to react to those
4787  * changes.
4788  *
4789  * We will start with the usual setup code:
4790  * @until show(bg)
4791  *
4792  * And now we create our first checkbox, set its label, tell it to change
4793  * the value of @p value when the checkbox stats is changed and ask to be
4794  * notified of state changes:
4795  * @until show
4796  *
4797  * For our second checkbox we are going to set an icon so we need to create
4798  * and icon:
4799  * @until show
4800  * @note For simplicity we are using a rectangle as icon, but any evas object
4801  * can be used.
4802  *
4803  * And for our second checkbox we set the label, icon and state to true:
4804  * @until show
4805  *
4806  * We now do some more setup:
4807  * @until ELM_MAIN
4808  *
4809  * And finally implement the callback that will be called when the first
4810  * checkbox's state changes. This callback will use @p data to print a
4811  * message:
4812  * @until }
4813  * @note This work because @p data is @p value(from the main function) and @p
4814  * value is changed when the checkbox is changed.
4815  *
4816  * Our example will look like this:
4817  *
4818  * @image html screenshots/check_example_01.png
4819  * @image latex screenshots/check_example_01.eps width=\textwidth
4820  *
4821  * @example check_example_01.c
4822  */
4823
4824 /**
4825  * @page tutorial_colorselector Color selector example
4826  * @dontinclude colorselector_example_01.c
4827  *
4828  * This example shows how to change the color of a rectangle using a color
4829  * selector. We aren't going to explain a lot of the code since it's the
4830  * usual setup code:
4831  * @until show(rect)
4832  *
4833  * Now that we have a window with background and a rectangle we can create
4834  * our color_selector and set it's initial color to fully opaque blue:
4835  * @until show
4836  *
4837  * Next we tell ask to be notified whenever the color changes:
4838  * @until changed
4839  *
4840  * We follow that we some more run of the mill setup code:
4841  * @until ELM_MAIN()
4842  *
4843  * And now get to the callback that sets the color of the rectangle:
4844  * @until }
4845  *
4846  * This example will look like this:
4847  *
4848  * @image html screenshots/colorselector_example_01.png
4849  * @image latex screenshots/colorselector_example_01.eps width=\textwidth
4850  *
4851  * @example colorselector_example_01.c
4852  */
4853
4854 /**
4855  * @page slideshow_example Slideshow widget example
4856  *
4857  * This application is aimed to exemplify the slideshow widget. It
4858  * consists of a window with a slideshow widget set as "resize
4859  * object", along with a control bar, in the form of a notify. Those
4860  * controls will exercise most of the slideshow's API functions.
4861  *
4862  * We create the slideshow, itself, first, making it @b loop on its
4863  * image itens, when in slideshow mode:
4864  * @dontinclude slideshow_example.c
4865  * @skip slideshow = elm_slideshow_add
4866  * @until evas_object_show
4867  *
4868  * Next, we define the <b>item class</b> for our slideshow
4869  * items. Slideshow images are going to be Elementary @ref Photo "photo"
4870  * widgets, here, as pointed by our @c get class
4871  * function. We'll let the Elementary infrastructure to delete those
4872  * objects for us, and, as there's no additional data attached to our
4873  * slideshow items, the @c del class function can be left undefined:
4874  * @dontinclude slideshow_example.c
4875  * @skip itc
4876  * @until ;
4877  * @dontinclude slideshow_example.c
4878  * @skip itc.func
4879  * @until = NULL
4880  * @dontinclude slideshow_example.c
4881  * @skip get our images to make slideshow items
4882  * @until }
4883  *
4884  * We now get to populate the slideshow widget with items. Our images
4885  * are going to be some randomly chosen from the Elementary package,
4886  * nine of them. For the first eight, we insert them ordered in the
4887  * widget, by using elm_slideshow_item_sorted_insert(). The comparing
4888  * function will use the image names to sort items. The last item is
4889  * inserted at the end of the slideshow's items list, with
4890  * elm_slideshow_item_add(). We check out how that list ends with
4891  * elm_slideshow_items_get(), than:
4892  * @dontinclude slideshow_example.c
4893  * @skip static const char *img
4894  * @until _2
4895  * @dontinclude slideshow_example.c
4896  * @skip first =
4897  * @until data_get
4898  *
4899  * Note that we save the pointers to the first and last items in the
4900  * slideshow, for future use.
4901  *
4902  * What follows is the code creating a notify, to be shown over the
4903  * slideshow's viewport, with knobs to act on it. We're not showing
4904  * that boilerplate code, but only the callbacks attached to the
4905  * interesting smart events of those knobs. The first four are
4906  * buttons, which will:
4907  * - Select the @b next item in the slideshow
4908  * - Select the @b previous item in the slideshow
4909  * - Select the @b first item in the slideshow
4910  * - Select the @b last item in the slideshow
4911  *
4912  * Check out the code for those four actions, being the two last @c
4913  * data pointers the same @c first and @c last pointers we save
4914  * before, respectively:
4915  * @dontinclude slideshow_example.c
4916  * @skip jump to next
4917  * @until }
4918  * @until }
4919  * @until }
4920  * @until }
4921  *
4922  * What follow are two hoversels, meant for one to change the
4923  * slideshow's @b transition and @b layout styles, respectively. We
4924  * fetch all the available transition and layout names to populate
4925  * those widgets and, when one selects any of them, we apply the
4926  * corresponding setters on the slideshow:
4927  * @dontinclude slideshow_example.c
4928  * @skip hv = elm_hoversel_add
4929  * @until show(hv)
4930  * @until show(hv)
4931  * @dontinclude slideshow_example.c
4932  * @skip transition changed
4933  * @until }
4934  * @until }
4935  *
4936  * For one to change the transition @b time on the slideshow widget,
4937  * we use a spinner widget. We set it to the initial value of 3
4938  * (seconds), which will be probed by the next knob -- a button
4939  * starting the slideshow, de facto. Note that changing the transition
4940  * time while a slideshow is already happening will ajust its
4941  * transition time:
4942  * @dontinclude slideshow_example.c
4943  * @skip spin = elm_spinner_add
4944  * @until evas_object_show
4945  * @dontinclude slideshow_example.c
4946  * @skip slideshow transition time has
4947  * @until }
4948  *
4949  * Finally, we have two buttons which will, respectively, start and
4950  * stop the slideshow on our widget. Here are their "clicked"
4951  * callbacks:
4952  * @dontinclude slideshow_example.c
4953  * @skip start the show
4954  * @until }
4955  * @until }
4956  *
4957  * This is how the example program's window looks like:
4958  * @image html screenshots/slideshow_example.png
4959  * @image latex screenshots/slideshow_example.eps width=\textwidth
4960  *
4961  * See the full @ref slideshow_example_c "source code" for
4962  * this example.
4963  *
4964  * @example slideshow_example.c
4965  */
4966
4967 /**
4968  * @page tutorial_photocam Photocam example
4969  * @dontinclude photocam_example_01.c
4970  *
4971  * In this example we will have a photocam and a couple of buttons and slider to
4972  * control the photocam. To avoid cluttering we'll only show the parts of the
4973  * example that relate to the photocam, the full source code can be seen @ref
4974  * photocam_example_01.c "here".
4975  *
4976  * Creating a photocam is as easy as creating any other widget:
4977  * @skipline elm_photocam_add
4978  *
4979  * A photocam is only useful if we have a image on it, so lets set a file for it
4980  * to work with:
4981  * @until file_set
4982  *
4983  * We now set the photocam to not bounce horizontally:
4984  * @until bounce_set
4985  *
4986  * And we want to know when the photocam has finished loading the image so:
4987  * @until smart_callback
4988  *
4989  * The reason to know when the image is loaded is so that we can bring the
4990  * center of the image into view:
4991  * @skip static
4992  * @until }
4993  *
4994  * As mentioned we have 2 buttons in this example, the "Fit" one will cause
4995  * the photocam to go in to a zoom mode that makes the image fit inside the
4996  * photocam. Tough this has no effect on the image we also print what region was
4997  * being viewed before setting the zoom mode:
4998  * @until }
4999  * @note When in fit mode our slider(explained below) won't work.
5000  *
5001  * The second button("Unfit") will bring the photocam back into manual zoom
5002  * mode:
5003  * @until }
5004  *
5005  * Our slider controls the level of zoom of the photocam:
5006  * @until }
5007  * @note It is important to note that this only works when in manual zoom mode.
5008  *
5009  * Our example will initially look like this:
5010  *
5011  * @image html screenshots/photocam_example_01.png
5012  * @image latex screenshots/photocam_example_01.eps width=\textwidth
5013  *
5014  * @example photocam_example_01.c
5015  */
5016
5017 /**
5018  * @page inwin_example_01 Inwin - General overview
5019  *
5020  * Inwin is a very simple widget to show, so this example will be a very simple
5021  * one, just using all of the available API.
5022  *
5023  * The program is nothing but a window with a lonely button, as shown here.
5024  *
5025  * @image html screenshots/inwin_example.png
5026  * @image latex screenshots/inwin_example.eps width=\textwidth
5027  *
5028  * And pressing the button makes an inwin appear.
5029  *
5030  * @image html screenshots/inwin_example_a.png
5031  * @image latex screenshots/inwin_example_a.eps width=\textwidth
5032  *
5033  * And the code is just as simple. We being with some global variables to keep
5034  * track of our Inwin.
5035  * @dontinclude inwin_example.c
5036  * @skip static
5037  * @until current_style
5038  *
5039  * And two callbacks used by the buttons the above screenshot showed. In these,
5040  * we check if @c inwin exists and execute the proper action on it. If it's not
5041  * there anymore, then we were abandoned to our luck, so we disabled ourselves.
5042  * @until _inwin_destroy
5043  * @until }
5044  * @until }
5045  *
5046  * The lonely button from the beginning, when clicked, will call the following
5047  * function, which begins by checking if an inwin exists, and if it's there,
5048  * we bring it back to the front and exit from our function without any further
5049  * ado.
5050  * @until }
5051  *
5052  * But if no inwin is there to show, we need to create one. First we need the
5053  * top-most window for the program, as no inwin can be created using other
5054  * objects as parents. Then we create our popup, set the next style in the list
5055  * and show it.
5056  * @until current_style =
5057  *
5058  * As for the content of our inwin, it's just a box with a label and some
5059  * buttons inside.
5060  * @until _inwin_destroy
5061  * @until }
5062  *
5063  * Now, all the code above shows how every object must always be set as content
5064  * for some other object, be it by setting the full content, packing it in a
5065  * box or table or working as icon for some other widget. But we didn't do
5066  * anything like that for the inwin, this one is just created and shown and
5067  * everything works. Other widgets can be used this way, but they would need
5068  * to be placed and resized manually or nothing would be shown correctly. The
5069  * inwin, however, sets itself as a children of the top-level window and will
5070  * be resized as the parent window changes too.
5071  *
5072  * Another characteristic of Inwin is that when it's shown above everyone else,
5073  * it will work kind of like a modal window, blocking any other widget from
5074  * receiving events until the window is manually dismissed by pressing some
5075  * button to close it or having blocking task signalling its completion so
5076  * normal operations can be resumed. This is unlike the @ref Hover widget,
5077  * that would show its content on top of the designated target, but clicking
5078  * anywhere else would dismiss it automatically.
5079  *
5080  * To illustrate that last point, when we close the main window and an inwin
5081  * is still there, we'll take out the content from the inwin and place it in
5082  * a hover.
5083  * @until }
5084  * @until }
5085  *
5086  * And the rest of the program doesn't have anything else related to inwin,
5087  * so it won't be shown here, but you can find it in
5088  * @ref inwin_example.c "inwin_example.c".
5089  *
5090  * @example inwin_example.c
5091  */
5092
5093 /**
5094  * @page tutorial_scroller Scroller example
5095  * @dontinclude scroller_example_01.c
5096  *
5097  * This example is very short and will illustrate one way to use a scroller.
5098  * We'll omit the declaration of the @p text variable because it's a very long
5099  * @htmlonly<a href="http://lipsum.com/">@endhtmlonly ipsum lorem
5100  * @htmlonly</a>@endhtmlonly. If you really want to see the full code, it's @ref
5101  * scroller_example_01.c "scroller_example_01.c".
5102  *
5103  * We start our example by creating our window and background:
5104  * @skip EAPI
5105  * @until show(bg)
5106  *
5107  * Next we create a label and set it's text to @p text(very long ipsum lorem):
5108  * @until show(label)
5109  *
5110  * We then create our scroller, ask that it have the same size as the window and
5111  * set its content:
5112  * @until content_set
5113  *
5114  * We are now going to set a number of properties in our scroller:
5115  * @li We make it bounce horizontally but not vertically.
5116  * @li We make both scrollbars always be visible.
5117  * @li We have the events be propagated from the content to the scroller.
5118  * @li We enforce a page policy vertically(having a page be the size of the
5119  * viewport) and leave horizontal scrolling free.
5120  * @li And finally we ask the scroller to show us a region starting at 50,50 and
5121  * having a width and height of 200px.
5122  * @until region_show
5123  * @note Observant reader will note that the elm_scroller_region_show() didn't
5124  * scroll the view vertically, this is because we told the scroller to only
5125  * accept vertical scrolling in pages.
5126  *
5127  * And now we're done:
5128  * @until ELM_MAIN
5129  *
5130  * Our example will look like this:
5131  *
5132  * @image html screenshots/scroller_example_01.png
5133  * @image latex screenshots/scroller_example_01.eps width=\textwidth
5134  *
5135  * @example scroller_example_01.c
5136  */
5137
5138 /**
5139  * @page tutorial_table_01
5140  *
5141  * In this example we add four labels to a homogeneous table that has a padding
5142  * of 5px between cells.
5143  *
5144  * The interesting bits from this example are:
5145  * @li Where we set the table as homogeneous and the padding:
5146  * @dontinclude table_example_01.c
5147  * @skip padding_set
5148  * @until homogeneous_set
5149  * @li Where we add each label to the table:
5150  * @skipline elm_table_pack
5151  * @skipline elm_table_pack
5152  * @skipline elm_table_pack
5153  * @skipline elm_table_pack
5154  *
5155  * Here you can see the full source:
5156  * @include table_example_01.c
5157  *
5158  * Our example will look like this:
5159  *
5160  * @image html screenshots/table_example_01.png
5161  * @image latex screenshots/table_example_01.eps width=\textwidth
5162  *
5163  * @example table_example_01.c
5164  */
5165
5166 /**
5167  * @page tutorial_table_02
5168  *
5169  * For our second example we'll create a table with 4 rectangles in it. Since
5170  * our rectangles are of different sizes our table won't be homogeneous.
5171  *
5172  * The interesting bits from this example are:
5173  * @li Where we set the table as not homogeneous:
5174  * @dontinclude table_example_02.c
5175  * @skipline homogeneous_set
5176  * @li Where we add each rectangle to the table:
5177  * @skipline elm_table_pack
5178  * @skipline elm_table_pack
5179  * @skipline elm_table_pack
5180  * @skipline elm_table_pack
5181  *
5182  * Here you can see the full source:
5183  * @include table_example_02.c
5184  *
5185  * Our example will look like this:
5186  *
5187  * @image html screenshots/table_example_02.png
5188  * @image latex screenshots/table_example_02.eps width=\textwidth
5189  *
5190  * @example table_example_02.c
5191  */
5192
5193 /**
5194  * @page bg_example_01_c bg_example_01.c
5195  * @include bg_example_01.c
5196  * @example bg_example_01.c
5197  */
5198
5199 /**
5200  * @page bg_example_02_c bg_example_02.c
5201  * @include bg_example_02.c
5202  * @example bg_example_02.c
5203  */
5204
5205 /**
5206  * @page bg_example_03_c bg_example_03.c
5207  * @include bg_example_03.c
5208  * @example bg_example_03.c
5209  */
5210
5211 /**
5212  * @page actionslider_example_01 Actionslider example
5213  * @include actionslider_example_01.c
5214  * @example actionslider_example_01.c
5215  */
5216
5217 /**
5218  * @page animator_example_01_c Animator example 01
5219  * @include animator_example_01.c
5220  * @example animator_example_01.c
5221  */
5222
5223 /**
5224  * @page transit_example_01_c Transit example 1
5225  * @include transit_example_01.c
5226  * @example transit_example_01.c
5227  */
5228
5229 /**
5230  * @page transit_example_02_c Transit example 2
5231  * @include transit_example_02.c
5232  * @example transit_example_02.c
5233  */
5234
5235 /**
5236  * @page general_functions_example_c General (top-level) functions example
5237  * @include general_funcs_example.c
5238  * @example general_funcs_example.c
5239  */
5240
5241 /**
5242  * @page clock_example_c Clock example
5243  * @include clock_example.c
5244  * @example clock_example.c
5245  */
5246
5247 /**
5248  * @page flipselector_example_c Flipselector example
5249  * @include flipselector_example.c
5250  * @example flipselector_example.c
5251  */
5252
5253 /**
5254  * @page fileselector_example_c Fileselector example
5255  * @include fileselector_example.c
5256  * @example fileselector_example.c
5257  */
5258
5259 /**
5260  * @page fileselector_button_example_c Fileselector button example
5261  * @include fileselector_button_example.c
5262  * @example fileselector_button_example.c
5263  */
5264
5265 /**
5266  * @page fileselector_entry_example_c Fileselector entry example
5267  * @include fileselector_entry_example.c
5268  * @example fileselector_entry_example.c
5269  */
5270
5271 /**
5272  * @page index_example_01_c Index example
5273  * @include index_example_01.c
5274  * @example index_example_01.c
5275  */
5276
5277 /**
5278  * @page index_example_02_c Index example
5279  * @include index_example_02.c
5280  * @example index_example_02.c
5281  */
5282
5283 /**
5284  * @page layout_example_01_c layout_example_01.c
5285  * @include layout_example_01.c
5286  * @example layout_example_01.c
5287  */
5288
5289 /**
5290  * @page layout_example_02_c layout_example_02.c
5291  * @include layout_example_02.c
5292  * @example layout_example_02.c
5293  */
5294
5295 /**
5296  * @page layout_example_03_c layout_example_03.c
5297  * @include layout_example_03.c
5298  * @example layout_example_03.c
5299  */
5300
5301 /**
5302  * @page layout_example_edc An example of layout theme file
5303  *
5304  * This theme file contains two groups. Each of them is a different theme, and
5305  * can be used by an Elementary Layout widget. A theme can be used more than
5306  * once by many different Elementary Layout widgets too.
5307  *
5308  * @include layout_example.edc
5309  * @example layout_example.edc
5310  */
5311
5312 /**
5313  * @page gengrid_example_c Gengrid example
5314  * @include gengrid_example.c
5315  * @example gengrid_example.c
5316  */
5317
5318 /**
5319  * @page genlist_example_01_c genlist_example_01.c
5320  * @include genlist_example_01.c
5321  * @example genlist_example_01.c
5322  */
5323
5324 /**
5325  * @page genlist_example_02_c genlist_example_02.c
5326  * @include genlist_example_02.c
5327  * @example genlist_example_02.c
5328  */
5329
5330 /**
5331  * @page genlist_example_04_c genlist_example_04.c
5332  * @include genlist_example_04.c
5333  * @example genlist_example_04.c
5334  */
5335
5336 /**
5337  * @page genlist_example_05_c genlist_example_05.c
5338  * @include genlist_example_05.c
5339  * @example genlist_example_05.c
5340  */
5341
5342 /**
5343  * @page progressbar_example_c Progress bar example
5344  * @include progressbar_example.c
5345  * @example progressbar_example.c
5346  */
5347
5348 /**
5349  * @page slideshow_example_c Slideshow example
5350  * @include slideshow_example.c
5351  * @example slideshow_example.c
5352  */