[elementary] Documenting/exemplifying file selector
[framework/uifw/elementary.git] / doc / examples.dox
1 /**
2  * @page Examples Examples
3  *
4  * Here is a page with Elementary examples.
5  *
6  * @ref bg_01_example_page
7  *
8  * @ref bg_02_example_page
9  *
10  * @ref bg_03_example_page
11  *
12  * @ref actionslider_example_page
13  *
14  * @ref elm_animator_example_page_01
15  *
16  * @ref transit_example_01_explained
17  *
18  * @ref transit_example_02_explained
19  *
20  * @ref general_functions_example_page
21  *
22  * @ref calendar_example_01
23  *
24  * @ref calendar_example_02
25  *
26  * @ref calendar_example_03
27  *
28  * @ref calendar_example_04
29  *
30  * @ref calendar_example_05
31  *
32  * @ref calendar_example_06
33  *
34  * @ref clock_example
35  *
36  * @ref flipselector_example
37  *
38  * @ref fileselector_example
39  */
40
41 /**
42  * @page bg_01_example_page elm_bg - Plain color background.
43  * @dontinclude bg_example_01.c
44  *
45  * The full code for this example can be found at @ref bg_example_01_c,
46  * in the function @c test_bg_plain. It's part of the @c elementar_test
47  * suite, and thus has the code for the three examples referenced by this
48  * documentation.
49  *
50  * This first example just sets a default background with a plain color. The
51  * first part consists of creating an Elementary window. It's the common
52  * piece of code that you'll see everywhere in Elementary: @skip elm_main
53  * @until autodel_set
54  *
55  * Now we really create our background object, using the window object as
56  * its parent:
57  *
58  * @skipline bg_add
59  *
60  * Then we set the size hints of the background object so that it will use
61  * all space available for it, and then add it as a resize object to the
62  * window, making it visible in the end:
63  *
64  * @skip size_hint_weight_set
65  * @until resize_object_add
66  *
67  * See @ref evas_object_size_hint_weight_set and elm_win_resize_object_add()
68  * for more detailed info about these functions.
69  *
70  * The end of the example is quite simple, just setting the minimum and
71  * maximum size of the background, so the Elementary window knows that it
72  * has to have at least the minimum size. The background also won't scale to
73  * a size above its maximum. Then we resize the window and show it in the
74  * end:
75  *
76  * @skip set size hints
77  * @until }
78  *
79  * And here we finish our very simple background object usage example.
80  */
81
82 /**
83  * @page bg_02_example_page elm_bg - Image background.
84  * @dontinclude bg_example_02.c
85  *
86  * The full code for this example can be found at @ref bg_example_02_c,
87  * in the function @c test_bg_image. It's part of the @c elementar_test
88  * suite, and thus has the code for the three examples referenced by this
89  * documentation.
90  *
91  * This is the second example, and shows how to use the Elementary
92  * background object to set an image as background of your application.
93  *
94  * We start this example exactly in the same way as the previous one, even
95  * when creating the background object:
96  *
97  * @skip elm_main
98  * @until bg_add
99  *
100  * Now it's the different part.
101  *
102  * Our background will have an image, that will be displayed over the
103  * background color. Before loading the image, we set the load size of the
104  * image. The load size is a hint about the size that we want the image
105  * displayed in the screen. It's not the exact size that the image will have,
106  * but usually a bit bigger. The background object can still be scaled to a
107  * size bigger than the one set here. Setting the image load size to
108  * something smaller than its real size will reduce the memory used to keep
109  * the pixmap representation of the image, and the time to load it. Here we
110  * set the load size to 20x20 pixels, but the image is loaded with a size
111  * bigger than that (since it's just a hint):
112  *
113  * @skipline load_size_set
114  *
115  * And set our background image to be centered, instead of stretched or
116  * scaled, so the effect of the elm_bg_load_size_set() can be easily
117  * understood:
118  *
119  * @skipline option_set
120  *
121  * We need a filename to set, so we get one from the previous installed
122  * images in the @c PACKAGE_DATA_DIR, and write its full path to a buffer.
123  * Then we use this buffer to set the filename in the background object:
124  *
125  * @skip snprintf
126  * @until bg_file_set
127  *
128  * Notice that the third argument of the elm_bg_file_set() function is @c
129  * NULL, since we are setting an image to this background. This function
130  * also supports setting an edje group as background, in which case the @c
131  * group parameter wouldn't be @c NULL, but be the name of the group
132  * instead.
133  *
134  * Finally, we can set the size hints, add the background as a resize
135  * object, and resize the window, exactly the same thing we do in the @ref
136  * bg_01_example_page example:
137  *
138  * @skip size_hint
139  * @until }
140  *
141  * And this is the end of this example.
142  *
143  * This example will look like this:
144  * @image html screenshots/bg_01.png
145  * @image latex screenshots/bg_01.eps
146  */
147
148 /**
149  * @page bg_03_example_page elm_bg - Background properties.
150  * @dontinclude bg_example_03.c
151  *
152  * The full code for this example can be found at @ref bg_example_03_c, in the
153  * function @c test_bg_options, with the callbacks @c _cb_overlay_changed, @c
154  * _cb_color_changed and @c _cb_radio_changed defined in the beginning of the
155  * file. It's part of the @c elementar_test suite, and thus has the code for
156  * the three examples referenced by this documentation.
157  *
158  * This example will show the properties available for the background object,
159  * and will use of some more widgets to set them.
160  *
161  * In order to do this, we will set some callbacks for these widgets. The
162  * first is for the radio buttons that will be used to choose the option
163  * passed as argument to elm_bg_option_set():
164  *
165  * @skip _cb_radio_changed
166  * @until }
167  *
168  * The next callback will be used when setting the overlay (using
169  * elm_bg_overlay_set()):
170  *
171  * @skip _cb_overlay_changed
172  * @until }
173  * @until }
174  *
175  * And the last one, used to set the color (with elm_bg_color_set()):
176  *
177  * @skip _cb_color_changed
178  * @until }
179  *
180  * We will get back to what these functions do soon. If you want to know more
181  * about how to set these callbacks and what these widgets are, look for:
182  * @li elm_radio_add()
183  * @li elm_check_add()
184  * @li elm_spinner_add()
185  *
186  * Now going to the main function, @c test_bg_options, we have the common
187  * code with the other examples:
188  *
189  * @skip bg-options
190  * @until autodel_set
191  *
192  * We add a plain background to this window, so it will have the default
193  * background color behind everything:
194  *
195  * @skip bg = elm_bg_add
196  * @until evas_object_show(bg)
197  *
198  * Then we add a vertical box (elm_box_add()) that will hold the background
199  * object that we are going to play with, as well as a horizontal box that
200  * will hold widgets:
201  *
202  * @skip elm_box_add
203  * @until evas_object_show
204  *
205  * Now we add the background object that is going to be of use for our
206  * example. It is an image background, as used in @ref bg_02_example_page ,
207  * so the code should be familiar:
208  *
209  * @skip elm_bg_add
210  * @until evas_object_show
211  *
212  * Notice the call to elm_box_pack_end(): it will pack the background object
213  * in the end of the Elementary box declared above. Just refer to that
214  * documentation for more info.
215  *
216  * Since this Elementary background is already an image background, we are
217  * going to play with its other properties. We will change its option
218  * (CENTER, SCALE, STRETCH, TILE), its color (RGB), and add an overlay to it.
219  * For all of these properties, we are going to add widgets that will
220  * configure them.
221  *
222  * First, lets add the horizontal box that will hold these widgets:
223  * @skip hbox
224  * @until align_set
225  *
226  * For now, just consider this @c hbox as a rectangle that will contain the
227  * widgets, and will distribute them horizontally inside its content. Then we
228  * add radio buttons that will allow us to choose the property to use with
229  * this background:
230  *
231  * @skip radio_add
232  * @until evas_object_show
233  *
234  * Again, I won't give details about the use of these widgets, just look for
235  * their documentation if necessary. It's enough to know for now that we are
236  * packing them in the @c hbox, setting a label for them, and the most
237  * important parts: setting its value to @c ELM_BG_OPTION_CENTER and its
238  * callback to @c _cb_radio_changed (the function defined in the beginning of
239  * this example). We do this for the next 3 radio buttons added after this
240  * one, each of them with a different value.
241  *
242  * Now taking a look at the code of the callback @c _cb_radio_changed again,
243  * it will call elm_bg_option_set() with the value set from the checked radio
244  * button, thus setting the option for this background. The background is
245  * passed as argument to the @p data parameter of this callback, and is
246  * referenced here as @c o_bg.
247  *
248  * Later we set the default value for this radio button:
249  *
250  * @skipline elm_radio_value_set
251  *
252  * Then we add a checkbox for the elm_bg_overlay_set() function:
253  *
254  * @skip check_add
255  * @until evas_object_show
256  *
257  * Now look at the code of the @c _cb_overlay_changed again. If the checkbox
258  * state is checked, an overlay will be added to the background. It's done by
259  * creating an Edje object, and setting it with elm_bg_overlay_set() to the
260  * background object. For information about what are and how to set Edje
261  * object, look at the Edje documentation.
262  *
263  * Finally we add a spinner object (elm_spinner_add()) to be used to select
264  * the color of our background. In its callback it's possible to see the call
265  * to elm_bg_color_set(), which will change the color of this background.
266  * This color is used by the background to fill areas where the image doesn't
267  * cover (in this case, where we have an image background). The spinner is
268  * also packed into the @c hbox :
269  *
270  * @skip elm_spinner_add
271  * @until evas_object_show
272  *
273  * Then we just have to pack the @c hbox inside the @c box, set some size
274  * hints, and show our window:
275  *
276  * @skip pack_end
277  * @until }
278  *
279  * Now to see this code in action, open elementary_test, and go to the "Bg
280  * Options" test. It should demonstrate what was implemented here.
281  */
282
283 /**
284  * @page actionslider_example_page Actionslider usage
285  * @dontinclude actionslider_example_01.c
286  *
287  * For this example we are going to assume knowledge of evas smart callbacks
288  * and some basic evas object functions. Elementary is not meant to be used
289  * without evas, if you're not yet familiar with evas it probably is worth
290  * checking that out.
291  *
292  * And now to the example, when using Elementary we start by including
293  * Elementary.h:
294  * @skipline #include
295  *
296  * Next we define some callbacks, they all share the same signature because
297  * they are all to be used with evas_object_smart_callback_add().
298  * The first one just prints the selected label(in two different ways):
299  * @until }
300  *
301  * This next callback is a little more interesting, it makes the selected
302  * label magnetic(except if it's the center label):
303  * @until }
304  *
305  * This callback enables or disables the magnetic propertty of the center
306  * label:
307  * @until }
308  *
309  * And finally a callback to stop the main loop when the window is closed:
310  * @until }
311  *
312  * To be able to create our actionsliders we need to do some setup, but this
313  * isn't really relevant here, so if you want to know about that go @ref
314  * Win "here".
315  *
316  * With all that boring stuff out of the way we can proceed to creating some
317  * actionsliders.@n
318  * All actionsliders are created the same way:
319  * @skipline actionslider_add
320  * Next we must choose where the indicator starts, and for this one we choose
321  * the right, and set the right as magnetic:
322  * @skipline indicator_pos_set
323  * @until magnet_pos_set
324  *
325  * We then set the labels for the left and right, passing NULL as an argument
326  * to any of the labels makes that position have no label.
327  * @until Stop
328  *
329  * Furthermore we mark both left and right as enabled positions, if we didn't
330  * do this all three positions would be enabled:
331  * @until RIGHT
332  *
333  * Having the the enabled positions we now add a smart callback to change
334  * which position is magnetic, so that only the last selected position is
335  * magnetic:
336  * @until NULL
337  *
338  * And finally we set our printing callback and show the actionslider:
339  * @until object_show
340  * @skip pack_end
341  *
342  * For our next actionslider we are going to do much as we did for the
343  * previous except we are going to have the center as the magnet(and not
344  * change it):
345  * @skipline actionslider_add
346  * @skipline indicator_pos_set
347  * @until object_show
348  *
349  * And another actionslider, in this one the indicator starts on the left.
350  * It has labels only in the center and right, and both bositions are
351  * magnetic. Because the left doesn't have a label and is not magnetic once
352  * the indicator leaves it can't return:
353  * @skipline actionslider_add
354  * @skipline indicator_pos_set
355  * @until object_show
356  * @note The greyed out area is a @ref Styles "style".
357  *
358  * And now an actionslider with a label in the indicator, and whose magnet
359  * properties change based on what was last selected:
360  * @skipline actionslider_add
361  * @skipline indicator_pos_set
362  * @until object_show
363  * @note The greyed out area is a @ref Styles "style".
364  *
365  * We are almost done, this next one is just an actionslider with all
366  * positions magnetized and having every possible label:
367  * @skipline actionslider_add
368  * @skipline indicator_pos_set
369  * @until object_show
370  *
371  * And for our last actionslider we have one that turns the magnetic property
372  * on and off:
373  * @skipline actionslider_add
374  * @skipline indicator_pos_set
375  * @until object_show
376  *
377  * The example will look like this:
378  * @image html screenshots/actionslider_01.png
379  * @image latex screenshots/actionslider_01.eps
380  *
381  * See the full source code @ref actionslider_example_01 "here"
382  */
383
384 /**
385  * @page elm_animator_example_page_01 Animator usage
386  * @dontinclude animator_example_01.c
387  *
388  * For this example we will be using a bit of evas, you could animate a
389  * elementary widget in much the same way, but to keep things simple we use
390  * an evas_object_rectangle.
391  *
392  * As every other example we start with our include and a simple callback to
393  * exit the app when the window is closed:
394  * @skipline #include
395  * @until }
396  *
397  * This next callback is the one that actually creates our animation, it
398  * changes the size, position and color of a rectangle given to it in @a
399  * data:
400  * @until }
401  *
402  * Next we have a callback that prints a string, nothing special:
403  * @until }
404  *
405  * This next callback is a little more interesting, it has a state variable
406  * to know if the animation is currently paused or running, and it toogles
407  * the state of the animation accordingly:
408  * @until }
409  * @until }
410  * @until }
411  *
412  * Finally we have a callback to stop the animation:
413  * @until }
414  *
415  * As with every example we need to do a bit of setup before we can actually
416  * use an animation, but for the purposes of this example that's not relevant
417  * so let's just skip to the good stuff, creating an animator:
418  * @skipline animator_add
419  * @note Since elm_animator is not a widget we can give it a NULL parent.
420  *
421  * Now that we have an elm_animator we set it's duration to 1 second:
422  * @line duration_set
423  *
424  * We would also like our animation to be reversible, so:
425  * @line reverse_set
426  *
427  * We also set our animation to repeat as many times as possible, which will
428  * mean that _end_cb will only be called after UINT_MAX * 2 seconds(UINT_MAX
429  * for the animation running forward and UNIT_MAX for the animation running
430  * backwards):
431  * @line repeat_set
432  *
433  * To add some fun to our animation we will use the IN_OUT curve style:
434  * @line curve_style
435  *
436  * To actually animate anything we need an operation callback:
437  * @line operation_callback
438  *
439  * Even though we set our animation to repeat for a very long time we are
440  * going to set a end callback to it:
441  * @line completion_callback
442  * @note Notice that stoping the animation with the stop button will not make
443  * _end_cb be called.
444  *
445  * Now that we have fully set up our animator we can tell it to start
446  * animating:
447  * @line animate
448  *
449  * There's a bit more of code that doesn't really matter to use so we skip
450  * right down to our last interesting point:
451  * @skipline animator_del
452  * @note Because we created our animator with no parent we need to delete it
453  * ourselves.
454  *
455  * The example should look like this:
456  * @image html screenshots/animator_example_01.png
457  * @image latex screenshots/animator_example_01.eps
458  * @n
459  * @image html screenshots/animator_example_02.png
460  * @image latex screenshots/animator_example_02.eps
461  * @n
462  * @image html screenshots/animator_example_03.png
463  * @image latex screenshots/animator_example_03.eps
464  *
465  * The full source code for this example can be found @ref
466  * animator_example_01_c "here"
467  */
468
469 /**
470  * @page transit_example_03_c elm_transit - Combined effects and options.
471  *
472  * This example shows how to apply the following transition effects:
473  * @li translation
474  * @li color
475  * @li rotation
476  * @li wipe
477  * @li zoom
478  * @li resizing
479  *
480  * It allows you to apply more than one effect at once, and also allows to
481  * set properties like event_enabled, auto_reverse, repeat_times and
482  * tween_mode.
483  *
484  * @include transit_example_03.c
485  */
486
487 /**
488  * @page transit_example_04_c elm_transit - Combined effects over two objects.
489  *
490  * This example shows how to apply the transition effects:
491  * @li flip
492  * @li resizable_flip
493  * @li fade
494  * @li blend
495  * over two objects. This kind of transition effect is used to make one
496  * object disappear and another one appear on its place.
497  *
498  * You can mix more than one effect of this type on the same objects, and the
499  * transition will apply both.
500  *
501  * @include transit_example_04.c
502  */
503
504 /**
505  * @page transit_example_01_explained elm_transit - Basic transit usage.
506  * @dontinclude transit_example_01.c
507  *
508  * The full code for this example can be found at @ref transit_example_01_c.
509  *
510  * This example shows the simplest way of creating a transition and applying
511  * it to an object. Similarly to every other elementary example, we create a
512  * window, set its title, size, autodel property, and setup a callback to
513  * exit the program when finished:
514  *
515  * @skip on_done
516  * @until evas_object_resize
517  *
518  * We also add a resizeable white background to use behind our animation:
519  *
520  * @skip bg_add
521  * @until evas_object_show
522  *
523  * And then we add a button that we will use to demonstrate the effects of
524  * our animation:
525  *
526  * @skip button_add
527  * @until evas_object_show(win)
528  *
529  * Notice that we are not adding the button with elm_win_resize_object_add()
530  * because we don't want the window to control the size of the button. We
531  * will use the transition to change the button size, so it could conflict
532  * with something else trying to control that size.
533  *
534  * Now, the simplest code possible to create the resize animation:
535  *
536  * @skip transit_add
537  * @until transit_go
538  *
539  * As you can see, this code is very easy to understand. First, we create the
540  * transition itself with elm_transit_add(). Then we add the button to this
541  * transition with elm_transit_object_add(), which means that the transition
542  * will operate over this button. The effect that we want now is changing the
543  * object size from 100x50 to 300x150, and can be achieved by adding the
544  * resize effect with elm_transit_effect_resizing_add().
545  *
546  * Finally, we set the transition time to 5 seconds and start the transition
547  * with elm_transit_go(). If we wanted more effects applied to this
548  * button, we could add them to the same transition. See the
549  * @ref transit_example_03_c to watch many transitions being applied to an
550  * object.
551  */
552
553 /**
554  * @page transit_example_02_explained elm_transit - Chained transitions.
555  * @dontinclude transit_example_02.c
556  *
557  * The full code for this example can be found at @ref transit_example_02_c.
558  *
559  * This example shows how to implement a chain of transitions. This chain is
560  * used to start a transition just after another transition ended. Similarly
561  * to every other elementary example, we create a window, set its title,
562  * size, autodel property, and setup a callback to exit the program when
563  * finished:
564  *
565  * @skip on_done
566  * @until evas_object_resize
567  *
568  * We also add a resizeable white background to use behind our animation:
569  *
570  * @skip bg_add
571  * @until evas_object_show
572  *
573  * This example will have a chain of 4 transitions, each of them applied to
574  * one button. Thus we create 4 different buttons:
575  *
576  * @skip button_add
577  * @until evas_object_show(bt4)
578  *
579  * Now we create a simple translation transition that will be started as soon
580  * as the program loads. It will be our first transition, and the other
581  * transitions will be started just after this transition ends:
582  *
583  * @skip transit_add
584  * @until transit_go
585  *
586  * The code displayed until now has nothing different from what you have
587  * already seen in @ref transit_example_01_explained, but now comes the new
588  * part: instead of creating a second transition that will start later using
589  * a timer, we create the it normally, and use
590  * elm_transit_chain_transit_add() instead of elm_transit_go. Since we are
591  * adding it in a chain after the first transition, it will start as soon as
592  * the first transition ends:
593  *
594  * @skip transit_add
595  * @until transit_chain_transit_add
596  *
597  * Finally we add the 2 other transitions to the chain, and run our program.
598  * It will make one transition start after the other finish, and there is the
599  * transition chain.
600  */
601
602 /**
603  * @page general_functions_example_page General (top-level) functions example
604  * @dontinclude general_funcs_example.c
605  *
606  * As told in their documentation blocks, the
607  * elm_app_compile_*_dir_set() family of functions have to be called
608  * before elm_app_info_set():
609  * @skip tell elm about
610  * @until elm_app_info_set
611  *
612  * We are here setting the fallback paths to the compiling time target
613  * paths, naturally. If you're building the example out of the
614  * project's build system, we're assuming they are the canonical ones.
615  *
616  * After the program starts, elm_app_info_set() will actually run and
617  * then you'll see an intrincasy: Elementary does the prefix lookup @b
618  * twice. This is so because of the quicklaunch infrastructure in
619  * Elementary (@ref Start), which will register a predefined prefix
620  * for possible users of the launch schema. We're not hooking into a
621  * quick launch, so this first call can't be avoided.
622  *
623  * If you ran this example from your "bindir" installation
624  * directiory, no output will emerge from these both attempts -- it
625  * will find the "magic" file there registered and set the prefixes
626  * silently. Otherwise, you could get something like:
627  @verbatim
628  WARNING: Could not determine its installed prefix for 'ELM'
629        so am falling back on the compiled in default:
630          usr
631        implied by the following:
632          bindir    = usr/lib
633          libdir    = usr/lib
634          datadir   = usr/share/elementary
635          localedir = usr/share/locale
636        Try setting the following environment variables:
637          ELM_PREFIX     - points to the base prefix of install
638        or the next 4 variables
639          ELM_BIN_DIR    - provide a specific binary directory
640          ELM_LIB_DIR    - provide a specific library directory
641          ELM_DATA_DIR   - provide a specific data directory
642          ELM_LOCALE_DIR - provide a specific locale directory
643  @endverbatim
644  * if you also didn't change those environment variables (remember
645  * they are also a valid way of communicating your prefix to the
646  * binary) - this is the scenario where it fallbacks to the paths set
647  * for compile time.
648  *
649  * Then, you can check the prefixes set on the standard output:
650  * @skip prefix was set to
651  * @until locale directory is
652  *
653  * In the fragment
654  * @skip by using this policy
655  * @until elm_win_autodel_set
656  * we demonstrate the use of Elementary policies. The policy defining
657  * under which circunstances our application should quit automatically
658  * is set to when its last window is closed (this one has just one
659  * window, though). This will save us from having to set a callback
660  * ourselves on the window, like done in @ref bg_example_01_c "this"
661  * example. Note that we need to tell the window to delete itself's
662  * object on a request to destroy the canvas coming, with
663  * elm_win_autodel_set().
664  *
665  * What follows is some boilerplate code, creating a frame with a @b
666  * button, our object of interest, and, below, widgets to change the
667  * button's behavior and exemplify the group of functions in question.
668  *
669  * @dontinclude general_funcs_example.c
670  * We enabled the focus highlight object for this window, so that you
671  * can keep track of the current focused object better:
672  * @skip elm_win_focus_highlight_enabled_set
673  * @until evas_object_show
674  * Use the tab key to navigate through the focus chain.
675  *
676  * @dontinclude general_funcs_example.c
677  * While creating the button, we exemplify how to use Elementary's
678  * finger size information to scale our UI:
679  * @skip fprintf(stdout, "Elementary
680  * @until evas_object_show
681  *
682  * @dontinclude general_funcs_example.c
683  * The first checkbox's callback is:
684  * @skip static void
685  * @until }
686  * When unsetting the checkbox, we disable the button, which will get a new
687  * decoration (greyed out) and stop receiving events. The focus chain
688  * will also ignore it.
689  *
690  * Following, there are 2 more buttons whose actions are focus/unfocus
691  * the top button, respectively:
692  * @skip focus callback
693  * @until }
694  * and
695  * @skip unfocus callback
696  * @until }
697  * Note the situations in which they won't take effect:
698  * - the button is not allowed to get focus or
699  * - the button is disabled
700  *
701  * The first restriction above you'll get by a second checkbox, whose
702  * callback is:
703  * @skip focus allow callback
704  * @until }
705  * Note that the button will still get mouse events, though.
706  *
707  * Next, there's a slider controlling the button's scale:
708  * @skip scaling callback
709  * @until }
710  *
711  * Experiment with it, so you understand the effect better. If you
712  * change its value, it will mess with the button's original size,
713  * naturally.
714  *
715  * The full code for this example can be found
716  * @ref general_functions_example_c "here".
717  */
718
719 /**
720  * @page theme_example_01 Theme - Using extensions
721  *
722  * @dontinclude theme_example_01.c
723  *
724  * Using extensions is extremely easy, discarding the part where you have to
725  * write the theme for them.
726  *
727  * In the following example we'll be creating two buttons, one to load or
728  * unload our extension theme and one to cycle around three possible styles,
729  * one of which we created.
730  *
731  * After including our one and only header we'll jump to the callback for
732  * the buttons. First one takes care of loading or unloading our extension
733  * file, relative to the default theme set (thus the @c NULL in the
734  * functions first parameter).
735  * @skipline Elementary.h
736  * @skip static void
737  * @until }
738  * @until }
739  * @until }
740  *
741  * The second button, as we said before, will just switch around different
742  * styles. In this case we have three of them. The first one is our custom
743  * style, named after something very unlikely to find in the default theme.
744  * The other two styles are the standard and one more, anchor, which exists
745  * in the default and is similar to the default, except the button vanishes
746  * when the mouse is not over it.
747  * @skip static void
748  * @until }
749  * @until }
750  *
751  * So what happens if the style switches to our custom one when the
752  * extension is loaded? Elementary falls back to the default for the
753  * widget.
754  *
755  * And the main function, simply enough, will create the window, set the
756  * buttons and their callbacks, and just to begin with our button styled
757  * we're also loading our extension at the beginning.
758  * @skip int
759  * @until ELM_MAIN
760  *
761  * In this case we wanted to easily remove extensions, but all adding an
762  * extension does is tell Elementary where else it should look for themes
763  * when it can't find them in the default theme. Another way to do this
764  * is to set the theme search order using elm_theme_set(), but this requires
765  * that the developer is careful not to override any user configuration.
766  * That can be helped by adding our theme to the end of whatver is already
767  * set, like in the following snippet.
768  * @code
769  * char buf[4096];
770  * snprintf(buf, sizeof(buf), "%s:./theme_example.edj", elme_theme_get(NULL);
771  * elm_theme_set(NULL, buf);
772  * @endcode
773  *
774  * If we were using overlays instead of extensions, the same thing applies,
775  * but the custom theme must be added to the front of the search path.
776  *
777  * In the end, we should be looking at something like this:
778  * @image html screenshots/theme_example_01.png
779  * @image latex screenshots/theme_example_01.eps
780  *
781  * That's all. Boringly simple, and the full code in one piece can be found
782  * @ref theme_example_01.c "here".
783  *
784  * And the code for our extension is @ref theme_example.edc "here".
785  *
786  * @example theme_example_01.c
787  * @example theme_example.edc
788  */
789
790 /**
791  * @page theme_example_02 Theme - Using overlays
792  *
793  * @dontinclude theme_example_02.c
794  *
795  * Overlays are like extensions in that you tell Elementary that some other
796  * theme contains the styles you need for your program. The difference is that
797  * they will be look in first, so they can override the default style of any
798  * widget.
799  *
800  * There's not much to say about them that hasn't been said in our previous
801  * example about @ref theme_example_01 "extensions", so going quickly through
802  * the code we have a function to load or unload the theme, which will be
803  * called when we click any button.
804  * @skipline Elementary.h
805  * @skip static void
806  * @until }
807  *
808  * And the main function, creating the window and adding some buttons to it.
809  * We load our theme as an overlay and nothing else. Notice there's no style
810  * set for any button there, which means they should be using the default
811  * that we override.
812  * @skip int
813  * @until ELM_MAIN
814  *
815  * That's pretty much it. The full code is @ref theme_example_02.c "here" and
816  * the definition of the theme is the same as before, and can be found in
817  * @ref theme_example.edc "here".
818  *
819  * @example theme_example_02.c
820  */
821
822  /**
823   * @page button_example_01 Button - Complete example
824   *
825   * @dontinclude button_example_01.c
826   *
827   * A button is simple, you click on it and something happens. That said,
828   * we'll go through an example to show in detail the button API less
829   * commonly used.
830   *
831   * In the end, we'll be presented with something that looks like this:
832   * @image html screenshots/button_01.png
833   * @image latex screenshots/button_01.eps
834   *
835   * The full code of the example is @ref button_example_01.c "here" and we
836   * will follow here with a rundown of it.
837   *
838   * @skip Elementary.h
839   * @until Elementary.h
840   * @skip struct
841   * @until App_Data
842   *
843   * We have several buttons to set different times for the autorepeat timeouts
844   * of the buttons that use it and a few more that we keep track of in our
845   * data struct. The mid button doesn't do much, just moves around according
846   * to what other buttons the user presses. Then four more buttons to move the
847   * central one, and we're also keeping track of the icon set in the middle
848   * button, since when this one moves, we change the icon, and when movement
849   * is finished (by releasing one of the four arrow buttons), we set back the
850   * normal icon.
851   * @skip static void
852   * @until }
853   *
854   * Keeping any of those four buttons pressed will trigger their autorepeat
855   * callback, where we move the button doing some size hint magic. To
856   * understand how that works better, refer to the @ref Box documentation.
857   * Also, the first time the function is called, we change the icon in the
858   * middle button, using elm_button_icon_unset() first to keep the reference
859   * to the previous one, so we don't need to recreate it when we are done
860   * moving it.
861   * @skip static void
862   * @until }
863   * @until size_hint_align_set
864   * @until }
865   *
866   * One more callback for the option buttons, that just sets the timeouts for
867   * the different autorepeat options.
868   *
869   * @skip static void
870   * @until }
871   * @until }
872   * @until }
873   *
874   * And the main function, which does some setting up of the buttons in boxes
875   * to make things work. Here we'll go through some snippets only.
876   *
877   * For the option buttons, it's just the button with its label and callback.
878   * @skip elm_button_add
879   * @until smart_callback_add
880   *
881   * For the ones that move the central button, we have no labels. There are
882   * icons instead, and the autorepeat option is toggled.
883   * @skip Gap: 1.0
884   * @skip elm_button_add
885   * @until data.cursors.up
886   *
887   * And just to show the mid button, which doesn't have anything special.
888   * @skip data.cursors.left
889   * @skip elm_button_add
890   * @until data.mid
891   *
892   * And we are done.
893   *
894   * @example button_example_01.c
895   */
896
897 /**
898  * @page bubble_01_example_page elm_bubble - Simple use.
899  * @dontinclude bubble_example_01.c
900  *
901  * This example shows a bubble with all fields set(label, info, content and
902  * icon) and the selected corner changing when the bubble is clicked. To be
903  * able use a bubble we need to do some setup and create a window, for this
904  * example we are going to ignore that part of the code since it isn't
905  * relevant to the bubble.
906  *
907  * To have the selected corner change in a clockwise motion we are going to
908  * use the following callback:
909  * @skip static
910  * @until }
911  * @until }
912  *
913  * Here we are creating an elm_label that is going to be used as the content
914  * for our bubble:
915  * @skipline elm_label
916  * @until show
917  * @note You could use any evas_object for this, we are using an elm_label
918  * for simplicity.
919  *
920  * Despite it's name the bubble's icon doesn't have to be an icon, it can be
921  * any evas_object. For this example we are going to make the icon a simple
922  * blue rectangle:
923  * @until show
924  *
925  * And finally we have the actual bubble creation and the setting of it's
926  * label, info and content:
927  * @until content
928  * @skipline show
929  * @note Because we didn't set a corner, the default("top_left") will be
930  * used.
931  *
932  * Now that we have our bubble all that is left is connecting the "clicked"
933  * signals to our callback:
934  * @line smart_callback
935  *
936  * This last bubble we created was very complete, so it's pertinent to show
937  * that most of that stuff is optional a bubble can be created with nothing
938  * but content:
939  * @until content
940  * @skipline show
941  *
942  * Our example will look like this:
943  * @image html screenshots/bubble_example_01.png
944  * @image latex screenshots/bubble_example_01.eps
945  *
946  * See the full source code @ref bubble_example_01.c here.
947  * @example bubble_example_01.c
948  */
949
950 /**
951  * @page box_example_01 Box - Basic API
952  *
953  * @dontinclude button_example_01.c
954  *
955  * As a special guest tonight, we have the @ref button_example_01 "simple
956  * button example". There are plenty of boxes in it, and to make the cursor
957  * buttons that moved a central one around when pressed, we had to use a
958  * variety of values for their hints.
959  *
960  * To start, let's take a look at the handling of the central button when
961  * we were moving it around. To achieve this effect without falling back to
962  * a complete manual positioning of the @c Evas_Object in our canvas, we just
963  * put it in a box and played with its alignment within it, as seen in the
964  * following snippet of the callback for the pressed buttons.
965  * @skip evas_object_size_hint_align_get
966  * @until evas_object_size_hint_align_set
967  *
968  * Not much to it. We get the current alignment of the object and change it
969  * by just a little, depending on which button was pressed, then set it
970  * again, making sure we stay within the 0.0-1.0 range so the button moves
971  * inside the space it has, instead of disappearing under the other objects.
972  *
973  * But as useful as an example as that may have been, the usual case with boxes
974  * is to set everything at the moment they are created, like we did for
975  * everything else in our main function.
976  *
977  * The entire layout of our program is made with boxes. We have one set as the
978  * resize object for the window, which means it will always be resized with
979  * the window. The weight hints set to @c EVAS_HINT_EXPAND will tell the
980  * window that the box can grow past it's minimum size, which allows resizing
981  * of it.
982  * @skip elm_main
983  * @skip elm_box_add
984  * @until evas_object_show
985  *
986  * Two more boxes, set to horizontal, hold the buttons to change the autorepeat
987  * configuration used by the buttons. We create each to take over all the
988  * available space horizontally, but we don't want them to grow vertically,
989  * so we keep that axis of the weight with 0.0. Then it gets packed in the
990  * main box.
991  * @skip box2
992  * @until evas_object_show
993  *
994  * The buttons in each of those boxes have nothing special, they are just packed
995  * in with their default values and the box will use their minimum size, as set
996  * by Elementary itself based on the label, icon, finger size and theme.
997  *
998  * But the buttons used to move the central one have a special disposition.
999  * The top one first, is placed right into the main box like our other smaller
1000  * boxes. Set to expand horizontally and not vertically, and in this case we
1001  * also tell it to fill that space, so it gets resized to take the entire
1002  * width of the window.
1003  * @skip Gap: 1.0
1004  * @skip elm_button_add
1005  * @until evas_object_show
1006  *
1007  * The bottom one will be the same, but for the other two we need to use a
1008  * second box set to take as much space as we have, so we can place our side
1009  * buttons in place and have the big empty space where the central button will
1010  * move.
1011  * @skip elm_box_add
1012  * @until evas_object_show
1013  *
1014  * Then the buttons will have their hints inverted to the other top and bottom
1015  * ones, to expand and fill vertically and keep their minimum size horizontally.
1016  * @skip elm_button_add
1017  * @until evas_object_show
1018  *
1019  * The central button takes every thing else. It will ask to be expanded in
1020  * both directions, but without filling its cell. Changing its alignment by
1021  * pressing the buttons will make it move around.
1022  * @skip elm_button_add
1023  * @until evas_object_show
1024  *
1025  * To end, the rightmost button is packed in the smaller box after the central
1026  * one, and back to the main box we have the bottom button at the end.
1027  */
1028
1029 /**
1030  * @page box_example_02 Box - Layout transitions
1031  *
1032  * @dontinclude box_example_02.c
1033  *
1034  * Setting a customized layout for a box is simple once you have the layout
1035  * function, which is just like the layout function for @c Evas_Box. The new
1036  * and fancier thing we can do with Elementary is animate the transition from
1037  * one layout to the next. We'll see now how to do that through a simple
1038  * example, while also taking a look at some of the API that was left
1039  * untouched in our @ref box_example_01 "previous example".
1040  *
1041  * @image html screenshots/box_example_02.png
1042  * @image latex screenshots/box_example_02.eps
1043  *
1044  * @skipline Elementary.h
1045  *
1046  * Our application data consists of a list of layout functions, given by
1047  * @c transitions. We'll be animating through them throughout the entire run.
1048  * The box with the stuff to move around and the last layout that was set to
1049  * make things easier in the code.
1050  * @skip typedef
1051  * @until Transitions_Data
1052  *
1053  * The box starts with three buttons, clicking on any of them will take it
1054  * out of the box without deleting the object. There are also two more buttons
1055  * outside, one to add an object to the box and the other to clear it.
1056  * This is all to show how you can interact with the items in the box, add
1057  * things and even remove them, while the transitions occur.
1058  *
1059  * One of the callback we'll be using creates a new button, asks the box for
1060  * the list of its children and if it's not empty, we add the new object after
1061  * the first one, otherwise just place at the end as it will not make any
1062  * difference.
1063  * @skip static void
1064  * @until }
1065  * @until }
1066  *
1067  * The clear button is even simpler. Everything in the box will be deleted,
1068  * leaving it empty and ready to fill it up with more stuff.
1069  * @skip static void
1070  * @until }
1071  *
1072  * And a little function to remove buttons from the box without deleting them.
1073  * This one is set for the @c clicked callback of the original buttons,
1074  * unpacking them when clicked and placing it somewhere in the screen where
1075  * they will not disturb. Once we do this, the box no longer has any control
1076  * of it, so it will be left untouched until the program ends.
1077  * @skip static void
1078  * @until }
1079  *
1080  * If we wanted, we could just call @c evas_object_del() on the object to
1081  * destroy it. In this case, no unpack is really necessary, as the box would
1082  * be notified of a child being deleted and adjust its calculations accordingly.
1083  *
1084  * The core of the program is the following function. It takes whatever
1085  * function is first on our list of layouts and together with the
1086  * @c last_layout, it creates an ::Elm_Box_Transition to use with
1087  * elm_box_layout_transition(). In here, we tell it to start from whatever
1088  * layout we last set, end with the one that was at the top of the list and
1089  * when everything is finished, call us back so we can create another
1090  * transition. Finally, move the new layout to the end of the list so we
1091  * can continue running through them until the program ends.
1092  * @skip static void
1093  * @until }
1094  *
1095  * The main function doesn't have antyhing special. Creation of box, initial
1096  * buttons and some callback setting. The only part worth mentioning is the
1097  * initialization of our application data.
1098  * @skip tdata.box
1099  * @until evas_object_box_layout_stack
1100  *
1101  * We have a simple static variable, set the box, the first layout we are
1102  * using as last and create the list with the different functions to go
1103  * through.
1104  *
1105  * And in the end, we set the first layout and call the same function we went
1106  * through before to start the run of transitions.
1107  * @until _test_box_transition_change
1108  *
1109  * For the full code, follow @ref box_example_02.c "here".
1110  *
1111  * @example box_example_02.c
1112  */
1113
1114 /**
1115  * @page calendar_example_01 Calendar - Simple creation.
1116  * @dontinclude calendar_example_01.c
1117  *
1118  * As a first example, let's just display a calendar in our window,
1119  * explaining all steps required to do so.
1120  *
1121  * First you should declare objects we intend to use:
1122  * @skipline Evas_Object
1123  *
1124  * Then a window is created, a title is set and its set to be autodeleted.
1125  * More details can be found on windows examples:
1126  * @until elm_win_autodel
1127  *
1128  * Next a simple background is placed on our windows. More details on
1129  * @ref bg_01_example_page:
1130  * @until evas_object_show(bg)
1131  *
1132  * Now, the exciting part, let's add the calendar with elm_calendar_add(),
1133  * passing our window object as parent.
1134  * @until evas_object_show(cal);
1135  *
1136  * To conclude our example, we should show the window and run elm mainloop:
1137  * @until ELM_MAIN
1138  *
1139  * Our example will look like this:
1140  * @image html screenshots/calendar_example_01.png
1141  * @image latex screenshots/calendar_example_01.eps
1142  *
1143  * See the full source code @ref calendar_example_01.c here.
1144  * @example calendar_example_01.c
1145  */
1146
1147 /**
1148  * @page calendar_example_02 Calendar - Layout strings formatting.
1149  * @dontinclude calendar_example_02.c
1150  *
1151  * In this simple example, we'll explain how to format the label displaying
1152  * month and year, and also set weekday names.
1153  *
1154  * To format month and year label, we need to create a callback function
1155  * to create a string given the selected time, declared under a
1156  * <tt> struct tm </tt>.
1157  *
1158  * <tt> struct tm </tt>, declared on @c time.h, is a structure composed by
1159  * nine integers:
1160  * @li tm_sec   seconds [0,59]
1161  * @li tm_min   minutes [0,59]
1162  * @li tm_hour  hour [0,23]
1163  * @li tm_mday  day of month [1,31]
1164  * @li tm_mon   month of year [0,11]
1165  * @li tm_year  years since 1900
1166  * @li tm_wday  day of week [0,6] (Sunday = 0)
1167  * @li tm_yday  day of year [0,365]
1168  * @li tm_isdst daylight savings flag
1169  * @note glib version has 2 additional fields.
1170  *
1171  * For our function, only stuff that matters are tm_mon and tm_year.
1172  * But we don't need to access it directly, since there are nice functions
1173  * to format date and time, as @c strftime.
1174  * We will get abbreviated month (%b) and year (%y) (check strftime manpage
1175  * for more) in our example:
1176  * @skipline static char
1177  * @until }
1178  *
1179  * We need to alloc the string to be returned, and calendar widget will
1180  * free it when it's not needed, what is done by @c strdup.
1181  * So let's register our callback to calendar object:
1182  * @skipline elm_calendar_format_function_set
1183  *
1184  * To set weekday names, we should declare them as an array of strings:
1185  * @dontinclude calendar_example_02.c
1186  * @skipline weekdays
1187  * @until }
1188  *
1189  * And finally set them to calendar:
1190  * skipline weekdays_names_set
1191  *
1192  * Our example will look like this:
1193  * @image html screenshots/calendar_example_02.png
1194  * @image latex screenshots/calendar_example_02.eps
1195  *
1196  * See the full source code @ref calendar_example_02.c here.
1197  * @example calendar_example_02.c
1198  */
1199
1200 /**
1201  * @page calendar_example_03 Calendar - Years restrictions.
1202  * @dontinclude calendar_example_03.c
1203  *
1204  * This example explains how to set max and min year to be displayed
1205  * by a calendar object. This means that user won't be able to
1206  * see or select a date before and after selected years.
1207  * By default, limits are 1902 and maximun value will depends
1208  * on platform architecture (year 2037 for 32 bits); You can
1209  * read more about time functions on @c ctime manpage.
1210  *
1211  * Straigh to the point, to set it is enough to call
1212  * elm_calendar_min_max_year_set(). First value is minimun year, second
1213  * is maximum. If first value is negative, it won't apply limit for min
1214  * year, if the second one is negative, won't apply for max year.
1215  * Setting both to negative value will clear limits (default state):
1216  * @skipline elm_calendar_min_max_year_set
1217  *
1218  * Our example will look like this:
1219  * @image html screenshots/calendar_example_03.png
1220  * @image latex screenshots/calendar_example_03.eps
1221  *
1222  * See the full source code @ref calendar_example_03.c here.
1223  * @example calendar_example_03.c
1224  */
1225
1226 /**
1227  * @page calendar_example_04 Calendar - Days selection.
1228  * @dontinclude calendar_example_04.c
1229  *
1230  * It's possible to disable date selection and to select a date
1231  * from your program, and that's what we'll see on this example.
1232  *
1233  * If isn't required that users could select a day on calendar,
1234  * only interacting going through months, disabling days selection
1235  * could be a good idea to avoid confusion. For that:
1236  * @skipline elm_calendar_day_selection_enabled_set
1237  *
1238  * Also, regarding days selection, you could be interested to set a
1239  * date to be highlighted on calendar from your code, maybe when
1240  * a specific event happens, or after calendar creation. Let's select
1241  * two days from current day:
1242  * @dontinclude calendar_example_04.c
1243  * @skipline SECS_DAY
1244  * @skipline current_time
1245  * @until elm_calendar_selected_time_set
1246  *
1247  * Our example will look like this:
1248  * @image html screenshots/calendar_example_04.png
1249  * @image latex screenshots/calendar_example_04.eps
1250  *
1251  * See the full source code @ref calendar_example_04.c here.
1252  * @example calendar_example_04.c
1253  */
1254
1255 /**
1256  * @page calendar_example_05 Calendar - Signal callback and getters.
1257  * @dontinclude calendar_example_05.c
1258  *
1259  * Most of setters explained on previous examples have associated getters.
1260  * That's the subject of this example. We'll add a callback to display
1261  * all calendar information every time user interacts with the calendar.
1262  *
1263  * Let's check our callback function:
1264  * @skipline static void
1265  * @until double interval;
1266  *
1267  * To get selected day, we need to call elm_calendar_selected_time_get(),
1268  * but to assure nothing wrong happened, we must check for function return.
1269  * It'll return @c EINA_FALSE if fail. Otherwise we can use time set to
1270  * our structure @p stime.
1271  * @skipline elm_calendar_selected_time_get
1272  * @until return
1273  *
1274  * Next we'll get information from calendar and place on declared vars:
1275  * @skipline interval
1276  * @until elm_calendar_weekdays_names_get
1277  *
1278  * The only tricky part is that last line gets an array of strings
1279  * (char arrays), one for each weekday.
1280  *
1281  * Then we can simple print that to stdin:
1282  * @skipline printf
1283  * @until }
1284  *
1285  * <tt> struct tm </tt> is declared on @c time.h. You can check @c ctime
1286  * manpage to read about it.
1287  *
1288  * To register this callback, that will be called every time user selects
1289  * a day or goes to next or previous month, just add a callback for signal
1290  * @b changed.
1291  * @skipline evas_object_smart_callback_add
1292  *
1293  * Our example will look like this:
1294  * @image html screenshots/calendar_example_05.png
1295  * @image latex screenshots/calendar_example_05.eps
1296  *
1297  * See the full source code @ref calendar_example_05.c here.
1298  * @example calendar_example_05.c
1299  */
1300
1301 /**
1302  * @page calendar_example_06 Calendar - Calendar marks.
1303  * @dontinclude calendar_example_06.c
1304  *
1305  * On this example marks management will be explained. Functions
1306  * elm_calendar_mark_add(), elm_calendar_mark_del() and
1307  * elm_calendar_marks_clear() will be covered.
1308  *
1309  * To add a mark, will be required to choose three things:
1310  * @li mark style
1311  * @li mark date, or start date if it will be repeated
1312  * @li mark periodicity
1313  *
1314  * Style defines the kind of mark will be displayed over marked day,
1315  * on caledar. Default theme supports @b holiday and @b checked.
1316  * If more is required, is possible to set a new theme to calendar
1317  * widget using elm_object_style_set(), and use
1318  * the signal that will be used by such marks.
1319  *
1320  * Date is a <tt> struct tm </tt>, as defined by @c time.h. More can
1321  * be read on @c ctime manpage.
1322  * If a date relative from current is required, this struct can be set
1323  * as:
1324  * @skipline current_time
1325  * @until localtime_r
1326  *
1327  * Or if it's an absolute date, you can just declare the struct like:
1328  * @dontinclude calendar_example_06.c
1329  * @skipline sunday
1330  * @until christmas.tm_mon
1331  *
1332  * Periodicity is how frequently the mark will be displayed over the
1333  * calendar.  Can be a unique mark (that don't repeat), or it can repeat
1334  * daily, weekly, monthly or annually. It's enumerated by
1335  * @c Elm_Calendar_Mark_Repeat.
1336  *
1337  * So let's add some marks to our calendar. We will add christmas holiday,
1338  * set Sundays as holidays, and check current day and day after that.
1339  * @dontinclude calendar_example_06.c
1340  * @skipline sunday
1341  * @until christmas.tm_mon
1342  * @skipline current_time
1343  * @until ELM_CALENDAR_WEEKLY
1344  *
1345  * We kept the return of first mark add, because we don't really won't it
1346  * to be checked, so let's remove it:
1347  * @skipline elm_calendar_mark_del
1348  *
1349  * After all marks are added and removed, is required to draw them:
1350  * @skipline elm_calendar_marks_draw
1351  *
1352  * Finally, to clear all marks, let's set a callback for our button:
1353  * @skipline elm_button_add
1354  * @until evas_object_show(bt);
1355  *
1356  * This callback will receive our calendar object, and should clear it:
1357  * @dontinclude calendar_example_06.c
1358  * @skipline static
1359  * @until }
1360  * @note Remember to draw marks after clear the calendar.
1361  *
1362  * Our example will look like this:
1363  * @image html screenshots/calendar_example_06.png
1364  * @image latex screenshots/calendar_example_06.eps
1365  *
1366  * See the full source code @ref calendar_example_06.c here.
1367  * @example calendar_example_06.c
1368  */
1369
1370 /**
1371  * @page clock_example Clock widget example
1372  *
1373  * This code places five Elementary clock widgets on a window, each of
1374  * them exemplifying a part of the widget's API.
1375  *
1376  * The first of them is the pristine clock:
1377  * @dontinclude clock_example.c
1378  * @skip pristine
1379  * @until evas_object_show
1380  * As you see, the defaults for a clock are:
1381  * - military time
1382  * - no seconds shown
1383  *
1384  * For am/pm time, see the second clock:
1385  * @dontinclude clock_example.c
1386  * @skip am/pm
1387  * @until evas_object_show
1388  *
1389  * The third one will show the seconds digits, which will flip in
1390  * synchrony with system time. Note, besides, that the time itself is
1391  * @b different from the system's -- it was customly set with
1392  * elm_clock_time_set():
1393  * @dontinclude clock_example.c
1394  * @skip with seconds
1395  * @until evas_object_show
1396  *
1397  * In both fourth and fifth ones, we turn on the <b>edition
1398  * mode</b>. See how you can change each of the sheets on it, and be
1399  * sure to try holding the mouse pressed over one of the sheet
1400  * arrows. The forth one also starts with a custom time set:
1401  * @dontinclude clock_example.c
1402  * @skip in edition
1403  * @until evas_object_show
1404  *
1405  * The fifth, besides editable, has only the time @b units editable,
1406  * for hours, minutes and seconds. This exemplifies
1407  * elm_clock_digit_edit_set():
1408  * @dontinclude clock_example.c
1409  * @skip but only
1410  * @until evas_object_show
1411  *
1412  * See the full @ref clock_example.c "example", whose window should
1413  * look like this picture:
1414  * @image html screenshots/clock_example.png
1415  * @image latex screenshots/clock_example.eps
1416  *
1417  * @example clock_example.c
1418  */
1419
1420 /**
1421  * @page flipselector_example Flip selector widget example
1422  *
1423  * This code places an Elementary flip selector widget on a window,
1424  * along with two buttons trigerring actions on it (though its API).
1425  *
1426  * The selector is being populated with the following items:
1427  * @dontinclude flipselector_example.c
1428  * @skip lbl[]
1429  * @until ;
1430  *
1431  * Next, we create it, populating it with those items and registering
1432  * two (smart) callbacks on it:
1433  * @dontinclude flipselector_example.c
1434  * @skip fp = elm_flipselector_add
1435  * @until object_show
1436  *
1437  * Those two callbacks will take place whenever one of those smart
1438  * events occur, and they will just print something to @c stdout:
1439  * @dontinclude flipselector_example.c
1440  * @skip underflow callback
1441  * @until static void
1442  * Flip the sheets on the widget while looking at the items list, in
1443  * the source code, and you'll get the idea of those events.
1444  *
1445  * The two buttons below the flip selector will take the actions
1446  * described in their labels:
1447  * @dontinclude flipselector_example.c
1448  * @skip bt = elm_button_add
1449  * @until callback_add(win
1450  *
1451  * @dontinclude flipselector_example.c
1452  * @skip unselect the item
1453  * @until underflow
1454  *
1455  * Click on them to exercise those flip selector API calls. To
1456  * interact with the other parts of this API, there's a command line
1457  * interface, whose help string can be asked for with the 'h' key:
1458  * @dontinclude flipselector_example.c
1459  * @skip commands
1460  * @until ;
1461  *
1462  * The 'n' and 'p' keys will exemplify elm_flipselector_flip_next()
1463  * and elm_flipselector_flip_prev(), respectively. 'f' and 'l' account
1464  * for elm_flipselector_first_item_get() and
1465  * elm_flipselector_last_item_get(), respectively. Finally, 's' will
1466  * issue elm_flipselector_selected_item_get() on our example flip
1467  * selector widget.
1468  *
1469  * See the full @ref flipselector_example.c "example", whose window should
1470  * look like this picture:
1471  * @image html screenshots/flipselector_example.png
1472  * @image latex screenshots/flipselector_example.eps
1473  *
1474  * @example flipselector_example.c
1475  */
1476
1477 /**
1478  * @page fileselector_example File selector widget example
1479  *
1480  * This code places two Elementary file selector widgets on a window.
1481  * The one on the left is layouting file system items in a @b list,
1482  * while the the other is layouting them in a @b grid.
1483  *
1484  * The one having the majority of hooks of interest is on the left,
1485  * which we create as follows:
1486  * @dontinclude fileselector_example.c
1487  * @skip first file selector
1488  * @until object_show
1489  *
1490  * Note that we enable custom edition of file/directory selection, via
1491  * the text entry it has on its bottom, via
1492  * elm_fileselector_is_save_set(). It starts with the list view, which
1493  * is the default, and we make it not expandable in place
1494  * (elm_fileselector_expandable_set()), so that it replaces its view's
1495  * contents with the current directory's entries each time one
1496  * navigates to a different folder.  For both of file selectors we are
1497  * starting to list the contents found in the @c "/tmp" directory
1498  * (elm_fileselector_path_set()).
1499  *
1500  * Note the code setting it to "grid mode" and observe the differences
1501  * in the file selector's views, in the example. We also hide the
1502  * second file selector's Ok/Cancel buttons -- since it's there just
1503  * to show the grid view (and navigation) -- via
1504  * elm_fileselector_buttons_ok_cancel_set().
1505  *
1506  * The @c "done" event, which triggers the callback below
1507  * @dontinclude fileselector_example.c
1508  * @skip 'done' cb
1509  * @until }
1510  * will be called at the time one clicks the "Ok"/"Cancel" buttons of
1511  * the file selector (on the left). Note that it will print the path
1512  * to the current selection, if any.
1513  *
1514  * The @c "selected" event, which triggers the callback below
1515  * @dontinclude fileselector_example.c
1516  * @skip bt = 'selected' cb
1517  * @until }
1518  * takes place when one selects a file (if the file selector is @b not
1519  * under folders-only mode) or when one selects a folder (when in
1520  * folders-only mode). Experiment it by selecting different file
1521  * system entries.
1522  *
1523  * What comes next is the code creating the three check boxes and two
1524  * buttons below the file selector in the right. They will exercise a
1525  * bunch of functions on the file selector's API, for the instance on
1526  * the left. Experiment with them, specially the buttons, to get the
1527  * difference between elm_fileselector_path_get() and
1528  * elm_fileselector_selected_get().
1529  *
1530  * Finally, there's the code adding the second file selector, on the
1531  * right:
1532  * @dontinclude fileselector_example.c
1533  * @skip second file selector
1534  * @until object_show
1535  *
1536  * Pay attention to the code setting it to "grid mode" and observe the
1537  * differences in the file selector's views, in the example. We also
1538  * hide the second file selector's Ok/Cancel buttons -- since it's
1539  * there just to show the grid view (and navigation) -- via
1540  * elm_fileselector_buttons_ok_cancel_set().
1541  *
1542  * See the full @ref fileselector_example.c "example", whose window
1543  * should look like this picture:
1544  * @image html screenshots/fileselector_example.png
1545  * @image latex screenshots/fileselector_example.eps
1546  *
1547  * @example fileselector_example.c
1548  */
1549
1550 /**
1551  * @page tutorial_hover Hover example
1552  * @dontinclude hover_example_01.c
1553  *
1554  * On this example we are going to have a button that when clicked will show our
1555  * hover widget, this hover will have content set on it's left, top, right and
1556  * middle positions. In the middle position we are placing a button that when
1557  * clicked will hide the hover. We are also going to use a non-default theme
1558  * for our hover. We won't explain the functioning of button for that see @ref
1559  * Button.
1560  *
1561  * We start our example with a couple of callbacks that show and hide the data
1562  * they're given(which we'll see later on is the hover widget):
1563  * @skip static
1564  * @until }
1565  * @until }
1566  *
1567  * In our main function we'll do some initialization and then create 3
1568  * rectangles, one red, one green and one blue to use in our hover. We'll also
1569  * create the 2 buttons that will show and hide the hover:
1570  * @until show(bt2)
1571  *
1572  * With all of that squared away we can now get to the heart of the matter,
1573  * creating our hover widget, which is easy as pie:
1574  * @until hover
1575  *
1576  * Having created our hover we now need to set the parent and target. Which if
1577  * you recall from the function documentations are going to tell the hover which
1578  * area it should cover and where it should be centered:
1579  * @until bt
1580  *
1581  * Now we set the theme for our hover. We're using the popout theme which gives
1582  * our contents a white background and causes their appearance to be animated:
1583  * @until popout
1584  *
1585  * And finally we set the content for our positions:
1586  * @until bt2
1587  *
1588  * So far so good? Great 'cause that's all there is too it, what is left now is
1589  * just connecting our buttons to the callbacks we defined at the beginning of
1590  * the example and run the main loop:
1591  * @until ELM_MAIN
1592  *
1593  * Our example will initially look like this:
1594  * @image html screenshots/hover_example_01.png
1595  * @image latex screenshots/hover_example_01.eps
1596  *
1597  * And after you click the "Show hover" button it will look like this:
1598  * @image html screenshots/hover_example_01_a.png
1599  * @image latex screenshots/hover_example_01_a.eps
1600  *
1601  * @example hover_example_01.c
1602  */
1603
1604 /**
1605   * @page tutorial_flip Flip example
1606   * @dontinclude flip_example_01.c
1607   *
1608   * This example will show a flip with two rectangles on it(one blue, one
1609   * green). Our example will allow the user to choose the animation the flip
1610   * uses and to interact with it. To allow the user to choose the interaction
1611   * mode we use radio buttons, we will however not explain them, if you would
1612   * like to know more about radio buttons see @ref radio.
1613   *
1614   * We start our example with the usual setup and then create the 2 rectangles
1615   * we will use in our flip:
1616   * @until show(rect2)
1617   *
1618   * The next thing to do is to create our flip and set it's front and back
1619   * content:
1620   * @until show
1621   *
1622   * The next thing we do is set the interaction mode(which the user can later
1623   * change) to the page animation:
1624   * @until PAGE
1625   *
1626   * Setting a interaction mode however is not sufficient, we also need to
1627   * choose which directions we allow interaction from, for this example we
1628   * will use all of them:
1629   * @until RIGHT
1630   *
1631   * We are also going to set the hitsize to the entire flip(in all directions)
1632   * to make our flip very easy to interact with:
1633   * @until RIGHT
1634   *
1635   * After that we create our radio buttons and start the main loop:
1636   * @until ELM_MAIN()
1637   *
1638   * When the user clicks a radio button a function that changes the
1639   * interaction mode and animates the flip is called:
1640   * @until }
1641   * @note The elm_flip_go() call here serves no purpose other than to
1642   * ilustrate that it's possible to animate the flip programmatically.
1643   *
1644   * Our example will look like this:
1645   * @image html screenshots/flip_example_01.png
1646   * @image latex screenshots/flip_example_01.eps
1647   * @note Since this is an animated example the screenshot doesn't do it
1648   * justice, it is a good idea to compile it and see the animations.
1649   *
1650   * @example flip_example_01.c
1651   */
1652
1653  /**
1654   * @page tutorial_label Label example
1655   * @dontinclude label_example_01.c
1656   *
1657   * In this example we are going to create 6 labels, set some properties on
1658   * them and see what changes in appearance those properties cause.
1659   *
1660   * We start with the setup code that by now you should be familiar with:
1661   * @until show(bg)
1662   *
1663   * For our first label we have a moderately long text(that doesn't fit in the
1664   * label's width) so we will make it a sliding label. Since the text isn't
1665   * too long we don't need the animation to be very long, 3 seconds should
1666   * give us a nice speed:
1667   * @until show(label
1668   *
1669   * For our second label we have the same text, but this time we aren't going
1670   * to have it slide, we're going to ellipsize it. Because we ask our label
1671   * widget to ellipsize the text it will first diminsh the fontsize so that it
1672   * can show as much of the text as possible:
1673   * @until show(label
1674   *
1675   * For the third label we are going to ellipsize the text again, however this
1676   * time to make sure the fontsize isn't diminshed we will set a line wrap.
1677   * The wrap won't actually cause a line break because we set the label to
1678   * ellipsize:
1679   * @until show(label
1680   *
1681   * For our fourth label we will set line wrapping but won't set ellipsis, so
1682   * that our text will indeed be wrapped instead of ellipsized. For this label
1683   * we choose character wrap:
1684   * @until show(label
1685   *
1686   * Just two more, for our fifth label we do the same as for the fourth
1687   * except we set the wrap to word:
1688   * @until show(label
1689   *
1690   * And last but not least for our sixth label we set the style to "marker" and
1691   * the color to red(the default color is white which would be hard to see on
1692   * our white background):
1693   * @until show(label
1694   *
1695   * Our example will look like this:
1696   * @image html screenshots/label_example_01.png
1697   * @image latex screenshots/label_example_01.eps
1698   *
1699   * @example label_example_01.c
1700   */
1701
1702  /**
1703   * @page tutorial_image Image example
1704   * @dontinclude image_example_01.c
1705   *
1706   * This example is as simple as possible. An image object will be added to the
1707   * window over a white background, and set to be resizeable together with the
1708   * window. All the options set through the example will affect the behavior of
1709   * this image.
1710   *
1711   * We start with the code for creating a window and its background, and also
1712   * add the code to write the path to the image that will be loaded:
1713   *
1714   * @skip int
1715   * @until snprintf
1716   *
1717   * Now we create the image object, and set that file to be loaded:
1718   *
1719   * @until }
1720   *
1721   * We can now go setting our options.
1722   *
1723   * elm_image_no_scale_set() is used just to set this value to true (we
1724   * don't want to scale our image anyway, just resize it).
1725   *
1726   * elm_image_scale_set() is used to allow the image to be resized to a size
1727   * smaller than the original one, but not to a size bigger than it.
1728   *
1729   * elm_elm_image_smooth_set() will disable the smooth scaling, so the scale
1730   * algorithm used to scale the image to the new object size is going to be
1731   * faster, but with a lower quality.
1732   *
1733   * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
1734   * diagonal.
1735   *
1736   * elm_image_aspect_ratio_retained_set() is used to keep the original aspect
1737   * ratio of the image, even when the window is resized to another aspect ratio.
1738   *
1739   * elm_image_fill_outside_set() is used to ensure that the image will fill the
1740   * entire area available to it, even if keeping the aspect ratio. The image
1741   * will overflow its width or height (any of them that is necessary) to the
1742   * object area, instead of resizing the image down until it can fit entirely in
1743   * this area.
1744   *
1745   * elm_image_editable_set() is used just to cover the API, but won't affect
1746   * this example since we are not using any copy & paste property.
1747   *
1748   * This is the code for setting these options:
1749   *
1750   * @until editable
1751   *
1752   * Now some last touches in our object size hints, window and background, to
1753   * display this image properly:
1754   *
1755   * @until ELM_MAIN
1756   *
1757   * This example will look like this:
1758   *
1759   * @image html screenshots/image_example_01.png
1760   * @image latex screenshots/image_example_01.eps
1761   *
1762   * @example image_example_01.c
1763   */
1764
1765 /**
1766  * @page tutorial_hoversel Hoversel example
1767  * @dontinclude hoversel_example_01.c
1768  *
1769  * In this example we will create a hoversel with 3 items, one with a label but
1770  * no icon and two with both a label and an icon. Every item that is clicked
1771  * will be deleted, but everytime the hoversel is activated we will also add an
1772  * item. In addition our first item will print all items when clicked and our
1773  * third item will clear all items in the hoversel.
1774  *
1775  * We will start with the normal creation of window stuff:
1776  * @until show(bg)
1777  *
1778  * Next we will create a red rectangle to use as the icon of our hoversel:
1779  * @until show
1780  *
1781  * And now we create our hoversel and set some of it's properties. We set @p win
1782  * as its parent, ask it to not be horizontal(be vertical) and give it a label
1783  * and icon:
1784  * @until icon_set
1785  *
1786  * Next we will add our three items, setting a callback to be called for the
1787  * first and third:
1788  * @until _rm_items
1789  *
1790  * We also set a pair of callbacks to be called whenever any item is selected or
1791  * when the hoversel is activated:
1792  * @until clicked
1793  *
1794  * And then ask that our hoversel be shown and run the main loop:
1795  * @until ELM_MAIN
1796  *
1797  * We now have the callback for our first item which prints all items in the
1798  * hoversel:
1799  * @until }
1800  *
1801  * Next we have the callback for our third item which removes all items from the
1802  * hoversel:
1803  * @until }
1804  *
1805  * Next we have the callback that is called whenever an item is clicked and
1806  * deletes that item:
1807  * @until }
1808  *
1809  * And the callback that is called when the hoversel is activated and adds an
1810  * item to the hoversel. Note that since we allocate memory for the item we need
1811  * to know when the item dies so we can free that memory:
1812  * @until }
1813  *
1814  * And finally the callback that frees the memory we allocated for items created
1815  * in the @p _add_item callback:
1816  * @until }
1817  *
1818  * Our example will initially look like this:
1819  * @image html screenshots/hoversel_example_01.png
1820  * @image latex screenshots/hoversel_example_01.eps
1821  *
1822  * And when the hoversel is clicked it will look like this:
1823  * @image html screenshots/hoversel_example_01_a.png
1824  * @image latex screenshots/hoversel_example_01_a.eps
1825  *
1826  * @example hoversel_example_01.c
1827  */
1828
1829 /**
1830  * @page bg_example_01_c bg_example_01.c
1831  * @include bg_example_01.c
1832  * @example bg_example_01.c
1833  */
1834
1835 /**
1836  * @page bg_example_02_c bg_example_02.c
1837  * @include bg_example_02.c
1838  * @example bg_example_02.c
1839  */
1840
1841 /**
1842  * @page bg_example_03_c bg_example_03.c
1843  * @include bg_example_03.c
1844  * @example bg_example_03.c
1845  */
1846
1847 /**
1848  * @page actionslider_example_01 Actionslider example
1849  * @include actionslider_example_01.c
1850  * @example actionslider_example_01.c
1851  */
1852
1853 /**
1854  * @page animator_example_01_c Animator example 01
1855  * @include animator_example_01.c
1856  * @example animator_example_01.c
1857  */
1858
1859 /**
1860  * @page transit_example_01_c Transit example 1
1861  * @include transit_example_01.c
1862  * @example transit_example_01.c
1863  */
1864
1865 /**
1866  * @page transit_example_02_c Transit example 2
1867  * @include transit_example_02.c
1868  * @example transit_example_02.c
1869  */
1870
1871 /**
1872  * @page general_functions_example_c General (top-level) functions example
1873  * @include general_funcs_example.c
1874  * @example general_funcs_example.c
1875  */