Tizen Native API
|
Swallow example 2
This example will show you how to load an image using evas and fill a swallow with it. It's basically almost like the last example, but with a minor change.
This variables are used to store the name of the image that is going to be used, the path to it and a variable that will store the error cause if something goes wrong.
Here it is:
Then we load the image with this command:
To check if we had some problem we use:
Now we are going to swallow it and check if worked. If you notice we are using "part_one" as argument. We do this because we must explicit what part of our .edc file we want to swallow:
The example's window should look like this picture:
The complete .edc file:
And the source code:
To compile use this command:
* gcc -o edje-swallow2 edje-swallow2.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 swallow.edc *