Tizen Native API
|
In this example we will figure out how to manipulate the animations on an Edje object. After reading this document you will be able to manipulate the frametime, freeze, pause and stop, all animations on an Edje object.
To play with this example you will use the keyboard. Below are listed the keys and what each does.
- '+' Increase the frametime;
- '-' Decrease the frametime;
- '=' Prints the actual frametime and says if the animations is playing;
- 'f' Freezes the animations in the Edje object;
- 'F' Freezes the animations in all objects in the running program;
- 't' Thaws the animations in the Edje object;
- 'T' Thaws the animations in all objects in the running program;
- 's' Pauses the animations;
- 'p' Plays the animations previously stopped;
- 'a' Starts the animation in the Edje object;
- 'A' Stops the animations in the Edje object;
Now that we've explained how to use our example, we will see how it is made. Let's start by looking at the piece of code responsible to the actions commented above.
- Note:
- The actions for the keys 'f' and 'F' will have the same effect in our example, just because there is only one object in the running program, The same happens with the keys 't' and 'T'.
As you may have seen these set of functions are pretty easy to handle. The other important part of this example is the EDC file. The animations used in the code were created there
The example's window should look like this picture:
The full example follows.
To compile use this command:
* gcc -o edje-animations edje-animations.c -DPACKAGE_BIN_DIR=\"/Where/enlightenment/is/installed/bin\" * -DPACKAGE_LIB_DIR=\"/Where/enlightenment/is/installed/lib\" * -DPACKAGE_DATA_DIR=\"/Where/enlightenment/is/installed/share\" * `pkg-config --cflags --libs evas ecore ecore-evas edje` * * edje_cc animations.edc *