examples.dox | examples.dox | |||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
* In this example, we illustrate how to start using the Edje library, | * In this example, we illustrate how to start using the Edje library, | |||
* with the very basic one needs to instantiate an Edje object. | * with the very basic one needs to instantiate an Edje object. | |||
* | * | |||
* We place, in the canvas, an Edje object along with a @b red border | * We place, in the canvas, an Edje object along with a @b red border | |||
* image to delimit its geometry. After we instantiate the Edje | * image to delimit its geometry. After we instantiate the Edje | |||
* object, we @b have to set a file and a group, within that file, to | * object, we @b have to set a file and a group, within that file, to | |||
* bind to it. For this example, we're using an EDC file which | * bind to it. For this example, we're using an EDC file which | |||
* declares two parts (blue and green rectangles) and an item data: | * declares two parts (blue and green rectangles) and an item data: | |||
* @include basic.edc | * @include basic.edc | |||
* | * | |||
* We start by trying to acces an @b unexistant group in the file, so | * We start by trying to access an @b unexistant group in the file, so | |||
* that you can see the usefulness of edje_object_load_error_get() and | * that you can see the usefulness of edje_object_load_error_get() and | |||
* edje_load_error_str(). Check that the error message will tell you | * edje_load_error_str(). Check that the error message will tell you | |||
* just that -- a group which didn't exist in the file was called for: | * just that -- a group which didn't exist in the file was called for: | |||
* @dontinclude edje-basic.c | * @dontinclude edje-basic.c | |||
* @skip file_path | * @skip file_path | |||
* @until file_path | * @until file_path | |||
* @dontinclude edje-basic.c | * @dontinclude edje-basic.c | |||
* @skip edje_object_add | * @skip edje_object_add | |||
* @until } | * @until } | |||
* | * | |||
skipping to change at line 91 | skipping to change at line 91 | |||
* @skip color_get | * @skip color_get | |||
* @until x, y, w, h | * @until x, y, w, h | |||
* | * | |||
* The @c "min" and @c "max" EDC properties can be queried with the | * The @c "min" and @c "max" EDC properties can be queried with the | |||
* following calls: | * following calls: | |||
* @dontinclude edje-basic.c | * @dontinclude edje-basic.c | |||
* @skip max_get | * @skip max_get | |||
* @until min. size is | * @until min. size is | |||
* | * | |||
* The next two calls are to make <b>size calculations</b> on our | * The next two calls are to make <b>size calculations</b> on our | |||
* object. Because of the minumim size declared for @c "part_one" part's | * object. Because of the minimum size declared for @c "part_one" part's | |||
* default state description, that will be our exact minimum | * default state description, that will be our exact minimum | |||
* size calculated for the group (remember the @c "min" declaration at | * size calculated for the group (remember the @c "min" declaration at | |||
* group level is just a @b hint, not an enforcement). We then | * group level is just a @b hint, not an enforcement). We then | |||
* exercise the edje_object_size_min_restricted_calc() function, | * exercise the edje_object_size_min_restricted_calc() function, | |||
* passing a minimum size of 500, in each axis. Since we have @b no | * passing a minimum size of 500, in each axis. Since we have @b no | |||
* object bigger than that, it will be the minimum size calculated, in | * object bigger than that, it will be the minimum size calculated, in | |||
* the end: | * the end: | |||
* @dontinclude edje-basic.c | * @dontinclude edje-basic.c | |||
* @skip min_calc | * @skip min_calc | |||
* @until size calculation is | * @until size calculation is | |||
skipping to change at line 822 | skipping to change at line 822 | |||
* @endverbatim | * @endverbatim | |||
* @example edje-signals-messages.c | * @example edje-signals-messages.c | |||
*/ | */ | |||
/** | /** | |||
* @page tutorial_edje_color_class Edje Color Class example | * @page tutorial_edje_color_class Edje Color Class example | |||
* @dontinclude edje-color-class.c | * @dontinclude edje-color-class.c | |||
* | * | |||
* This example shows how to manipulate and change Color classes. In this e xample | * This example shows how to manipulate and change Color classes. In this e xample | |||
* we will create two surfaces to show what happens when you change the col or | * we will create two surfaces to show what happens when you change the col or | |||
* class at the proccess and object level. | * class at the process and object level. | |||
* | * | |||
* It's a very simple example, there are two surfaces created from the same EDC, | * It's a very simple example, there are two surfaces created from the same EDC, | |||
* but just in one of them we will set a specific color class, althoug both will be | * but just in one of them we will set a specific color class, although bot h will be | |||
* affected by color class set at the process level as you will see. | * affected by color class set at the process level as you will see. | |||
* | * | |||
* It's important you know that all colors has the format R G B A. Just to be easier | * It's important you know that all colors has the format R G B A. Just to be easier | |||
* to understand this example, we will create a small set of colors that wi ll be used | * to understand this example, we will create a small set of colors that wi ll be used | |||
* along of the example. This piece of code is shown below: | * along of the example. This piece of code is shown below: | |||
* @skip static color colors_init_data | * @skip static color colors_init_data | |||
* @until return EINA_FALSE | * @until return EINA_FALSE | |||
* @until } | * @until } | |||
* | * | |||
* Focusing on the relevant parts of the code we go right to the part where we set | * Focusing on the relevant parts of the code we go right to the part where we set | |||
skipping to change at line 1119 | skipping to change at line 1119 | |||
*/ | */ | |||
/** | /** | |||
* @page tutorial_edje_signals_2 Edje Signals example 2 | * @page tutorial_edje_signals_2 Edje Signals example 2 | |||
* | * | |||
* In this example we will make use of signals to help to move an image awa y from the mouse pointer. | * In this example we will make use of signals to help to move an image awa y from the mouse pointer. | |||
* | * | |||
* Signals are software interruption, this means that when it happens and i f the program is sensitive to it | * Signals are software interruption, this means that when it happens and i f the program is sensitive to it | |||
* the program will stop whatever it is doing and handle the signal. | * the program will stop whatever it is doing and handle the signal. | |||
* | * | |||
* In this example we are only sensitive to the "mouve,move" signal so we n eed to register a callback to it. | * In this example we are only sensitive to the "mouse,move" signal so we n eed to register a callback to it. | |||
* To do this we will add a signal callback to our edje object that will de tect "mouse,move" signal | * To do this we will add a signal callback to our edje object that will de tect "mouse,move" signal | |||
* comming from the part "part_image" and when this happens we will call th e fuction _on_mouse_over passing | * coming from the part "part_image" and when this happens we will call the function _on_mouse_over passing | |||
* the evas pointer as a parameter. The evas pointer is passed as a paramet er because we need to know | * the evas pointer as a parameter. The evas pointer is passed as a paramet er because we need to know | |||
* where is the mouse pointer in the screen. | * where is the mouse pointer in the screen. | |||
* | * | |||
* We can see bellow how we can listen to the signal: | * We can see bellow how we can listen to the signal: | |||
* | * | |||
* @dontinclude signals2.c | * @dontinclude signals2.c | |||
* @skip edje_object_signal | * @skip edje_object_signal | |||
* @until ); | * @until ); | |||
* | * | |||
* | * | |||
* Now, let's pass to the callback function. If we want to keep the ball aw ay from the mouse pointer | * Now, let's pass to the callback function. If we want to keep the ball aw ay from the mouse pointer | |||
* we need to now where is the ball and where is the mouse and we can easil y discovery these things using | * we need to now where is the ball and where is the mouse and we can easil y discovery these things using | |||
* this: | * this: | |||
* | * | |||
* For the the object position in the canvas: | * For the object position in the canvas: | |||
* @dontinclude signals2.c | * @dontinclude signals2.c | |||
* @skipline evas_object_geometry | * @skipline evas_object_geometry | |||
* | * | |||
* For the mouse position relative to the screen: | * For the mouse position relative to the screen: | |||
* @skipline evas_pointer_output | * @skipline evas_pointer_output | |||
* | * | |||
* Now that we have the position of the mouse and the object we just need | * Now that we have the position of the mouse and the object we just need | |||
* to set the new location and move the object. To set the new location we do this: | * to set the new location and move the object. To set the new location we do this: | |||
* @skip if | * @skip if | |||
* @until y -= ( | * @until y -= ( | |||
* | * | |||
* You can change the formula above if you like. Because we are changing th e object's position | * You can change the formula above if you like. Because we are changing th e object's position | |||
* we need to do something if the new position is beyound the canvas size. So here it is: | * we need to do something if the new position is beyond the canvas size. S o here it is: | |||
* | * | |||
* @skip if | * @skip if | |||
* @until y = 0 | * @until y = 0 | |||
* | * | |||
* Then now what we need to do is move the object: | * Then now what we need to do is move the object: | |||
* @skipline evas_object | * @skipline evas_object | |||
* | * | |||
* Here is the complete callback function: | * Here is the complete callback function: | |||
* | * | |||
* @dontinclude signals2.c | * @dontinclude signals2.c | |||
End of changes. 8 change blocks. | ||||
8 lines changed or deleted | 8 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |