2 * @page Examples Examples
4 * Here is a page with examples.
6 * @ref Example_Evas_Buffer_Simple
8 * @ref Example_Evas_Init_Shutdown
10 * @ref Example_Evas_Images
12 * @ref Example_Evas_Images_2
14 * @ref Example_Evas_Events
16 * @ref Example_Evas_Object_Manipulation
18 * @ref Example_Evas_Aspect_Hints
20 * @ref Example_Evas_Size_Hints
22 * @ref Example_Evas_Stacking
24 * @ref Example_Evas_Smart_Objects
28 * @page Example_Evas_Buffer_Simple Simple Evas canvas example
30 * The canvas will here use the buffer engine.
32 * @include evas-buffer-simple.c
33 * @example evas-buffer-simple.c
37 * @page Example_Evas_Init_Shutdown Evas' init/shutdown routines example
39 * @include evas-init-shutdown.c
40 * @example evas-init-shutdown.c
44 * @page Example_Evas_Images Some image object functions examples
45 * @dontinclude evas-images.c
47 * In this example, we add two images to a canvas, each one having a
48 * quarter of the canvas' size, positioned on the top left and bottom
49 * right corners, respectively:
50 * @skip img1 = evas_object_image_add(d.evas);
51 * @until ecore_main_loop_begin
52 * See there is a border image around the top left one, <b>which is
53 * the one that should be displayed</b>. The other one will (on
54 * purpose) fail to load, because we set a wrong file path as image
56 * @dontinclude evas-images.c
59 * This is how one is supposed to test for success when binding source
60 * images to image objects: evas_object_image_load_error_get(),
61 * followed by evas_load_error_str(), if one wants to pretty print/log
62 * the error. We'll talk about the border image further.
64 * To interact with the program, there's a command line interface.
65 * A help string can be asked for with the 'h' key:
66 * @dontinclude evas-images.c
69 * The first four commands will change the top left images's @b fill property
70 * values, which dictate how the source image (Enlightenment's logo)
71 * is to be displayed through the image object's area. Experiment with
72 * those switches until you get the idea of evas_object_fill_set().
74 * The 'f' command will toggle that image's "filled" property, which
75 * is wheter it should track its size and set the fill one to fit the
76 * object's boundaries perfectly (stretching). Note that this command
77 * and the four above it will conflict: in real usage one would use
78 * one or other ways of setting an image object's viewport with regard
79 * to its image source.
81 * There are four commands which deal with the border image. This red
82 * frame is there to illustrate <b>image borders</b>. The image source
83 * for the border is a solid red rectangle, with a transparent @b
84 * rectangular area in its middle. See how we use it to get a 3 pixel
85 * wide frame with <code>evas_object_image_border_set(d.border, 3, 3,
86 * 3, 3)</code>. To finish the effect of showing it as a border, we
87 * issue <code>evas_object_image_border_center_fill_set(d.border,
88 * EVAS_BORDER_FILL_NONE)</code>.
90 * Use 't' to change the border's thickness. 'b' will change the
91 * border image's center region rendering schema: either a hole (no
92 * rendering), blending (see the original transparent area, in this
93 * case) or solid (the transparent area gets filled). Finally, 'c'
94 * will change the border's scaling factor.
96 * While you have the border in 'blending mode', test the command 'm':
97 * it will set whether to use or not smooth scaling on the border's
98 * source image. Since the image is small originallly (30 x 30), we're
99 * obviously up-scaling it (except the border pixels, do you
100 * remember?). With this last switch, you'll either see the
101 * transparent shape in the middle flat (no smoothing) or blurry
104 * The full example follows.
106 * @include evas-images.c
107 * @example evas-images.c
111 * @page Example_Evas_Images_2 Some more image object functions examples (2nd block)
112 * @dontinclude evas-images2.c
114 * In this example, we have three images on the canvas, but one of
115 * them is special -- we're using it as a <b>proxy image
116 * object</b>. It will mirror the contents of the other two images
117 * (which are the ones on the top of the canvas), one at a time:
118 * @skip d.proxy_img = evas_object_image_filled_add(d.evas);
119 * @until evas_object_show(d.proxy_img);
120 * As in other examples, we have a command line interface on it.
121 * @dontinclude evas-images2.c
124 * The 'p' one will change the source of the proxy image to one of the
125 * other two, as seem above.
126 * @skip if (strcmp(ev->keyname, "p") == 0)
128 * Note the top right image, the smaller one:
129 * @dontinclude evas-images2.c
132 * Since we are creating the data for its pixel buffer ourselves, we
133 * have to set its size with evas_object_image_size_set(), first. We
134 * set our data with the function evas_object_image_data_set(), where
135 * the second argument is a buffer with random data. There's a last
136 * command to print it's @b stride value. Since its created with one
137 * quarter of the canvas's original width
138 * @dontinclude evas-images2.c
140 * @until define HEIGHT
141 * you can check this value.
143 * The image on the top left also has a subtlety: it is @b pre-loaded
145 * @dontinclude evas-images2.c
148 * On real use cases we wouldn't be just printing something like this
149 * @dontinclude evas-images2.c
154 * The 's' command will save one of the images on the disk, in the png
156 * @dontinclude evas-images2.c
157 * @skip if (strcmp(ev->keyname, "a") == 0)
160 * The full example follows.
162 * @include evas-images2.c
163 * @example evas-images2.c
167 * @page Example_Evas_Events Evas events (canvas and object ones) and some canvas operations example
168 * @dontinclude evas-events.c
170 * In this example we illustrate how to interact with canvas' (and
171 * its objects') events and other canvas operations.
173 * After we grab our canvas pointer, we registrate two event callbacks on it:
174 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
175 * @until two canvas event callbacks
176 * The first of them, which has the following code,
177 * @dontinclude evas-events.c
178 * @skip render flush callback
180 * will be called whenever our canvas has to flush its rendering pipeline.
181 * In this example, two ways of observing that message which is printed in
182 * the cited callback are:
183 * - to resize the example's window (thus resizing the canvas' viewport)
184 * - let the animation run
186 * When one resizes the canvas, there's at least one operation it has
187 * to do which will require new calculation for rendering: the
188 * resizing of the background rectangle:
189 * @dontinclude evas-events.c
190 * @skip here just to keep
192 * The animation we talked about comes from a timer we register just before
193 * we start the example's main loop:
194 * @dontinclude evas-events.c
195 * @skip d.resize_timer = ecore
196 * @until d.resize_timer = ecore
197 * being the timer's callback what follows:
198 * @dontinclude evas-events.c
199 * @skip put some action
201 * As you see, the resizing of the image will also force the canvas to
202 * repaint itself, thus flushing the rendering pipeline whenever the
203 * timer ticks. When you start this example, this animation will be
204 * running, by default. To interact with the program, there's a
205 * command line interface. A help string can be asked for with the
207 * @dontinclude evas-events.c
208 * @skip if (strcmp(ev->keyname, "h") == 0)
210 * These are the commands the example will accept at any time, except
211 * when one triggers the 'f' one:
212 * @skip if (strcmp(ev->keyname, "f") == 0)
214 * This command will exemplify evas_event_freeze(), which interrupts
215 * @b all input events processing for the canvas (in the example, just
216 * for 3 seconds). Try to issue events for it during that freeze time.
217 * The 'd' command will unregister those two canvas callbacks for you,
218 * so you won't see the messages about the focused object and the
219 * rendering process anymore:
220 * @dontinclude evas-events.c
221 * @skip if (strcmp(ev->keyname, "d") == 0)
223 * The second of those callbacks has the following code:
224 * @dontinclude evas-events.c
225 * @skip called when our rectangle gets focus
227 * It will take place whenever an object in the canvas receives
228 * focus. In this example, we use the focus to handle the input
230 * @skip so we get input events
232 * The background rectangle is the chosen object to receive the
233 * focus. This also illustrates the use of
234 * evas_object_event_callback_add(), which registers an event callback
235 * on an Evas @b object (in this case, the event of a key being
236 * pressed down). On this callback, we examine each key pressed and,
237 * if they match one between the expected, we take some actions:
238 * @dontinclude evas-events.c
239 * @skip examine the keys pressed
241 * We do so by examining the @c ev->keyname string (remember the event
242 * information struct for key down events is the #Evas_Event_Key_Down
243 * one). There's one more trick for grabbing input events on this
244 * example -- evas_object_key_grab(). The 'c' command will, when
245 * firstly used, @b unfocus the background rectangle. Unfocused
246 * objects on an Evas canvas will @b never receive key events. We
247 * grab, then, the keys we're interested at, to the object forcefully:
249 * @until got here by key grabs
250 * This shows how one can handle input not depending on focus issues
251 * -- you can grab them globally. Switch back and forth focus and
252 * forced key grabbing with the 'c' key, and observe the messages
253 * printed about the focused object. Observe, also, that we register
254 * two more @b object callbacks, this time on the image object
255 * (Enlightenment logo):
256 * @skip evas_object_show(d.img);
257 * @until mouse_out, NULL
258 * The code code blocks for those callbacks are
259 * @dontinclude evas-events.c
260 * @skip mouse enters the object's area
261 * @until mouse exits the object's area
262 * Experiment with moving the mouse pointer over the image, letting it
263 * enter and exit its area (stop the animation with 'a', for a better
264 * experience). When you start the example, Evas will consider this
265 * area by being the whole boundary rectangle around the picture. If
266 * you issue the 'p' command, though, you get a demonstration of Evas'
267 * precise point collision detection on objects:
268 * @dontinclude evas-events.c
269 * @skip if (strcmp(ev->keyname, "p") == 0)
271 * With evas_object_precise_is_inside_get(), one can make Evas
272 * consider the transparent areas of an object (the middle of the
273 * logo's E letter, in the case) as not belonging to it when
274 * calculating mouse in/out/up/down events. To finish the example, try
275 * the command bound to Cotrol + 'o':
276 * @skip mods = evas_key_modifier_get(evas);
277 * @until end of obscured region command
278 * It exemplifies Evas' <b>obscured regions</b>. When firstly pressed,
279 * you'll get the same contents, in a region in the middle of the
280 * canvas, at the time the key was pressed, until you toggle the
281 * effect off again (make sure the animation is running on to get the
282 * idea better). When you toggle this effect off, we also demonstrate
283 * the use of evas_render_updates(), which will force immediate
284 * updates on the canvas rendering, bringing back the obscured
285 * region's contents to normal.
287 * What follows is the complete code for this example.
289 * @include evas-events.c
290 * @example evas-events.c
294 * @page Example_Evas_Object_Manipulation Evas objects basic manipulation example
296 * @include evas-object-manipulation.c
297 * @example evas-object-manipulation.c
301 * @page Example_Evas_Aspect_Hints Evas aspect hints example
303 * @include evas-aspect-hints.c
304 * @example evas-aspect-hints.c
308 * @page Example_Evas_Size_Hints Evas alignment, minimum size, maximum size, padding and weight hints example
310 * @include evas-hints.c
311 * @example evas-hints.c
315 * @page Example_Evas_Stacking Evas object stacking functions (and some event handling)
316 * @dontinclude evas-stacking.c
318 * In this example, we illustrate how to stack objects in a custom
319 * manner and how to deal with layers.
321 * We have three objects of interest in it -- white background, red
322 * rectangle, green rectangle and blue rectangle.
323 * @skip d.bg = evas_object_rectangle_add(d.canvas);
324 * @until evas_object_resize(d.bg, WIDTH, HEIGHT);
325 * @skip d.rects[2] = evas_object_rectangle_add(d.canvas);
326 * @until evas_object_show(d.rects[0]);
327 * @dontinclude evas-stacking.c
328 * Like in other Evas examples, one interacts with it be means of key commands:
329 * @skip "commands are:\n"
330 * @until "\th - print help\n");
331 * At any given point, like seem above, you'll be operating one rectangle only.
332 * Try stacking it below an adjacent object with "b":
333 * @skip evas_object_stack_below(d.rects[d.cur_rect], neighbour);
334 * @until evas_object_stack_below(d.rects[d.cur_rect], neighbour);
335 * @dontinclude evas-stacking.c
336 * "a" will do the opposite:
337 * @skip evas_object_stack_above(d.rects[d.cur_rect], neighbour);
338 * @until evas_object_stack_above(d.rects[d.cur_rect], neighbour);
339 * To bring it directly to the top/bottom, use "t"/"m", respectively:
340 * @dontinclude evas-stacking.c
341 * @skip evas_object_raise(d.rects[d.cur_rect]);
342 * @until evas_object_raise(d.rects[d.cur_rect]);
343 * @skip evas_object_lower(d.rects[d.cur_rect]);
344 * @until evas_object_lower(d.rects[d.cur_rect]);
345 * At any time, use the "s" command to see the status of the
346 * ordering. It will show the background's ordering too. Note that it
347 * also shows the @b layer for this object. It starts at a @b
348 * different layer than the others. Use "l" to change its layer
349 * (higher layer numbers mean higher layers). If the background is on
350 * the same layer as the others (0), you'll see it interact with them
351 * on the ordering. If it's in the layer above, no matter what you do,
352 * you'll see nothing but the white rectangle: it covers the other
353 * layers. For the initial layer (-1), it will never mess nor occlude
356 * The last two commands available are "p" and "r", which will make
357 * the target rectangle to @b pass (ignore) and @b repeat the mouse
358 * events occurring on it (the commands will cycle through on and off
359 * states). This is demonstrated with the following
360 * #EVAS_CALLBACK_MOUSE_DOWN callback, registered on each of the
361 * colored rectangles:
362 * @dontinclude evas-stacking.c
365 * Try to change these properties on the three rectangles while
366 * experimenting with mouse clicks on their intersection region.
368 * The full example follows.
370 * @include evas-stacking.c
371 * @example evas-stacking.c
375 * @page Example_Evas_Map_Overview Evas Map - Overview
376 * @dontinclude evas-map-utils.c
378 * Down to the very bottom, Map is simple: it takes an object and transforms
379 * the way it will be shown on screen. But using it properly can be a bit
382 * For the most common operations there are utility functions that help in
383 * setting up the map to achieve the desired effects. Now we'll go through
384 * an overview of the map API and some of the things that can be done with
387 * The full code can be found @ref evas-map-utils.c "here".
389 * To show how some funtions work, this example listens to keys pressed to
390 * toggle several options.
395 * In this program, we divide the window in four quadrants, each holding an
396 * object that will have different map configurations applied to them in each
397 * call to an animator function.
398 * @skip static Eina_Bool
399 * @until evas_output_size_get
401 * Let's first create a map and set some of our options to it. Only four
402 * points maps are supported, so we'll stick to that magic number. We can
403 * set a color for each vertex or apply one for all of them at once
404 * @until evas_map_util_points_color_set
406 * For the first object, we'll have a plain rectangle. At its cration, this
407 * rectangle was set to be semi-transparent, but whether its own alpha is
408 * used will be defined by the map's alpha setting. If the map's alpha is
409 * disabled, then the object will be completely opaque. The map's own color,
410 * however, will use any alpha set to it.
412 * So we get our object, initialize our map geometry to match the rectangle
413 * and make it rotate around its own center, then apply the map to the
414 * object so it takes effect.
415 * @until evas_object_map_enable_set
417 * The second object is an image. Here we don't have any color set for the
418 * object, but the image itself contains an alpha channel that will not be
419 * affected by the map settings, so even with alpha set to be off, the image
420 * will still be transparent. Color applied to the map will tint it though.
421 * Since setting a map copies it into the object, we can reuse the same one
422 * we created before. We initialize it to the new object while all other
423 * options are kept the same. Notice that no rotation will be done here, as
424 * that's just an utility function that takes the coordinates set for each
425 * point of the map and transforms it accordingly.
426 * @until evas_map_util_points_populate_from_object_full
428 * This time the object is a bit farther into the screen, by using a @c z
429 * value higher than 0 to init the map. We also need to map the image used
430 * by the object, so Evas knows how to transform it properly. For this we
431 * use the evas_map_point_image_uv_set() to tell the map what coordinate
432 * within the image corresponds to each point of the map.
433 * @until evas_map_point_image_uv_set(m, 3
435 * This object will also be rotated, but in all three axis and around some
436 * other point, not its center, chosen mostly at random. If enabled, lighting
437 * will be applied to, from a light source at the center of the window.
438 * @until evas_object_map_enable_set
440 * For the third object we are doing, once more, a 3D rotation, but this time
441 * perspective will be applied to our map to make it look more realistic.
442 * The lighting source also follows the mouse cursor and it's possible to
443 * toggle backface culling, so that the object is hidden whenever we are
444 * not seeing its front face.
445 * @until evas_object_map_enable_set
447 * And we free this map, since since we messed too much with it and for the
448 * last object we want something cleaner.
449 * @until evas_map_free
451 * The last object is actually two. One image, with an image set to it, and
452 * one image proxying the first one with evas_object_image_source_set(). This
453 * way, the second object will show whatever content its source has.
454 * This time we'll be using a map more manually to simulate a simple reflection
455 * of the original image.
457 * We know that the reflection object is placed just like the original, so
458 * we take a shortcut by just getting the geometry of our to-be-mapped object.
459 * We also need to get the image size of the source.
460 * @until evas_object_image_size_get
462 * For this we'll create a map shaped so that it begins at the base of our
463 * image and it expands horizontally as it grows (downwards) in height.
464 * @until evas_map_point_coord_set(m, 3
466 * Since the reflection should show the image inverted, we need to map it
467 * this way. The first point of the map (top-left) will be mapped to the
468 * mapped to the first pixel of the last row. There's no horizontal reflection
469 * and we want the full width of the image, but as we map its upper side ww
470 * will only take two thirds of the image.
471 * @until evas_map_point_image_uv_set(m, 3
473 * Finally, to fade out our reflection we set the colors for each point in
474 * the map. The two at the top need to be visible, but we'll tone them down
475 * a bit and make them a bit translucent. The other two will go straight to
476 * full transparency. Evas interpolates the colors from one point to the next,
477 * so this will make them fade out.
478 * @until evas_object_map_enable_set
480 * Close up by freeing the map and do some other things needed to keep stuff
481 * moving in our animations and we are done.
484 * The rest of the program is setup and listening to key events. Nothing that
485 * matters within the scope of this example, so we are going to skip it.
486 * Refer to it @ref evas-map-utils.c "here" however to see how everything
489 * @example evas-map-utils.c
493 * @page Example_Evas_Smart_Objects Evas object smart objects
494 * @dontinclude evas-smart-object.c
496 * In this example, we illustrate how to create and handle Evas smart objects.
498 * A smart object is one that provides custom functions to handle
499 * clipping, hiding, moving, resizing, color setting and more on @b
500 * child elements, automatically, for the smart object's user. They
501 * could be as simple as a group of objects that move together (see
502 * @ref Evas_Smart_Object_Clipped) or implementations of whole complex
503 * UI widgets, providing some intelligence (thus the name) and
504 * extension to simple Evas objects.
506 * Here, we create one as an example. What it does is to control (at
507 * maximum) 2 child objects, with regard to their geometries and
508 * colors. There can be a "left" child and a "right" one. The former
509 * will always occupy the top left quadrant of the smart object's
510 * area, while the latter will occupy the bottom right. The smart
511 * object will also contain an @b internal decorative border object,
512 * which will also be controlled by it, naturally.
514 * Here is where we add it to the canvas:
515 * @skip d.smt = evas_smart_example_add(d.evas);
518 * The magic starts to happen in the @c evas_smart_example_add()
519 * function, which is one in the example smart object's defined @b
520 * interface. These should be the functions you would export to the
521 * users of your smart object. We made three for this one:
522 * - @c evas_smart_example_add(): add a new instance of the example
523 * smart object to a canvas
524 * - @c evas_smart_example_remove(): remove a given child of the smart
526 * - @c evas_smart_example_set_left(): set the left child of the smart
528 * - @c evas_smart_example_set_right(): set the right child of the
531 * The object's creation takes place as:
532 * @dontinclude evas-smart-object.c
533 * @skip add a new example smart object to a canvas
536 * Smart objects are define by <b>smart classes</b>, which are structs
537 * defining their interfaces, or <b>smart functions</b> (see
538 * #Evas_Smart_Class, the base class for any smart object). As you
539 * see, one has to use the evas_object_smart_add() function to
540 * instantiate smart objects. Its second parameter is what matters --
541 * an #Evas_Smart struct, which contains all the smart class
542 * definitions (smart functions, smart callbacks, and the like). Note,
543 * however, that @c _evas_smart_example_smart_class_new() seems not to
544 * be defined in our example's code. That's because it came from a very
545 * handy <b>helper macro</b>:
546 * @dontinclude evas-smart-object.c
547 * @skip EVAS_SMART_SUBCLASS_NEW
548 * @until _smart_callbacks
549 * What it does is to @b subclass a given existing smart class, thus
550 * specializing it. This is very common and useful in Evas. There is a
551 * built-in smart object, the "clipped smart object", which implements
552 * a behavior mostly desired by many other smart object implementors:
553 * it will clip its children to its area and move them along with it,
554 * on evas_object_resize() calls. Then, our example smart object will
555 * get that behavior for free.
557 * The first argument to the macro,
558 * @dontinclude evas-smart-object.c
559 * @skip _evas_smart_example_type
560 * @until _evas_smart_example_type
561 * will define the new smart class' name. The second tells the macro
562 * what is the @b prefix of the function it will be declaring with a @c
563 * _smart_set_user() suffix. On this function, we may override/extend
564 * any desired method from our parent smart class:
565 * @dontinclude evas-smart-object.c
566 * @skip setting our smart interface
569 * The first function pointer's code will take place at an example
570 * smart object's @b creation time:
571 * @dontinclude evas-smart-object.c
572 * @skip create and setup
575 * The #EVAS_SMART_DATA_ALLOC macro will take care of allocating our
576 * smart object data, which will be available on other contexts for us
577 * (mainly in our interface functions):
578 * @dontinclude evas-smart-object.c
579 * @skip typedef struct _Evas_Smart_Example_Data
582 * See that, as we're inheriting from the clipped smart object's
583 * class, we @b must have their data struct as our first member. Other
584 * data of interest for us is a child members array and the border
585 * object's handle. The latter is what is created in the last
586 * mentioned function. Note how to tell Evas the border will be
587 * managed by our smart object from that time on:
588 * <code>evas_object_smart_member_add(priv->border, o);</code>.
589 * The counterpart of this function is exemplifyed on the smart
590 * object's interface function to remove children:
591 * @skip remove a child element
594 * At the end of that function we make use of an constant defined by
595 * the #EVAS_SMART_SUBCLASS_NEW: @c _evas_smart_example_parent_sc. It
596 * has the same prefix we passed to the macro, as you can see, and it
597 * holds a pointer to our @b parent smart class. Then, we can call the
598 * specialized method, itself, after our code. The @c del, @c hide, @c
599 * show and @c resize specializations are straightforward, we let the
600 * reader take a look at them below to check their behavior. What's
601 * interesting is the @c calculate one:
602 * @dontinclude evas-smart-object.c
603 * @skip act on child objects' properties
606 * This code will take place whenever the smart object itself is
607 * flagged "dirty", i.e., must be recalculated for rendering (that
608 * could come from changes on its clipper, resizing, moving,
609 * etc). There, we make sure the decorative border lies on the edges of
610 * the smart object and the children, if any, lie on their respective
613 * After instantiating our smart object, we do some checks to exemplify
614 * some of the API on smart objects:
615 * @dontinclude evas-smart-object.c
616 * @skip ret = evas_object_smart_type_check
618 * The evas_object_smart_type_check() one will assure we have the
619 * string naming our smart class really set to the live object. The
620 * evas_object_smart_clipped_clipper_get() exemplifyes usage of
621 * "static clippers" -- clipped smart objects have their global
622 * clippers flagged static.
624 * Other important things we also exemplify here are <b>smart
625 * callbacks</b> and smart callback @b introspection:
626 * @dontinclude evas-smart-object.c
627 * @skip EVT_CHILDREN_NUMBER_CHANGED
630 * Here we declare our array of smart callback descriptions, which has
631 * one element only, in this case. That callback will take place, as
632 * the name indicates, whenever the number of member objects in our
633 * smart object example instance changes. That global array variable
634 * must be the last argument to #EVAS_SMART_SUBCLASS_NEW, so that it's
635 * registered as the <b>smart class</b>'s callbacks description.
637 * After we instantiate the smart object, we take a look on those
638 * descriptions and register a callback on that unique smart event:
639 * @dontinclude evas-smart-object.c
643 * The code of the callback will just print how many member objects we
644 * have, which is an integer argument of the callback itself, as
645 * flagged by its description:
646 * @dontinclude evas-smart-object.c
647 * @skip callback on number of member objects changed
650 * One of the points at which we issue that callback is inside the @c
651 * evas_smart_example_remove(), code that was already shown.
653 * As in other examples, to interact with this one there's a command
654 * line interface. A help string can be asked for with the 'h' key:
655 * @dontinclude evas-smart-object.c
656 * @skip static const char *commands =
658 * Use 'l' and 'r' keys, to create new rectangles and place them on
659 * the left (@c evas_smart_example_set_left()) or right (@c
660 * evas_smart_example_set_right()) spots of our smart object,
661 * respectively. The 'w' command will remove all member objects from
662 * the smart object and delete them. The keyboard arrows will move the
663 * smart object along the canvas. See how it takes any child objects
664 * with it during its movement. The 'd' and 'i' keys will increase or
665 * decrease the smart object's size -- see how it affects the
666 * children's sizes, too. Finally, 'c' will change the color of the
667 * smart object's clipper (which is the exact internal clipper coming
668 * from a clipped smart object):
669 * @dontinclude evas-smart-object.c
673 * "Real life" examples of smart objects are Edje and Emotion objects:
674 * they both have independent libraries implementing their
675 * behavior. The full example follows.
677 * @include evas-smart-object.c
678 * @example evas-smart-object.c