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