Tizen Native API
|
In this example we will show how to load an image and move it across the window.
To load the image to our program, it needs to be declared in the .edc using the images block:
- Note:
- COMP means that we are using a lossless compression
Then to be able to use it in our window we must declare a part for this image:
Now we move to our .c file, you will notice this define:
This means how fast we want to move the image across the screen
To load our edje file we will use this command, we do just like the last example (Basic example):
If we want to move our image, we need to add a callback to be able to do this, so we define:
To get the position of the image we use this:
Now we use the if's to check in what direction the user wants to move the image then we move it:
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-basic2 edje-basic2.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 -id /path/to/the/image basic2.edc *