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