+ * @page gengrid_example Gengrid widget example
+ *
+ * This application is a thorough exercise on the gengrid widget's
+ * API. We place an Elementary gengrid widget on a window, with
+ * various knobs below its viewport, each one acting on it somehow.
+ *
+ * The code's relevant part begins at the grid's creation. After
+ * instantiating it, we set its items sizes, so that we don't end with
+ * items one finger size wide, only. We're setting them to fat, 150
+ * pixel wide ones, for this example. We give it some size hints, not
+ * to be discussed in this context and, than, we register a callback
+ * on one of its smart events -- the one coming each time an item gets
+ * doubly clicked. There, we just print the item handle's value.
+ * @dontinclude gengrid_example.c
+ * @skip grid = elm_gengrid_add
+ * @until evas_object_sho
+ * @dontinclude gengrid_example.c
+ * @skip item double click callback
+ * @until }
+ *
+ * Before we actually start to deal with the items API, let's show
+ * some things items will be using throughout all the code. The first
+ * of them is a struct to be used as item data, for all of them:
+ * @dontinclude gengrid_example.c
+ * @skip typedef struct
+ * @until Item;
+ *
+ * That path will be used to index an image, to be swallowed into one
+ * of the item's icon spots. The imagens themselves are distributed
+ * with Elementary:
+ * @dontinclude gengrid_example.c
+ * @skip static const char *imgs
+ * @until ;
+ *
+ * We also have an (unique) gengrid item class we'll be using for
+ * items in the example:
+ * @dontinclude gengrid_example.c
+ * @skip static Elm_Gengrid_Item_Class
+ * @until static Elm_Gengrid_Item_Class
+ * @dontinclude gengrid_example.c
+ * @skip item_style =
+ * @until _grid_del
+ *
+ * As you see, our items will follow the default theme on gengrid
+ * items. For the label fetching code, we return a string composed of
+ * the item's image path:
+ * @dontinclude gengrid_example.c
+ * @skip label fetching callback
+ * @until }
+ *
+ * For item icons, we'll be populating the item default theme's two
+ * icon spots, @c "elm.swallow.icon" and @c "elm.swallow.end". The
+ * former will receive one of the images in our list (in the form of
+ * a @ref bg_02_example_page "background"), while the latter will be
+ * a check widget. Note that we prevent the check to propagate click
+ * events, so that the user can toggle its state without messing with
+ * the respective item's selection in the grid:
+ * @dontinclude gengrid_example.c
+ * @skip icon fetching callback
+ * @until return NULL
+ * @until }
+ *
+ * As the default gengrid item's theme does not have parts
+ * implementing item states, we'll be just returning false for every
+ * item state:
+ * @dontinclude gengrid_example.c
+ * @skip state fetching callback
+ * @until }
+ *
+ * Finally, the deletion callback on gengrid items takes care of
+ * freeing the item's label string and its data struct:
+ * @dontinclude gengrid_example.c
+ * @skip deletion callback
+ * @until }
+ *
+ * Let's move to item insertion/deletion knobs, them. They are four
+ * buttons, above the grid's viewport, namely
+ * - "Append" (to append an item to the grid),
+ * - "Prepend" (to prepend an item to the grid),
+ * - "Insert before" (to insert an item before the selection, on the
+ * grid),
+ * - "Insert after" (to insert an item after the selection, on the
+ * grid),
+ * - "Clear" (to delete all items in the grid),
+ * - "Bring in 1st" (to make the 1st item visible, by scrolling),
+ * - "Show last" (to directly show the last item),
+ * .
+ * which are displaced and declared in that order. We're not dealing
+ * with the buttons' creation code (see @ref button_example_01
+ * "a button example", for more details on it), but with their @c
+ * "clicked" registered callbacks. For all of them, the grid's handle
+ * is passed as @c data. The ones creating new items use a common
+ * code, which just gives a new @c Example_Item struct, with @c path
+ * filled with a random image in our images list:
+ * @dontinclude gengrid_example.c
+ * @skip new item with random path
+ * @until }
+ *
+ * Moreover, that ones will set a common function to be issued on the
+ * selection of the items. There, we print the item handle's value,
+ * along with the callback function data. The latter will be @c NULL,
+ * always, because it's what we pass when adding all icons. By using
+ * elm_object_item_data_get(), we can have the item data back and,
+ * with that, we're priting the item's path string. Finally, we
+ * exemplify elm_gengrid_item_pos_get(), printing the item's position
+ * in the grid:
+ * @dontinclude gengrid_example.c
+ * @skip item selection callback
+ * @until }
+ *
+ * The appending button will exercise elm_gengrid_item_append(), simply:
+ * @dontinclude gengrid_example.c
+ * @skip append an item
+ * @until }
+ *
+ * The prepending, naturally, is analogous, but exercising
+ * elm_gengrid_item_prepend(), on its turn. The "Insert before" one
+ * will expect an item to be selected in the grid, so that it will
+ * insert a new item just before it:
+ * @dontinclude gengrid_example.c
+ * @skip "insert before" callback
+ * @until }
+ *
+ * The "Insert after" is analogous, just using
+ * elm_gengrid_item_insert_after(), instead. The "Clear" button will,
+ * as expected, just issue elm_gengrid_clear():
+ * @dontinclude gengrid_example.c
+ * @skip delete items
+ * @until }
+ *
+ * The "Bring in 1st" button is there exercise two gengrid functions
+ * -- elm_gengrid_first_item_get() and elm_gengrid_item_bring_in().
+ * With the former, we get a handle to the first item and, with the
+ * latter, you'll see that the widget animatedly scrolls its view
+ * until we can see that item:
+ * @dontinclude gengrid_example.c
+ * @skip bring in 1st item
+ * @until }
+ *
+ * The "Show last", in its turn, will use elm_gengrid_last_item_get()
+ * and elm_gengrid_item_show(). The latter differs from
+ * elm_gengrid_item_bring_in() in that it immediately replaces the
+ * contents of the grid's viewport with the region containing the item
+ * in question:
+ * @dontinclude gengrid_example.c
+ * @skip show last item
+ * @until }
+ *
+ * To change the grid's cell (items) size, we've placed a spinner,
+ * which has the following @c "changed" smart callback:
+ * @dontinclude gengrid_example.c
+ * @skip change items' size
+ * @until }
+ *
+ * Experiment with it and see how the items are affected. The "Disable
+ * item" button will, as the name says, disable the currently selected
+ * item:
+ * @dontinclude gengrid_example.c
+ * @skip disable selected item
+ * @until }
+ * Note that we also make use of elm_gengrid_item_selected_set(),
+ * there, thus making the item unselected before we actually disable
+ * it.
+ *
+ * To toggle between horizontal and vertical layouting modes on the
+ * grid, use the "Horizontal mode" check, which will call the
+ * respective API function on the grid:
+ * @dontinclude gengrid_example.c
+ * @skip change layouting mode
+ * @until }
+ *
+ * If you toggle the check right after that one, "Always select",
+ * you'll notice all subsequent clicks on the @b same grid item will
+ * still issue the selection callback on it, what is different from
+ * when it's not checked. This is the
+ * elm_gengrid_always_select_mode_set() behavior:
+ * @dontinclude gengrid_example.c
+ * @skip "always select" callback
+ * @until }
+ *
+ * One more check follows, "Bouncing", which will turn on/off the
+ * bouncing animations on the grid, when one scrolls past its
+ * borders. Experiment with scrolling the grid to get the idea, having
+ * it turned on and off:
+ * @dontinclude gengrid_example.c
+ * @skip "bouncing mode" callback
+ * @until }
+ *
+ * The next two checks will affect items selection on the grid. The
+ * first, "Multi-selection", will make it possible to select more the
+ * one item on the grid. Because it wouldn't make sense to fetch for
+ * an unique selected item on this case, we also disable two of the
+ * buttons, which insert items relatively, if multi-selection is on:
+ * @dontinclude gengrid_example.c
+ * @skip multi-selection callback
+ * @until }
+ *
+ * Note that we also @b unselect all items in the grid, when returning
+ * from multi-selection mode, making use of
+ * elm_gengrid_item_selected_set().
+ *
+ * The second check acting on selection, "No selection", is just what
+ * its name depicts -- no selection will be allowed anymore, on the
+ * grid, while it's on. Check it out for yourself, interacting with
+ * the program:
+ * @dontinclude gengrid_example.c
+ * @skip no selection callback
+ * @until }
+ *
+ * We have, finally, one more line of knobs, now sliders, to change
+ * the grids behavior. The two first will change the horizontal @b
+ * alignment of the whole actual grid of items within the gengrid's
+ * viewport:
+ * @dontinclude gengrid_example.c
+ * @skip items grid horizontal alignment change
+ * @until }
+ *
+ * Naturally, the vertical counterpart just issues
+ * elm_gengrid_align_set() changing the second alignment component,
+ * instead.
+ *
+ * The last slider will change the grid's <b>page size</b>, relative
+ * to its own one. Try to change those values and, one manner of
+ * observing the paging behavior, is to scroll softly and release the
+ * mouse button, with different page sizes, at different grid
+ * positions, while having lots of items in it -- you'll see it
+ * snapping to page boundaries differenty, for each configuration:
+ * @dontinclude gengrid_example.c
+ * @skip page relative size change
+ * @until }
+ *
+ * This is how the example program's window looks like:
+ * @image html screenshots/gengrid_example.png
+ * @image latex screenshots/gengrid_example.eps width=\textwidth
+ *
+ * Note that it starts with three items which we included at will:
+ * @dontinclude gengrid_example.c
+ * @skip _clicked(grid,
+ * @until _clicked(grid,
+ * @until _clicked(grid,
+ * @until _clicked(grid,
+ *
+ * See the full @ref gengrid_example_c "source code" for
+ * this example.
+ *
+ * @example gengrid_example.c
+ */
+/**
+ * @page entry_example_01 Entry - Example of simple editing
+ *
+ * As a general overview of @ref Entry we are going to write an, albeit simple,
+ * functional editor. Although intended to show how elm_entry works, this
+ * example also makes extensive use of several other widgets. The full code
+ * can be found in @ref entry_example.c "entry_example.c" and in the following
+ * lines we'll go through the parts especific to the @ref Entry widget.
+ *
+ * The program itself is a simple editor, with a file already set to it, that
+ * can be set to autosave or not and allows insertion of emoticons and some
+ * formatted text. As of this writing, the capabilities of format edition in
+ * the entry are very limited, so a lot of manual work is required to change
+ * the current text.
+ *
+ * In any case, the program allows some changes by using the buttons on the
+ * top of the window and returning focus back to the main entry afterwards.
+ *
+ * @image html screenshots/entry_example.png
+ * @image latex screenshots/entry_example.eps width=\textwidth
+ *
+ * We'll begin by showing a few structures used throught the program. First,
+ * the application owns data that holds the main window and the main entry
+ * where the editting happens. Then, an auxiliar structure we'll use later
+ * when inserting icons in our text.
+ * @dontinclude entry_example.c
+ * @skip typedef
+ * @until App_Inwin_Data
+ *
+ * A little convenience function will insert whatever text we need in the
+ * buffer at the current cursor's position and set focus back to this entry.
+ * This is done mostly because clicking on any button will make them steal
+ * focus, which makes writing text more cumbersome.
+ * @skip static void
+ * @until }
+ *
+ * One of the buttons on the top will trigger an @ref Inwin to open and show
+ * us several icons we can insert into the text. We'll jump over most of these
+ * functions, but when all the options are chosen, we insert the special
+ * markup text that will show the chosen icon in place.
+ * @skip edje_file_collection_list_free(emos)
+ * @skip static void
+ * @until evas_object_del
+ * @until }
+ *
+ * As can be seen in that function, the program lets us add icons to our entry
+ * using all the possible configurations for them. That should help to
+ * clarify how the different combinations work out by actually seeing them
+ * in action.
+ *
+ * The same popup window has a page to set the settings of the chosen icon,
+ * that is, the size and how the item will be placed within the line.
+ *
+ * The size is done with two entries, limitted to accept numbers and a fixed
+ * size of characters. Changing the value in this entries will update the icon
+ * size in our struct as seen in the next two callbacks.
+ * @skip static void
+ * @until }
+ * @until }
+ *
+ * The rest of the options are handled with radio buttons, since only one type
+ * of size can be used (@c size, @c absize or @c relsize) and for the vertical
+ * sizing it needs to choose between @c ascent and @c full. Depending on which
+ * is chosen, the @c item tag is formed accordingly as seen before.
+ * @skip static Evas_Object
+ * @until evas_object_show(rvascent)
+ *
+ * The first of our entries is here. There's something worth mentioning about
+ * the way we'll create this one. Normally, any entry regardless of whether is
+ * single line or not, will be set to scrollable, but in this case, since we
+ * are limitting how many characters can fit in them and we know we don't need
+ * scrolling, we are not setting this flag. This makes the entry have virtually
+ * no appearance on screen, other than its text. This is because an entry is
+ * just that, a box that holds text, and in order to have some frame around it
+ * or a background color, another widget needs to provide this. When an entry
+ * is scrollable, the same scroller used internally does this.
+ * We are using @ref Frame "frames" here to provide some decoration around,
+ * then creating our entries, set them to single line, add our two filters and
+ * the callback for when their value change.
+ * @until _height_changed_cb
+ *
+ * This function ends with the button that will finally call the item
+ * into our editting string.
+ * @until }
+ *
+ * Then we get to the format edition. Here we can add the @c bold and
+ * @c emphasis tags to parts of our text. There's a lot of manual work to
+ * know what to do here, since we are not implementing an entire state manager
+ * and the entry itself doesn't, yet, support all the needed capabilities to
+ * make this simpler. We begin by getting the format we are using in our
+ * function from the button pressed.
+ * @skip aid->naviframe = naviframe;
+ * @until sizeof(fmt_close)
+ *
+ * Next we need to find out if we need to insert an opening or a closing tag.
+ * For this, we store the current cursor position and create a selection
+ * from this point until the beginning of our text, and then get the selected
+ * text to look for any existing format tags in it. This is currently the only
+ * way in which we can find out what formats is being used in the entry.
+ * @until }
+ * @until }
+ *
+ * Once we know what tag to insert, we need a second check in the case it was
+ * a closing tag. This is because any other closing tag that comes after would
+ * be left dangling alone, so we need to remove it to keep the text consistent.
+ * @until }
+ * @until }
+ * Finally, we clear our fake selections and return the cursor back to the
+ * position it had at first, since there is where we want to insert our format.
+ * @until cursor_pos_set
+ *
+ * And finish by calling our convenience function from before, to insert the
+ * text at the current cursor and give focus back to the entry.
+ * @until }
+ *
+ * A checkbox on the top of our program tells us if the text we are editing
+ * will autosave or not. In it's @c "changed" callback we get the value from
+ * the checkbox and call the elm_entry_autosave_set() function with it. If
+ * autosave is set, we also call elm_entry_file_save(). This is so the internal
+ * timer used to periodically store to disk our changes is started.
+ * @skip static void
+ * @until }
+ *
+ * Two more functions to show some cursor playing. Whenever we double click
+ * anywhere on our entry, we'll find what word is the cursor placed at and
+ * select it. Likewise, for triple clicking, we select the entire line.
+ * @skip static void
+ * @until _edit_tplclick_cb
+ * @until }
+ *
+ * And finally, the main window of the program contains the entry where we
+ * do all the edition and some helping widgets to change format, add icons
+ * or change the autosave flag.
+ * @skip elm_exit
+ * @skip int
+ * @until _image_insert_cb
+ *
+ * And the main entry of the program. Set to scroll, by default we disable
+ * autosave and we'll begin with a file set to it because no file selector
+ * is being used here. The file is loaded with #ELM_TEXT_FORMAT_MARKUP_UTF8
+ * so that any format contained in it is interpreted, otherwise the entry
+ * would load it as just text, escaping any tags found and no format or icons
+ * would be shown. Then we connect to the double and triple click signals
+ * and set focus on the entry so we can start typing right away.
+ * @until ELM_MAIN
+ *
+ * @example entry_example.c
+ */
+
+/**
+ * @page genlist_example_01 Genlist - basic usage
+ *
+ * This example creates a simple genlist with a small number of items and
+ * a callback that is called whenever an item is selected. All the properties of
+ * this genlist are the default ones. The full code for this example can be seen
+ * at @ref genlist_example_01_c.
+ *
+ * For the simplest list that you plan to create, it's necessary to define some
+ * of the basic functions that are used for creating each list item, and
+ * associating them with the "item class" for that list. The item class is just
+ * an struct that contains pointers to the specific list item functions that are
+ * common to all the items of the list.
+ *
+ * Let's show it by example. Our item class is declared globally and static as
+ * it will be the only item class that we need (we are just creating one list):
+ *
+ * @dontinclude genlist_example_01.c
+ * @skip static Elm_Genlist
+ * @until static Elm_Genlist
+ *
+ * This item class will be used for every item that we create. The only
+ * functions that we are going to set are @c label_get and @c icon_get. As the
+ * name suggests, they are used by the genlist to generate the label for the
+ * respective item, and to generate icon(s) to it too. Both the label and icon
+ * get functions can be called more than once for each item, with different @c
+ * part parameters, which represent where in the theme of the item that label or
+ * icon is going to be set.
+ *
+ * The default theme for the genlist contains only one area for label, and two
+ * areas for icon ("elm.swallow.icon" and "elm.swallow.end"). Since we just want
+ * to set the first icon (that will be at the left side of the label), we
+ * compare the part name given with "elm.swallow.icon". Notice that the
+ * @c label_get function must return a strduped string, that will be freed later
+ * automatically by the list. Here's the code for @c label_get and @c icon_get:
+ *
+ * @until static void
+ *
+ * We will also provide a function that will be called whenever an item is
+ * selected in the genlist. However, this function is not part of the item
+ * class, it will be passed for each item being added to the genlist explicitly.
+ * Notice the similarity of the function signature with those used by @c
+ * evas_object_smart_callback_add:
+ *
+ * @until }
+ *
+ * Now let's show the code used for really creating the list. Skipping
+ * boilerplate code used for creating a window and background, the first piece
+ * of code specific to our genlist example is setting the pointer functions of
+ * the item class to our above defined functions:
+ *
+ * @skip _itc
+ * @until func.del
+ *
+ * Notice that we also choose to use the "default" style for our genlist items.
+ * Another interesting point is that @c state_get and @c del are set to @c NULL,
+ * since we don't need these functions now. @c del doesn't need to be used
+ * because we don't add any data that must be freed to our items, and @c
+ * state_get is also not used since all of our items are the same and don't need
+ * to have different states to be used for each item. Finally we create our
+ * list:
+ *
+ * @until genlist_add
+ *
+ * Now we append several items to the list, and for all of them we need to give
+ * the list pointer, a pointer to the item class, the data that will be used
+ * with that item, a pointer to the parent of this item if it is in a group type
+ * list (this is not the case so we pass @c NULL), possible flags for this item,
+ * the callback for when the item is selected, and the data pointer that will be
+ * given to the selected callback.
+ *
+ * @until }
+ *
+ * The rest of the code is also common to all the other examples, so it will be
+ * omitted here (look at the full source code link above if you need it).
+ *
+ * You can try to play with this example, and see the selected callback being
+ * called whenever an item is clicked. It also already has some features enabled
+ * by default, like vertical bounce animation when reaching the end of the list,
+ * automatically visible/invisible scrollbar, etc. Look at the @ref
+ * genlist_example_02 to see an example of setting these properties to the list.
+ *
+ * The current example will look like this when running:
+ *
+ * @image html screenshots/genlist_example_01.png
+ * @image latex screenshots/genlist_example_01.eps width=\textwidth
+ */
+
+/**
+ * @page genlist_example_02 Genlist - list setup functions
+ *
+ * This example is very similar to the @ref genlist_example_01, but it fetch
+ * most of the properties of the genlist and displays them on startup (thus
+ * getting the default value for them) and then set them to some other values,
+ * to show how to use that API. The full source code is at @ref
+ * genlist_example_02_c.
+ *
+ * Considering that the base code for instantiating a genlist was already
+ * described in the previous example, we are going to focus on the new code.
+ *
+ * Just a small difference for the @c _item_label_get function, we are going to
+ * store the time that this function was called. This is the "realized" time,
+ * the time when the visual representation of this item was created. This is the
+ * code for the @c label_get function:
+ *
+ * @dontinclude genlist_example_02.c
+ * @skip static char
+ * @until return strdup
+ *
+ * Now let's go to the list creation and setup. First, just after creating the
+ * list, we get most of the default properties from it, and print them on the
+ * console:
+ *
+ * @skip genlist_add
+ * @until printf("\n")
+ *
+ * We are going to change some of the properties of our list.
+ *
+ * There's no need to call the selected callback at every click, just when the
+ * selected item changes, thus we call elm_genlist_always_select_mode_set() with
+ * false.
+ *
+ * For this list we don't want bounce animations at all, so we set both the
+ * horizontal bounce and the vertical bounce to false with
+ * elm_genlist_bounce_set().
+ *
+ * We also want our list to compress items if they are wider than the list
+ * width (thus we call elm_genlist_compress_mode_set().
+ *
+ * The items have different width, so they are not homogeneous:
+ * elm_genlist_homogeneous_set() is set to false.
+ *
+ * Since the compress mode is active, the call to
+ * elm_genlist_mode_set() doesn't make difference, but the current
+ * option would make the list to have at least the width of the largest item.
+ *
+ * This list will support multiple selection, so we call
+ * elm_genlist_multi_select_set() on it.
+ *
+ * The option elm_genlist_height_for_width_mode_set() would allow text block to
+ * wrap lines if the Edje part is configured with "text.min: 0 1", for example.
+ * But since we are compressing the elements to the width of the list, this
+ * option wouldn't take any effect.
+ *
+ * We want the vertical scrollbar to be always displayed, and the orizontal one
+ * to never be displayed, and set this with elm_genlist_scroller_policy_set().
+ *
+ * The timeout to consider a longpress is set to half of a second with
+ * elm_genlist_longpress_timeout_set().
+ *
+ * We also change the block count to a smaller value, but that should have not
+ * impact on performance since the number of visible items is too small. We just
+ * increase the granularity of the block count (setting it to have at most 4
+ * items).
+ *
+ * @until block_count_set
+ *
+ * Now let's add elements to the list:
+ *
+ * @until item_append
+ * @until }
+ *
+ * It's exactly the same as the previous example. The difference is on the
+ * behavior of the list, if you try to scroll, select items and so.
+ *
+ * In this example we also need two buttons. One of them, when clicked, will
+ * display several status info about the current selection, the "realized"
+ * items, the item in the middle of the screen, and the current mode and active
+ * item of that mode for the genlist.
+ *
+ * The other button will ask the genlist to "realize" again the items already
+ * "realized", so their respective label_get and icon_get functions will be
+ * called again.
+ *
+ * These are the callbacks for both of these buttons:
+ *
+ * @dontinclude genlist_example_02.c
+ * @skip item_sel_cb
+ * @skip static
+ * @until }
+ * @until }
+ *
+ * Try to scroll, select some items and click on the "Show status" button.
+ * You'll notice that not all items of the list are "realized", thus consuming
+ * just a small amount of memory. The selected items are listed in the order
+ * that they were selected, and the current selected item printed using
+ * elm_genlist_selected_item_get() is the first selected item of the multiple
+ * selection.
+ *
+ * Now resize the window so that you can see the "realized time" of some items.
+ * This is the time of when the label_get function was called. If you click on
+ * the "Realize" button, all the already realized items will be rebuilt, so the
+ * time will be updated for all of them.
+ *
+ * The current example will look like this when running:
+ *
+ * @image html screenshots/genlist_example_02.png
+ * @image latex screenshots/genlist_example_02.eps width=\textwidth
+ */
+
+/**
+ * @page genlist_example_03 Genlist - different width options
+ *
+ * This example doesn't present any other feature that is not already present in
+ * the other examples, but visually shows the difference between using the
+ * default list options (first list of the example), setting the horizontal mode
+ * to #ELM_LIST_LIMIT (second list), enabling compress mode (third list) and
+ * using height_for_width option (fourth list).
+ *
+ * The full code for this example is listed below:
+ *
+ * @include genlist_example_03.c
+ *
+ * And the screenshot of the running example:
+ *
+ * @image html screenshots/genlist_example_03.png
+ * @image latex screenshots/genlist_example_03.eps width=\textwidth
+ *
+ * @example genlist_example_03.c
+ */
+
+/**
+ * @page genlist_example_04 Genlist - items manipulation
+ *
+ * This example is also similar ot the @ref genlist_example_01, but it
+ * demonstrates most of the item manipulation functions. See the full source
+ * code at @ref genlist_example_04_c.
+ *
+ * In this example, we also will use the concept of creating groups of items in
+ * the genlist. Each group of items is composed by a parent item (which will be
+ * the index of the group) and several children of this item. Thus, for the
+ * children, we declare a normal item class. But we also are going to declare a
+ * different item class for the group index (which in practice is another type
+ * of item in the genlist):
+ *
+ * @dontinclude genlist_example_04.c
+ * @skip _item_sel_cb
+ * @skip static
+ * @until }
+ * @until }
+ *
+ * We will add buttons to the window, where each button provides one
+ * functionality of the genlist item API. Each button will have a callback
+ * attached, that will really execute this functionality. An example of these
+ * callbacks is the next one, for the elm_genlist_item_insert_after() function:
+ *
+ * @skip insert_before_cb
+ * @skip static
+ * @until }
+ *
+ * If you want ot see the other button functions, look at the full source code
+ * link above.
+ *
+ * Each button will be created with a function that already creates the button,
+ * add it to an elementary box, and attach the specified callback. This is the
+ * function that does it:
+ *
+ * @skip genlist_item_update
+ * @skip static
+ * @until }
+ *
+ * In our @c elm_main function, besides the code for setting up the window, box
+ * and background, we also initialize our two item classes:
+ *
+ * @skip _itc.item_style
+ * @until _itc_group.func.del
+ *
+ * This example uses a different style for the items, the @a double_label, which
+ * provides a text field for the item text, and another text field for a subtext.
+ *
+ * For the group index we use the @a group_index style, which provides a
+ * different appearance, helping to identify the end of a group and beginning of
+ * another one.
+ *
+ * Now, after the code for creating the list, setting up the box and other
+ * stuff, let's add the buttons with their respective callbacks:
+ *
+ * @skip _button_add
+ * @until bt_top_show
+ *
+ * The main code for adding items to the list is a bit more complex than the one
+ * from the previous examples. We check if each item is multiple of 7, and if
+ * so, they are group indexes (thus each group has 6 elements by default, in
+ * this example):
+ *
+ * @skip for
+ * @until }
+ * @until }
+ *
+ * Then we also check for specific items, and add callbacks to them on the
+ * respective buttons, so we can show, bring in, etc.:
+ *
+ * @until }
+ * @until }
+ *
+ * Once you understand the code from the @ref genlist_example_01, it should be
+ * easy to understand this one too. Look at the full code, and also try to play
+ * a bit with the buttons, adding items, bringing them to the viewport, and so.
+ *
+ * The example will look like this when running:
+ *
+ * @image html screenshots/genlist_example_04.png
+ * @image latex screenshots/genlist_example_04.eps width=\textwidth
+ */
+
+/**
+ * @page genlist_example_05 Genlist - working with subitems
+ *
+ * This is probably the most complex example of elementary @ref Genlist. We
+ * create a tree of items, using the subitems properties of the items, and keep
+ * it in memory to be able to expand/hide subitems of an item. The full source
+ * code can be found at @ref genlist_example_05_c
+ *
+ * The main point is the way that Genlist manages subitems. Clicking on an
+ * item's button to expand it won't really show its children. It will only
+ * generate the "expand,request" signal, and the expansion must be done
+ * manually.
+ *
+ * In this example we want to be able to add items as subitems of another item.
+ * If an item has any child, it must be displayed using a parent class,
+ * otherwise it will use the normal item class.
+ *
+ * It will be possible to delete items too. Once a tree is constructed (with
+ * subitems of subitems), and the user clicks on the first parent (root of the
+ * tree), the entire subtree must be hidden. However, just calling
+ * elm_genlist_item_expanded_set(item, EINA_FALSE) won't hide them. The only
+ * thing that happens is that the parent item will change its appearance to
+ * represent that it's contracted. And the signal "contracted" will be emitted
+ * from the genlist. Thus, we must call elm_genlist_item_subitems_clear() to
+ * delete all its subitems, but still keep a way to recreate them when expanding
+ * the parent again. That's why we are going to keep a node struct for each
+ * item, that will be the data of the item, with the following information:
+ *
+ * @dontinclude genlist_example_05.c
+ * @skip typedef
+ * @until }
+ *
+ * This @c Node_Data contains the value for the item, a number indicating its
+ * level under the tree, a list of children (to be able to expand it later) and
+ * a boolean indicating if it's a favorite item or not.
+ *
+ * We use 3 different item classes in this example:
+ *
+ * One for items that don't have children:
+ *
+ * @skip nitems
+ * @skip static
+ * @until }
+ * @until }
+ *
+ * One for items that have children:
+ *
+ * @skip item_sel
+ * @skip static
+ * @until }
+ * @until }
+ *
+ * And one for items that were favorited:
+ *
+ * @skip static
+ * @until }
+ * @until }
+ *
+ * The favorite item class is there just to demonstrate the
+ * elm_genlist_item_item_class_update() function in action. It would be much
+ * simpler to implement the favorite behavior by just changing the icon inside
+ * the icon_get functions when the @c favorite boolean is activated.
+ *
+ * Now we are going to declare the callbacks for the buttons that add, delete
+ * and change items.
+ *
+ * First, a button for appending items to the list:
+ *
+ * @until item_append
+ * @until }
+ *
+ * If an item is selected, a new item will be appended to the same level of that
+ * item, but using the selected item's parent as its parent too. If no item is
+ * selected, the new item will be appended to the root of the tree.
+ *
+ * Then the callback for marking an item as favorite:
+ *
+ * @until elm_genlist_item_update
+ * @until }
+ *
+ * This callback is very simple, it just changes the item class of the selected
+ * item for the "favorite" one, or go back to the "item" or "parent" class
+ * depending on that item having children or not.
+ *
+ * Now, the most complex operation (adding a child to an item):
+ *
+ * @until elm_genlist_item_update
+ * @until }
+ *
+ * This function gets the data of the selected item, create a new data (for the
+ * item being added), and appends it to the children list of the selected item.
+ *
+ * Then we must check if the selected item (let's call it @c item1 now) to which
+ * the new item (called @c item2 from now on) was already a parent item too
+ * (using the parent item class) or just a normal item (using the default item
+ * class). In the first case, we just have to append the item to the end of the
+ * @c item1 children list.
+ *
+ * However, if the @c item1 didn't have any child previously, we have to change
+ * it to a parent item now. It would be easy to just change its item class to
+ * the parent type, but there's no way to change the item flags and make it be
+ * of the type #ELM_GENLIST_ITEM_SUBITEMS. Thus, we have to delete it and create
+ * a new item, and add this new item to the same position that the deleted one
+ * was. That's the reason of the checks inside the bigger @c if.
+ *
+ * After adding the item to the newly converted parent, we set it to not
+ * expanded (since we don't want to show the added item immediately) and select
+ * it again, since the original item was deleted and no item is selected at the
+ * moment.
+ *
+ * Finally, let's show the callback for deleting items:
+ *
+ * @until elm_genlist_item_update
+ * @until }
+ *
+ * Since we have an iternal list representing each element of our tree, once we
+ * delete an item we have to go deleting each child of that item, in our
+ * internal list. That's why we have the function @c _clear_list, which
+ * recursively goes freeing all the item data.
+ *
+ * This is necessary because only when we really want to delete the item is when
+ * we need to delete the item data. When we are just contracting the item, we
+ * need to hide the children by deleting them, but keeping the item data.
+ *
+ * Now there are two callbacks that will be called whenever the user clicks on
+ * the expand/contract icon of the item. They will just request to items to be
+ * contracted or expanded:
+ *
+ * @until elm_genlist_item_expanded_set(
+ * @until elm_genlist_item_expanded_set(
+ * @until }
+ *
+ * When the elm_genlist_item_expanded_set() function is called with @c
+ * EINA_TRUE, the @c _expanded_cb will be called. And when this happens, the
+ * subtree of that item must be recreated again. This is done using the internal
+ * list stored as item data for each item. The function code follows:
+ *
+ * @until }
+ *
+ * Each appended item is set to contracted, so we don't have to deal with
+ * checking if the item was contracted or expanded before its parent being
+ * contracted. It could be easily implemented, though, by adding a flag expanded
+ * inside the item data.
+ *
+ * Now, the @c _contracted_cb, which is much simpler:
+ *
+ * @until }
+ *
+ * We just have to call elm_genlist_item_subitems_clear(), that will take care
+ * of deleting every item, and keep the item data still stored (since we don't
+ * have any del function set on any of our item classes).
+ *
+ * Finally, the code inside @c elm_main is very similar to the other examples:
+ *
+ * @skip elm_main
+ * @until ELM_MAIN
+ *
+ * The example will look like this when running:
+ *
+ * @image html screenshots/genlist_example_05.png
+ * @image latex screenshots/genlist_example_05.eps width=\textwidth
+ */
+
+/**
+ * @page thumb_example_01 Thumb - generating thumbnails.
+ *
+ * This example shows how to create a simple thumbnail object with Elementary.
+ * The full source code can be found at @ref thumb_example_01_c
+ *
+ * Everything is very simple. First we need to tell elementary that we need
+ * Ethumb to generate the thumbnails:
+ *
+ * @dontinclude thumb_example_01.c
+ * @skipline elm_need_ethumb
+ *
+ * Then, after creating the window and background, we setup our client to
+ * generate images of 160x160:
+ *
+ * @skip client_get
+ * @until size_set
+ *
+ * After that, we can start creating thumbnail objects. They are very similar to
+ * image or icon objects:
+ *
+ * @until thumb_reload
+ *
+ * As you can see, the main different function here is elm_thumb_reload(), which
+ * will check if the options of the Ethumb client have changed. If so, it will
+ * re-generate the thumbnail, and show the new one.
+ *
+ * Notice in this example that the thumbnail object is displayed on the size of
+ * the window (320x320 pixels), but the thumbnail generated and stored has size
+ * 160x160 pixels. That's why the picture seems upscaled.
+ *
+ * Ideally, you will be generating thumbnails with the size that you will be
+ * using them.
+ *
+ * The example will look like this when running:
+ *
+ * @image html screenshots/thumb_example_01.png
+ * @image latex screenshots/thumb_example_01.eps width=\textwidth
+ */
+
+/**
+ * @page progressbar_example Progress bar widget example
+ *
+ * This application is a thorough example of the progress bar widget,
+ * consisting of a window with varios progress bars, each with a given
+ * look/style one can give to those widgets. With two auxiliary
+ * buttons, one can start or stop a timer which will fill in the bars
+ * in synchrony, simulating an underlying task being completed.
+ *
+ * We create @b seven progress bars, being three of them horizontal,
+ * three vertical and a final one under the "wheel" alternate style.
+ *
+ * For the first one, we add a progress bar on total pristine state,
+ * with no other call than the elm_progressbar_add() one:
+ * @dontinclude progressbar_example.c
+ * @skip pb with no label
+ * @until pb1
+ * See, than, that the defaults of a progress bar are:
+ * - no primary label shown,
+ * - unit label set to @c "%.0f %%",
+ * - no icon set
+ *
+ * The second progress bar is given a primary label, <c>"Infinite
+ * bounce"</c>, and, besides, it's set to @b pulse. See how, after one
+ * starts the progress timer, with the "Start" button, it animates
+ * differently than the previous one. It won't account for the
+ * progress, itself, and just dumbly animate a small bar within its
+ * bar region.
+ * @dontinclude progressbar_example.c
+ * @skip pb with label
+ * @until pb2
+ *
+ * Next, comes a progress bar with an @b icon, a primary label and a
+ * @b custom unit label set. It's also made to grow its bar in an
+ * @b inverted manner, so check that out during the timer's progression:
+ * @dontinclude progressbar_example.c
+ * @skip ic1 =
+ * @until pb3
+ * Another important thing in this one is the call to
+ * elm_progressbar_span_size_set() -- this is how we forcefully set a
+ * minimum horizontal size to our whole window! We're not resizing it
+ * manually, as you can see in the @ref progressbar_example_c
+ * "complete code".
+ *
+ * The next three progress bars are just variants on the ones already
+ * shown, but now all being @b vertical. Another time we use one of
+ * than to give the window a minimum vertical size, with
+ * elm_progressbar_span_size_set(). To demonstrate this trick once
+ * more, the fifth one, which is also set to pulse, has a smaller
+ * hardcoded span size:
+ * @dontinclude progressbar_example.c
+ * @skip vertical pb, with pulse
+ * @until pb5
+ *
+ * We end the widget demonstration by showing a progress bar with the
+ * special @b "wheel" progress bar style. One does @b not need to set
+ * it to pulse, with elm_progressbar_pulse_set(), explicitly, because
+ * its theme does not take it in account:
+ * @dontinclude progressbar_example.c
+ * @skip "wheel"
+ * @until pb7
+ *
+ * The two buttons exercising the bars, the facto, follow:
+ * @dontinclude progressbar_example.c
+ * @skip elm_button_add
+ * @until evas_object_show(bt)
+ * @until evas_object_show(bt)
+ *
+ * The first of the callbacks will, for the progress bars set to
+ * pulse, start the pulsing animation at that time. For the others, a
+ * timer callback will take care of updating the values:
+ * @dontinclude progressbar_example.c
+ * @skip static Eina_Bool
+ * @until }
+ * @until }
+ * @until }
+ *
+ * Finally, the callback to stop the progress timer will stop the
+ * pulsing on the pulsing progress bars and, for the others, to delete
+ * the timer which was acting on their values:
+ * @dontinclude progressbar_example.c
+ * @skip end of show
+ * @until }
+ * @until }
+ *
+ * This is how the example program's window looks like:
+ * @image html screenshots/progressbar_example.png
+ * @image latex screenshots/progressbar_example.eps width=\textwidth
+ *
+ * See the full @ref progressbar_example_c "source code" for
+ * this example.
+ *
+ * @example progressbar_example.c
+ */
+
+/**
+ * @page tutorial_notify Notify example
+ * @dontinclude notify_example_01.c
+ *
+ * In this example we will have 3 notifys in 3 different positions. The first of
+ * which will dissapear after 5 seconds or when a click outside it occurs, the
+ * second and third will not dissapear and differ from each other only in
+ * position.
+ *
+ * We start our example with the usual stuff you've seen in other examples:
+ * @until show(bx)
+ *
+ * We now create a label to use as the content of our first notify:
+ * @until show
+ *
+ * Having the label we move to creating our notify, telling it to block events,
+ * setting its timeout(to autohide it):
+ * @until pack_end
+ *
+ * To have the notify dissapear when a click outside its area occur we have to
+ * listen to its "block,clicked" signal:
+ * @until smart_callback
+ *
+ * Our callback will look like this:
+ * @skip static
+ * @until }
+ * @dontinclude notify_example_01.c
+ *
+ * Next we create another label and another notify. Note, however, that this
+ * time we don't set a timeout and don't have it block events. What we do is set
+ * the orient so that this notify will appear in the bottom of its parent:
+ * @skip smart_callback
+ * @skip content
+ * @until pack_end
+ *
+ * For our third notify the only change is the orient which is now center:
+ * @until pack_end
+ *
+ * Now we tell the main loop to run:
+ * @until ELM_MAIN
+ *
+ * Our example will initially look like this:
+ *
+ * @image html screenshots/notify_example_01.png
+ * @image latex screenshots/notify_example_01.eps width=\textwidth
+ *
+ * Once the first notify is hidden:
+ *
+ * @image html screenshots/notify_example_01_a.png
+ * @image latex screenshots/notify_example_01_a.eps width=\textwidth
+ *
+ * @example notify_example_01.c
+ */
+
+/**
+ * @page popup_example_01_c popup_example_01.c
+ * @include popup_example_01.c
+ *
+ * This example will initially look like this:
+ *
+ * @image html screenshots/popup_example_01.png
+ * @image latex screenshots/popup_example_01.eps width=\textwidth
+ *
+ * Once the popup is hidden after timeout:
+ *
+ * @image html screenshots/popup_example_01_a.png
+ * @image latex screenshots/popup_example_01_a.eps width=\textwidth
+ *
+ * @example popup_example_01.c
+ */
+
+ /** @page popup_example_02_c popup_example_02.c
+ * @include popup_example_02.c
+ *
+ * This example will look like this:
+ *
+ * @image html screenshots/popup_example_02.png
+ * @image latex screenshots/popup_example_02.eps width=\textwidth
+ *
+ * @example popup_example_02.c
+ */
+
+/**
+ * @page popup_example_03_c popup_example_03.c
+ * @include popup_example_03.c
+ *
+ * This example will look like this:
+ *
+ * @image html screenshots/popup_example_03.png
+ * @image latex screenshots/popup_example_03.eps width=\textwidth
+ *
+ * @example popup_example_03.c
+ */
+
+/**
+ * @page tutorial_frame Frame example
+ * @dontinclude frame_example_01.c
+ *
+ * In this example we are going to create 4 Frames with different styles and
+ * add a rectangle of different color in each.
+ *
+ * We start we the usual setup code:
+ * @until show(bg)
+ *
+ * And then create one rectangle:
+ * @until show
+ *
+ * To add it in our first frame, which since it doesn't have it's style
+ * specifically set uses the default style:
+ * @until show
+ *
+ * And then create another rectangle:
+ * @until show
+ *
+ * To add it in our second frame, which uses the "pad_small" style, note that
+ * even tough we are setting a text for this frame it won't be show, only the
+ * default style shows the Frame's title:
+ * @until show
+ * @note The "pad_small", "pad_medium", "pad_large" and "pad_huge" styles are
+ * very similar, their only difference is the size of the empty area around
+ * the content of the frame.
+ *
+ * And then create yet another rectangle:
+ * @until show
+ *
+ * To add it in our third frame, which uses the "outdent_top" style, note
+ * that even tough we are setting a text for this frame it won't be show,
+ * only the default style shows the Frame's title:
+ * @until show
+ *
+ * And then create one last rectangle:
+ * @until show
+ *
+ * To add it in our fourth and final frame, which uses the "outdent_bottom"
+ * style, note that even tough we are setting a text for this frame it won't
+ * be show, only the default style shows the Frame's title:
+ * @until show
+ *
+ * And now we are left with just some more setup code:
+ * @until ELM_MAIN()
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/frame_example_01.png
+ * @image latex screenshots/frame_example_01.eps width=\textwidth
+ *
+ * @example frame_example_01.c
+ */
+
+/**
+ * @page tutorial_anchorblock_example Anchorblock/Anchorview example
+ * This example will show both Anchorblock and @ref Anchorview,
+ * since both are very similar and it's easier to show them once and side
+ * by side, so the difference is more clear.
+ *
+ * We'll show the relevant snippets of the code here, but the full example
+ * can be found here... sorry, @ref anchorblock_example_01.c "here".
+ *
+ * As for the actual example, it's just a simple window with an anchorblock
+ * and an anchorview, both containing the same text. After including
+ * Elementary.h and declaring some functions we'll need, we jump to our
+ * elm_main (see ELM_MAIN) and create our window.
+ * @dontinclude anchorblock_example_01.c
+ * @skip int
+ * @until const char
+ * @until ;
+ *
+ * With the needed variables declared, we'll create the window and a box to
+ * hold our widgets, but we don't need to go through that here.
+ *
+ * In order to make clear where the anchorblock ends and the anchorview
+ * begins, they'll be each inside a @ref Frame. After creating the frame,
+ * the anchorblock follows.
+ * @skip elm_frame_add
+ * @until elm_frame_content_set
+ *
+ * Nothing out of the ordinary there. What's worth mentioning is the call
+ * to elm_anchorblock_hover_parent_set(). We are telling our widget that
+ * when an anchor is clicked, the hover for the popup will cover the entire
+ * window. This affects the area that will be obscured by the hover and
+ * where clicking will dismiss it, as well as the calculations it does to
+ * inform the best locations where to insert the popups content.
+ * Other than that, the code is pretty standard. We also need to set our
+ * callback for when an anchor is clicked, since it's our task to populate
+ * the popup. There's no default for it.
+ *
+ * The anchorview is no different, we only change a few things so it looks
+ * different.
+ * @until elm_frame_content_set
+ *
+ * Then we run, so stuff works and close our main function in the usual way.
+ * @until ELM_MAIN
+ *
+ * Now, a little note. Normally you would use either one of anchorblock or
+ * anchorview, set your one callback to clicks and do your stuff in there.
+ * In this example, however, there are a few tricks to make it easier to
+ * show both widgets in one go (and to save me some typing). So we have
+ * two callbacks, one per widget, that will call a common function to do
+ * the rest. The trick is using ::Elm_Entry_Anchorblock_Info for the
+ * anchorview too, since both are equal, and passing a callback to use
+ * for our buttons to end the hover, because each widget has a different
+ * function for it.
+ * @until _anchorview_clicked_cb
+ * @until }
+ *
+ * The meat of our popup is in the following function. We check what kind
+ * of menu we need to show, based on the name set to the anchor in the
+ * markup text. If there's no type (something went wrong, no valid contact
+ * in the address list) we are just putting a button that does nothing, but
+ * it's perfectly reasonable to just end the hover and call it quits.
+ *
+ * Our popup will consist of one main button in the middle of our hover,
+ * and possibly a secondary button and a list of other options. We'll create
+ * first our main button and check what kind of popup we need afterwards.
+ * @skip static void
+ * @skip static void
+ * @until eina_stringshare_add
+ * @until }
+ *
+ * Each button has two callbacks, one is our hack to close the hover
+ * properly based on which widget it belongs to, the other a simple
+ * printf that will show the action with the anchors own data. This is
+ * not how you would usually do it. Instead, the common case is to have
+ * one callback for the button that will know which function to call to end
+ * things, but since we are doing it this way it's worth noting that
+ * smart callbacks will be called in reverse in respect to the order they
+ * were added, and since our @c btn_end_cb will close the hover, and thus
+ * delete our buttons, the other callback wouldn't be called if we had
+ * added it before.
+ *
+ * After our telephone popup, there are a few others that are practically
+ * the same, so they won't be shown here.
+ *
+ * Once we are done with that, it's time to place our actions into our
+ * hover. Main button goes in the middle without much questioning, and then
+ * we see if we have a secondary button and a box of extra options.
+ * Because I said so, secondary button goes on either side and box of
+ * options either on top or below the main one, but to choose which
+ * exactly, we use the hints our callback info has, which saves us from
+ * having to do the math and see which side has more space available, with
+ * a little special case where we delete our extra stuff if there's nowhere
+ * to place it.
+ * @skip url:
+ * @skip }
+ * @skip evas_object_smart
+ * @until evas_object_del(box)
+ * @until }
+ * @until }
+ *
+ * The example will look like this:
+ *
+ * @image html screenshots/anchorblock_01.png
+ * @image latex screenshots/anchorblock_01.eps width=\textwidth
+ *
+ * @example anchorblock_example_01.c
+ */
+
+/**
+ * @page tutorial_check Check example
+ * @dontinclude check_example_01.c
+ *
+ * This example will show 2 checkboxes, one with just a label and the second
+ * one with both a label and an icon. This example also ilustrates how to
+ * have the checkbox change the value of a variable and how to react to those
+ * changes.
+ *
+ * We will start with the usual setup code:
+ * @until show(bg)
+ *
+ * And now we create our first checkbox, set its label, tell it to change
+ * the value of @p value when the checkbox stats is changed and ask to be
+ * notified of state changes:
+ * @until show
+ *
+ * For our second checkbox we are going to set an icon so we need to create
+ * and icon:
+ * @until show
+ * @note For simplicity we are using a rectangle as icon, but any evas object
+ * can be used.
+ *
+ * And for our second checkbox we set the label, icon and state to true:
+ * @until show
+ *
+ * We now do some more setup:
+ * @until ELM_MAIN
+ *
+ * And finally implement the callback that will be called when the first
+ * checkbox's state changes. This callback will use @p data to print a
+ * message:
+ * @until }
+ * @note This work because @p data is @p value(from the main function) and @p
+ * value is changed when the checkbox is changed.
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/check_example_01.png
+ * @image latex screenshots/check_example_01.eps width=\textwidth
+ *
+ * @example check_example_01.c
+ */
+
+/**
+ * @page tutorial_colorselector Color selector example
+ * @dontinclude colorselector_example_01.c
+ *
+ * This example shows how to change the color of a rectangle using a color
+ * selector. We aren't going to explain a lot of the code since it's the
+ * usual setup code:
+ * @until show(rect)
+ *
+ * Now that we have a window with background and a rectangle we can create
+ * our color_selector and set it's initial color to fully opaque blue:
+ * @until show
+ *
+ * Next we tell ask to be notified whenever the color changes:
+ * @until changed
+ *
+ * We follow that we some more run of the mill setup code:
+ * @until ELM_MAIN()
+ *
+ * And now get to the callback that sets the color of the rectangle:
+ * @until }
+ *
+ * This example will look like this:
+ *
+ * @image html screenshots/colorselector_example_01.png
+ * @image latex screenshots/colorselector_example_01.eps width=\textwidth
+ *
+ * @example colorselector_example_01.c
+ */
+
+/**
+ * @page slideshow_example Slideshow widget example
+ *
+ * This application is aimed to exemplify the slideshow widget. It
+ * consists of a window with a slideshow widget set as "resize
+ * object", along with a control bar, in the form of a notify. Those
+ * controls will exercise most of the slideshow's API functions.
+ *
+ * We create the slideshow, itself, first, making it @b loop on its
+ * image itens, when in slideshow mode:
+ * @dontinclude slideshow_example.c
+ * @skip slideshow = elm_slideshow_add
+ * @until evas_object_show
+ *
+ * Next, we define the <b>item class</b> for our slideshow
+ * items. Slideshow images are going to be Elementary @ref Photo "photo"
+ * widgets, here, as pointed by our @c get class
+ * function. We'll let the Elementary infrastructure to delete those
+ * objects for us, and, as there's no additional data attached to our
+ * slideshow items, the @c del class function can be left undefined:
+ * @dontinclude slideshow_example.c
+ * @skip itc
+ * @until ;
+ * @dontinclude slideshow_example.c
+ * @skip itc.func
+ * @until = NULL
+ * @dontinclude slideshow_example.c
+ * @skip get our images to make slideshow items
+ * @until }
+ *
+ * We now get to populate the slideshow widget with items. Our images
+ * are going to be some randomly chosen from the Elementary package,
+ * nine of them. For the first eight, we insert them ordered in the
+ * widget, by using elm_slideshow_item_sorted_insert(). The comparing
+ * function will use the image names to sort items. The last item is
+ * inserted at the end of the slideshow's items list, with
+ * elm_slideshow_item_add(). We check out how that list ends with
+ * elm_slideshow_items_get(), than:
+ * @dontinclude slideshow_example.c
+ * @skip static const char *img
+ * @until _2
+ * @dontinclude slideshow_example.c
+ * @skip first =
+ * @until data_get
+ *
+ * Note that we save the pointers to the first and last items in the
+ * slideshow, for future use.
+ *
+ * What follows is the code creating a notify, to be shown over the
+ * slideshow's viewport, with knobs to act on it. We're not showing
+ * that boilerplate code, but only the callbacks attached to the
+ * interesting smart events of those knobs. The first four are
+ * buttons, which will:
+ * - Select the @b next item in the slideshow
+ * - Select the @b previous item in the slideshow
+ * - Select the @b first item in the slideshow
+ * - Select the @b last item in the slideshow
+ *
+ * Check out the code for those four actions, being the two last @c
+ * data pointers the same @c first and @c last pointers we save
+ * before, respectively:
+ * @dontinclude slideshow_example.c
+ * @skip jump to next
+ * @until }
+ * @until }
+ * @until }
+ * @until }
+ *
+ * What follow are two hoversels, meant for one to change the
+ * slideshow's @b transition and @b layout styles, respectively. We
+ * fetch all the available transition and layout names to populate
+ * those widgets and, when one selects any of them, we apply the
+ * corresponding setters on the slideshow:
+ * @dontinclude slideshow_example.c
+ * @skip hv = elm_hoversel_add
+ * @until show(hv)
+ * @until show(hv)
+ * @dontinclude slideshow_example.c
+ * @skip transition changed
+ * @until }
+ * @until }
+ *
+ * For one to change the transition @b time on the slideshow widget,
+ * we use a spinner widget. We set it to the initial value of 3
+ * (seconds), which will be probed by the next knob -- a button
+ * starting the slideshow, de facto. Note that changing the transition
+ * time while a slideshow is already happening will ajust its
+ * transition time:
+ * @dontinclude slideshow_example.c
+ * @skip spin = elm_spinner_add
+ * @until evas_object_show
+ * @dontinclude slideshow_example.c
+ * @skip slideshow transition time has
+ * @until }
+ *
+ * Finally, we have two buttons which will, respectively, start and
+ * stop the slideshow on our widget. Here are their "clicked"
+ * callbacks:
+ * @dontinclude slideshow_example.c
+ * @skip start the show
+ * @until }
+ * @until }
+ *
+ * This is how the example program's window looks like:
+ * @image html screenshots/slideshow_example.png
+ * @image latex screenshots/slideshow_example.eps width=\textwidth
+ *
+ * See the full @ref slideshow_example_c "source code" for
+ * this example.
+ *
+ * @example slideshow_example.c
+ */
+
+/**
+ * @page tutorial_photocam Photocam example
+ * @dontinclude photocam_example_01.c
+ *
+ * In this example we will have a photocam and a couple of buttons and slider to
+ * control the photocam. To avoid cluttering we'll only show the parts of the
+ * example that relate to the photocam, the full source code can be seen @ref
+ * photocam_example_01.c "here".
+ *
+ * Creating a photocam is as easy as creating any other widget:
+ * @skipline elm_photocam_add
+ *
+ * A photocam is only useful if we have a image on it, so lets set a file for it
+ * to work with:
+ * @until file_set
+ *
+ * We now set the photocam to not bounce horizontally:
+ * @until bounce_set
+ *
+ * And we want to know when the photocam has finished loading the image so:
+ * @until smart_callback
+ *
+ * The reason to know when the image is loaded is so that we can bring the
+ * center of the image into view:
+ * @skip static
+ * @until }
+ *
+ * As mentioned we have 2 buttons in this example, the "Fit" one will cause
+ * the photocam to go in to a zoom mode that makes the image fit inside the
+ * photocam. Tough this has no effect on the image we also print what region was
+ * being viewed before setting the zoom mode:
+ * @until }
+ * @note When in fit mode our slider(explained below) won't work.
+ *
+ * The second button("Unfit") will bring the photocam back into manual zoom
+ * mode:
+ * @until }
+ *
+ * Our slider controls the level of zoom of the photocam:
+ * @until }
+ * @note It is important to note that this only works when in manual zoom mode.
+ *
+ * Our example will initially look like this:
+ *
+ * @image html screenshots/photocam_example_01.png
+ * @image latex screenshots/photocam_example_01.eps width=\textwidth
+ *
+ * @example photocam_example_01.c
+ */
+
+/**
+ * @page inwin_example_01 Inwin - General overview
+ *
+ * Inwin is a very simple widget to show, so this example will be a very simple
+ * one, just using all of the available API.
+ *
+ * The program is nothing but a window with a lonely button, as shown here.
+ *
+ * @image html screenshots/inwin_example.png
+ * @image latex screenshots/inwin_example.eps width=\textwidth
+ *
+ * And pressing the button makes an inwin appear.
+ *
+ * @image html screenshots/inwin_example_a.png
+ * @image latex screenshots/inwin_example_a.eps width=\textwidth
+ *
+ * And the code is just as simple. We being with some global variables to keep
+ * track of our Inwin.
+ * @dontinclude inwin_example.c
+ * @skip static
+ * @until current_style
+ *
+ * And two callbacks used by the buttons the above screenshot showed. In these,
+ * we check if @c inwin exists and execute the proper action on it. If it's not
+ * there anymore, then we were abandoned to our luck, so we disabled ourselves.
+ * @until _inwin_destroy
+ * @until }
+ * @until }
+ *
+ * The lonely button from the beginning, when clicked, will call the following
+ * function, which begins by checking if an inwin exists, and if it's there,
+ * we bring it back to the front and exit from our function without any further
+ * ado.
+ * @until }
+ *
+ * But if no inwin is there to show, we need to create one. First we need the
+ * top-most window for the program, as no inwin can be created using other
+ * objects as parents. Then we create our popup, set the next style in the list
+ * and show it.
+ * @until current_style =
+ *
+ * As for the content of our inwin, it's just a box with a label and some
+ * buttons inside.
+ * @until _inwin_destroy
+ * @until }
+ *
+ * Now, all the code above shows how every object must always be set as content
+ * for some other object, be it by setting the full content, packing it in a
+ * box or table or working as icon for some other widget. But we didn't do
+ * anything like that for the inwin, this one is just created and shown and
+ * everything works. Other widgets can be used this way, but they would need
+ * to be placed and resized manually or nothing would be shown correctly. The
+ * inwin, however, sets itself as a children of the top-level window and will
+ * be resized as the parent window changes too.
+ *
+ * Another characteristic of Inwin is that when it's shown above everyone else,
+ * it will work kind of like a modal window, blocking any other widget from
+ * receiving events until the window is manually dismissed by pressing some
+ * button to close it or having blocking task signalling its completion so
+ * normal operations can be resumed. This is unlike the @ref Hover widget,
+ * that would show its content on top of the designated target, but clicking
+ * anywhere else would dismiss it automatically.
+ *
+ * To illustrate that last point, when we close the main window and an inwin
+ * is still there, we'll take out the content from the inwin and place it in
+ * a hover.
+ * @until }
+ * @until }
+ *
+ * And the rest of the program doesn't have anything else related to inwin,
+ * so it won't be shown here, but you can find it in
+ * @ref inwin_example.c "inwin_example.c".
+ *
+ * @example inwin_example.c
+ */
+
+/**
+ * @page tutorial_scroller Scroller example
+ * @dontinclude scroller_example_01.c
+ *
+ * This example is very short and will illustrate one way to use a scroller.
+ * We'll omit the declaration of the @p text variable because it's a very long
+ * @htmlonly<a href="http://lipsum.com/">@endhtmlonly ipsum lorem
+ * @htmlonly</a>@endhtmlonly. If you really want to see the full code, it's @ref
+ * scroller_example_01.c "scroller_example_01.c".
+ *
+ * We start our example by creating our window and background:
+ * @skip EAPI
+ * @until show(bg)
+ *
+ * Next we create a label and set it's text to @p text(very long ipsum lorem):
+ * @until show(label)
+ *
+ * We then create our scroller, ask that it have the same size as the window and
+ * set its content:
+ * @until content_set
+ *
+ * We are now going to set a number of properties in our scroller:
+ * @li We make it bounce horizontally but not vertically.
+ * @li We make both scrollbars always be visible.
+ * @li We have the events be propagated from the content to the scroller.
+ * @li We enforce a page policy vertically(having a page be the size of the
+ * viewport) and leave horizontal scrolling free.
+ * @li And finally we ask the scroller to show us a region starting at 50,50 and
+ * having a width and height of 200px.
+ * @until region_show
+ * @note Observant reader will note that the elm_scroller_region_show() didn't
+ * scroll the view vertically, this is because we told the scroller to only
+ * accept vertical scrolling in pages.
+ *
+ * And now we're done:
+ * @until ELM_MAIN
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/scroller_example_01.png
+ * @image latex screenshots/scroller_example_01.eps width=\textwidth
+ *
+ * @example scroller_example_01.c
+ */
+
+/**
+ * @page tutorial_table_01
+ *
+ * In this example we add four labels to a homogeneous table that has a padding
+ * of 5px between cells.
+ *
+ * The interesting bits from this example are:
+ * @li Where we set the table as homogeneous and the padding:
+ * @dontinclude table_example_01.c
+ * @skip padding_set
+ * @until homogeneous_set
+ * @li Where we add each label to the table:
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ *
+ * Here you can see the full source:
+ * @include table_example_01.c
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/table_example_01.png
+ * @image latex screenshots/table_example_01.eps width=\textwidth
+ *
+ * @example table_example_01.c
+ */
+
+/**
+ * @page tutorial_table_02
+ *
+ * For our second example we'll create a table with 4 rectangles in it. Since
+ * our rectangles are of different sizes our table won't be homogeneous.
+ *
+ * The interesting bits from this example are:
+ * @li Where we set the table as not homogeneous:
+ * @dontinclude table_example_02.c
+ * @skipline homogeneous_set
+ * @li Where we add each rectangle to the table:
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ * @skipline elm_table_pack
+ *
+ * Here you can see the full source:
+ * @include table_example_02.c
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/table_example_02.png
+ * @image latex screenshots/table_example_02.eps width=\textwidth
+ *
+ * @example table_example_02.c
+ */
+
+/**
+ * @page tutorial_menu Menu Example
+ * @dontinclude menu_example_01.c
+ *
+ * This example shows how to create a menu with regular items, object items,
+ * submenus and how to delete items from a menu. The full source for this
+ * example is @ref menu_example_01.c "menu_example_01.c".
+ *
+ * We'll start looking at the menu creation and how to create a very simple
+ * item:
+ * @skip menu_add
+ * @until item_add
+ *
+ * For our next item we are going to add an icon:
+ * @until item_add
+ *
+ * Now we are going to add more items, but these icons are going to have a
+ * parent, which will put them in a sub-menu. First just another item with an
+ * icon:
+ * @until item_add
+ *
+ * Next we are going to add a button to our menu(any elm widget can be added to
+ * a menu):
+ * @until item_add
+ *
+ * We are also going to have the button delete the first item of our
+ * sub-menu when clicked:
+ * @until smart_callback
+ * @dontinclude menu_example_01.c
+ * @skip static
+ * @until }
+ *
+ * We now add a separator and three more regular items:
+ * @until item_add
+ * @until item_add
+ * @until item_add
+ *
+ * We now add another item, however this time it won't go the sub-menu and it'll
+ * be disabled:
+ * @until disabled_set
+ *
+ * To make sure that our menu is shown whenever the window is clicked(and where
+ * clicked) we use the following callback:
+ * @dontinclude menu_example_01.c
+ * @skip static
+ * @skipline static
+ * @until }
+ *
+ * Our example will look like this:
+ *
+ * @image html screenshots/menu_example_01.png
+ * @image latex screenshots/menu_example_01.eps width=\textwidth
+ *
+ * @example menu_example_01.c
+ */
+
+/**
+ * @page win_example_01 Win - General API overview
+ *
+ * For most users of the Elementary API, the @ref Win widget has a lot more
+ * functions than what they need.
+ *
+ * In general, a developer will create a window, set some content on it and
+ * forget about it for the rest of its program's life, letting whatever
+ * Window Manager is there to handle the window. Here, however, we are going
+ * to show how to generally manage a window.
+ *
+ * We'll have a bit more than the usual includes here, since part of the
+ * example requires some low level fiddling.
+ * @dontinclude win_example.c
+ * @skip Elementary.h
+ * @until Ecore_X.h
+ *
+ * The program then, consists of one window with two lists of buttons, each
+ * of which operates on another two windows. One of them is a normal window,
+ * the other has the @c override flag set so the Window Manager ignores it.
+ *
+ * Pressing each button will call the corresponding function to act on the
+ * corresponding window. These are pretty self explanatory, so we'll show
+ * them in one batch.
+ * @skip static void
+ * @until elm_win_sticky_set
+ * @until }
+ *
+ * Next, we handle the main window closing. We have a @c "delete,request"
+ * callback set to ask if really want to quit. If so, we end the main loop,
+ * otherwise just delete the popup message and continue running normally.
+ * @until _no_quit_cb
+ * @until _no_quit_cb
+ * @until }
+ *
+ * The non-managed window, being completely ignored by the Window Manager,
+ * is likely to never receive keyboard focus, even if we click on its entry
+ * to write something. So we have a button on it that will forcefully focus
+ * it by using some lower level functions to act directly on the X window.
+ * Then, each time one of the window is focused, we print some message on a
+ * console to show this more clearly.
+ * @until _win_focused_cb
+ * @until }
+ *
+ * And to finalize, the main function creates a window to hold all the action
+ * buttons and another two to show how (and what) works on each of them.
+ *
+ * First, the main window will be a normal window, we'll enable the focus
+ * highlight regardless of how it is configured so it's easier to navigate
+ * the window with the keyboard. Then we hook our focus and delete callbacks
+ * and set up the rest of the window's content.
+ * @until evas_object_show(box)
+ *
+ * The first of our sub-windows is the managed one. We'll create it as a
+ * dialog, which should make the Window Manager treat it as a non-resizable
+ * window. We are also setting the window to be auto-deleted when the close
+ * button in the titlebar is pressed.
+ * @until evas_object_show(o)
+ *
+ * Now, we added an icon to the window as a resize object. We also set this
+ * icon to not scale, and no weight size hints have been set for it. This way,
+ * even if we hadn't created the window as a dialog, it would still not be
+ * resizable. The window size is defined by its content, so it would never be
+ * smaller than the smallest of its resize objects, and for it to be resizable,
+ * all of those objects have to allow it.
+ *
+ * Next, we add the buttons with the actions to perform on this window. Using
+ * a macro saves us typing and makes the world a happier place.
+ * @until WIN_ACTION(sticky)
+ *
+ * The maximize one is likely to not work, because the Window Manager will
+ * probably not enforce it upon a window that states its maximum size, much
+ * less a dialog. But that can be changed by editting the example to use
+ * #ELM_WIN_BASIC when creating the window and adding the following line to
+ * the icon set as content
+ * @code
+ * evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ * @endcode
+ *
+ * Lastly, the second sub-window will have it's override flag set. In it we
+ * have a label with some text, and entry and a button. The entry can be
+ * clicked normally to set focus on it, but whether it actually gets keyboard
+ * input will also depend on the window getting focus, and since the window
+ * is an override one, it will probably not gain it by normal means. The
+ * button is there to force the focus at the X level to go to our window.
+ * And to finish, another list of buttons with actions to perform on this
+ * last window. Remember that most of them are requests or hints for the
+ * Window Manager, so they are likely to do nothing on this window.
+ * Similarly, there won't be any way to move it or resize it, because we
+ * haven't implemented that kind of control on this example and that's
+ * something controlled by Window Managers on windows they are tracking, which
+ * is not the case with this one.
+ * @until ELM_MAIN
+ *
+ * The full code listing of this example can be found at
+ * @ref win_example.c "win_example.c".
+ *
+ * @example win_example.c
+ */
+
+/**
+ * @page web_example_01 Web - Simple example
+ *
+ * WebKit-EFL is independent of any particular toolkit, such as Elementary,
+ * so using it on applications requires that the programmer writes a lot of
+ * boiler plate code to manage to manage the web object.
+ *
+ * For a full featured browser this may make sense, as the programmer will
+ * want to have full control of every aspect of the web object, since it's the
+ * main component of the application. But other programs with simpler
+ * requirements, having to write so much code is undesired.
+ *
+ * This is where elm_web comes in. Its purpose is to provide a simple way
+ * for developers to embed a simple web object in their programs, simplifying
+ * the common use cases.
+ *
+ * This is not to say that a browser can't be made out of it, as this example
+ * shows.
+ *
+ * We'll be making a simple browser, consisting of one window with an URL bar,
+ * a toolbar to be used for the tabs and a pager to show one page at a time.
+ *
+ * When all tabs are closed, we'll be showing a default view with some custom
+ * content, for which we need to get the internal @c ewk_view object and use
+ * some WebKit functions on it, thus we need to include the necessary headers
+ * first.
+ *
+ * @dontinclude web_example.c
+ * @skip include
+ * @until EWebKit
+ *
+ * A struct to keep track of the different widgets in use and the currently
+ * shown tab. There's also an @c exiting flag, used to work around the overly
+ * simplistic way in which this example is written, just to avoid some
+ * warnings when closing the program.
+ *
+ * @skip typedef
+ * @skip typedef
+ * @until App_Data
+ *
+ * Each tab has its own struct too, but there's not much to it.
+ * @until };
+ *
+ * Whenever the currently selected tab changes, we need to update some state
+ * on the application. The back and forward buttons need to be disabled
+ * accordingly and the URL bar needs to show the right address.
+ *
+ * @skip static void
+ * @until naviframe_item_simple_promote
+ * @until }
+ *
+ * Other updates happen based on events from the web object, like title change
+ * to update the name shown in the tab, and URL change which will update the
+ * URL bar if the event came from the currently selected tab.
+ *
+ * @skip tab_current_set
+ * @skip static void
+ * @until }
+ * @until }
+ *
+ * Adding a new tab is just a matter of creating a new web widget, its data
+ * and pushing it into the pager. A lot of the things that we should handle
+ * here, such as how to react to popups and JavaScript dialogs, are done
+ * already in the @c elm_web widget, so we can rely on their default
+ * implementations. For the JavaScript dialogs we are going to avoid having
+ * them open in a new window by setting the @c Inwin mode.
+ *
+ * There is no default implementation, however, for the requests to create a
+ * new window, so we have to handle them by setting a callback function that
+ * will ultimately call this very same function to add a new tab.
+ *
+ * @skip Tab_Data
+ * @until }
+ *
+ * Entering an address in the URL bar will check if a tab exists, and if not,
+ * create one and set the URL for it. The address needs to conform to the URI
+ * format, so we check that it does and add the protocol if it's missing.
+ *
+ * @skip static char
+ * @until eina_stringshare_del
+ * @until }
+ *
+ * The navigation buttons are simple enough. As for the refresh, it normally
+ * reloads the page using anything that may exist in the caches if applicable,
+ * but we can press it while holding the @c Shift key to avoid the cache.
+ *
+ * @skip static void
+ * @until web_forward
+ * @until }
+ *
+ * The callback set for the new window request creates a new tab and returns
+ * the web widget associated with it. This is important, this function must
+ * return a valid web widget returned by elm_web_add().
+ *
+ * @skip static Evas_Object
+ * @until }
+ *
+ * Pressing @c Ctrl-F will bring up the search box. Nothing about the box
+ * itself is worth mentioning here, but it works as you would expect from any
+ * other browser. While typing on it, it will highlight all occurrences of the
+ * searched word. Pressing @c Enter will go to the next instance and the two
+ * buttons next to the entry will move forward and backwards through the found
+ * keywords.
+ *
+ * @skip win_del_request
+ * @skip static void
+ * @until win_search_trigger
+ * @until }
+ *
+ * Last, create the main window and put all of the things used above in it. It
+ * contains a default web widget that will be shown when no tabs exist. This
+ * web object is not browsable per se, so history is disabled in it, and we
+ * set the same callback to create new windows, on top of setting some custom
+ * content of our own on it, with some links that will open new tabs to start
+ * browsing quickly.
+ *
+ * @skip static void
+ * @until ELM_MAIN
+ *
+ * Some parts of the code were left out, as they are not relevant to the
+ * example, but the full listing can be found at @ref web_example.c
+ * "web_example.c".
+ *
+ * @example web_example.c
+ */
+
+/**
+ * @page efl_thread_1 EFL Threading example 1
+ *
+ * You can use threads with Elementary (and EFL) but you need to be careful
+ * to only use eina or eet calls inside a thread. Other libraries are not
+ * totally threadsafe except for some specific ecore calls designed for
+ * working from threads like the ecore_pipe_write() and ecore_thread calls.
+ *
+ * Below is an example of how to use EFL calls from a native thread you have
+ * already created. You have to put the EFL calls inside the critical block
+ * between ecore_thread_main_loop_begin() and ecore_thread_main_loop_end()
+ * which ensure you gain a lock on the mainloop. Beware that this requires
+ * that the thread WAIT to synchronize with the mainloop at the beginning of
+ * the critical section. It is highly suggested you use as few of these
+ * in your thread as possible and probably put just a single
+ * ecore_thread_main_loop_begin() / ecore_thread_main_loop_end() section
+ * at the end of the threads calculation or work when it is done and
+ * would otherwise exit to sit idle.
+ *
+ * For a progression of examples that become more complex and show other
+ * ways to use threading with EFL, please see:
+ *
+ * @ref efl_thread_2
+ *
+ * @ref efl_thread_3
+ *
+ * @ref efl_thread_4
+ *
+ * @ref efl_thread_5
+ *
+ * @ref efl_thread_6
+ *
+ * @include efl_thread_1.c
+ */
+
+/**
+ * @page efl_thread_2 EFL Threading example 2
+ *
+ * You can also use ecore_main_loop_thread_safe_call_sync() to call a
+ * specific function that needs to do EFL main loop operations. This call
+ * will block and wait to synchronise to the mainloop just like
+ * ecore_thread_main_loop_begin() / ecore_thread_main_loop_end() will,
+ * but instead you simply provide it the function callback to call instead
+ * of inlining your code.
+ *
+ * @ref efl_thread_3
+ *
+ * @ref efl_thread_4
+ *
+ * @ref efl_thread_5
+ *
+ * @ref efl_thread_6
+ *
+ * @include efl_thread_2.c
+ */
+
+/**
+ * @page efl_thread_3 EFL Threading example 3
+ *
+ * Like with ecore_main_loop_thread_safe_call_sync() you can provide a
+ * callback to call inline in the mainloop, but this time with
+ * ecore_main_loop_thread_safe_call_async() the callback is queued and
+ * called asynchronously, without the thread blocking. The mainloop will
+ * call this function when it comes around to its synchronisation point. This
+ * acts as a "fire and forget" way of having the mainloop do some work
+ * for a thread that has finished processing some data and is read to hand it
+ * off to the mainloop and the thread wants to march on and do some more work
+ * while the main loop deals with "displaying" the results of the previous
+ * calculation.
+ *
+ * @ref efl_thread_4
+ *
+ * @ref efl_thread_5
+ *
+ * @ref efl_thread_6
+ *
+ * @include efl_thread_3.c
+ */
+
+/**
+ * @page efl_thread_4 EFL Threading example 4
+ *
+ * Now when you want to have a thread do some work, send back results to
+ * the mainloop and continue running but the mainloop controls when the
+ * thread should stop working, you need some extra flags. This is an example
+ * of how you might use ecore_main_loop_thread_safe_call_async() and pthreads
+ * to do this.
+ *
+ * @ref efl_thread_5
+ *
+ * @ref efl_thread_6
+ *
+ * @include efl_thread_4.c
+ */
+
+/**
+ * @page efl_thread_5 EFL Threading example 5
+ *
+ * This is the same as @ref efl_thread_4 but now uses the ecore_thread
+ * infrastructure to have a running worker thread that feeds results back
+ * to the mainloop and can easily be cancelled. This saves some code in the
+ * application and makes for fewer problem spots if you forget a mutex.
+ *
+ * @ref efl_thread_6
+ *
+ * @include efl_thread_5.c
+ */
+
+/**
+ * @page efl_thread_6 EFL Threading example 6
+ *
+ * You can also use the ecore_thread infrastructure for compute tasks that
+ * don't send feedback as they go - they are one-shot compute jobs and when
+ * done they will trigger the end callback in the mainloop which is intended
+ * to pick up the results and "display them".
+ *
+ * @include efl_thread_6.c
+ */
+
+/**
+ * @page bg_example_01_c bg_example_01.c
+ * @include bg_example_01.c
+ * @example bg_example_01.c
+ */
+
+/**
+ * @page bg_example_02_c bg_example_02.c
+ * @include bg_example_02.c
+ * @example bg_example_02.c
+ */
+
+/**
+ * @page bg_example_03_c bg_example_03.c
+ * @include bg_example_03.c
+ * @example bg_example_03.c
+ */
+
+/**
+ * @page actionslider_example_01 Actionslider example
+ * @include actionslider_example_01.c
+ * @example actionslider_example_01.c
+ */
+
+/**
+ * @page transit_example_01_c Transit example 1
+ * @include transit_example_01.c
+ * @example transit_example_01.c
+ */
+
+/**
+ * @page transit_example_02_c Transit example 2
+ * @include transit_example_02.c
+ * @example transit_example_02.c
+ */
+
+/**
+ * @page general_functions_example_c General (top-level) functions example
+ * @include general_funcs_example.c
+ * @example general_funcs_example.c
+ */
+
+/**
+ * @page clock_example_c Clock example