summaryrefslogtreecommitdiff
path: root/legacy/edje/doc
diff options
context:
space:
mode:
authorGuilherme Iscaro <iscaro@profusion.mobi>2012-03-29 17:39:01 +0000
committerJonas M. Gastal <jgastal@profusion.mobi>2012-03-29 17:39:01 +0000
commitf745e537f5495f491a36de61157049ba8f87a57d (patch)
treed081c8a308f7f45e586ea2438f3741f8487c88fb /legacy/edje/doc
parent780e8a96de31638538a770c912be6d0f45bff4bc (diff)
Adding text, drag and perspective tutorial
Patch by: Guilherme Iscaro <iscaro@profusion.mobi> SVN revision: 69762
Diffstat (limited to 'legacy/edje/doc')
-rw-r--r--legacy/edje/doc/examples.dox64
1 files changed, 45 insertions, 19 deletions
diff --git a/legacy/edje/doc/examples.dox b/legacy/edje/doc/examples.dox
index b144ef06cd..867d956448 100644
--- a/legacy/edje/doc/examples.dox
+++ b/legacy/edje/doc/examples.dox
@@ -183,35 +183,42 @@
183 183
184/** 184/**
185 * @page tutorial_edje_text Edje Text example 185 * @page tutorial_edje_text Edje Text example
186 * @dontinclude edje-text.c 186 *
187 * 187 *
188 * This example shows how to manipulate TEXT and TEXTBLOCK parts from code. 188 * This example shows how to manipulate TEXT and TEXTBLOCK parts from code.
189 * 189 *
190 * The very first we are going to do is register a callback to react to changes 190 * The very first we are going to do is register a callback to react to changes
191 * in the text of our parts: 191 * in the text of our parts:
192 * @skip _on_destroy 192 * @dontinclude edje-text.c
193 * @skip static void 193 * @skipline edje_object_text_change_cb_set
194 * @until } 194 *
195 * 195 *
196 * @dontinclude edje-text.c
196 * @skipline text_change 197 * @skipline text_change
197 * @note Since edje_obj represent a group we'll be notified whenever any part's 198 * @note Since edje_obj represent a group we'll be notified whenever any part's
198 * text in that group changes. 199 * text in that group changes.
199 * 200 *
200 * We now set the text for two our two parts: 201 * We now set the text for two our two parts:
201 * @until text_set 202 * @dontinclude edje-text.c
202 * @until text_set 203 * @skip text_set
204 * @until edje_object_part_text_set(edje_obj, "part_two"
203 * @note Since the "part_two" part is a TEXTBLOCK we can use formatting such as 205 * @note Since the "part_two" part is a TEXTBLOCK we can use formatting such as
204 * @<b@> 206 * @<b@>
205 * 207 *
206 * And we now move on to selection issues, first thing we do is make sure the 208 * And we now move on to selection issues, first thing we do is make sure the
207 * user can select text: 209 * user can select text:
208 * @until select_allow 210 * @dontinclude edje-text.c
211 * @skip edje_object_part_text_select_allow_set
212 * @until edje_object_part_text_select_all
209 * 213 *
210 * We then select the entire text, and print the selected text: 214 * We then select the entire text, and print the selected text:
211 * @until printf 215 * @dontinclude edje-text.c
216 * @skipline printf("selection: %s\n",
212 * 217 *
213 * We now unselect the entire text(set selection to none), and print the 218 * We now unselect the entire text(set selection to none), and print the
214 * selected text: 219 * selected text:
220 * @dontinclude edje-text.c
221 * @skip edje_object_part_text_select_none
215 * @until printf 222 * @until printf
216 * 223 *
217 * Our example will look like this: 224 * Our example will look like this:
@@ -222,7 +229,7 @@
222 * 229 *
223 * The full source code follows: 230 * The full source code follows:
224 * @include edje-text.c 231 * @include edje-text.c
225 * @example edje-text.c 232 *
226 * 233 *
227 * The theme used in this example is: 234 * The theme used in this example is:
228 * @include text.edc 235 * @include text.edc
@@ -487,10 +494,11 @@
487 * setting some global data on a structure, load the edje file and so: 494 * setting some global data on a structure, load the edje file and so:
488 * 495 *
489 * @dontinclude edje-drag.c 496 * @dontinclude edje-drag.c
490 * @skip value changed 497 * @skip static const char *PARTNAME
491 * @skip } 498 * @until ;
492 * @skip int 499 *
493 * @until evas_object_show(app.edje) 500 * @skip main(int argc __UNUSED__, char *argv[])
501 * @until evas_object_show
494 * 502 *
495 * We want to use the drag_page and drag_step functions, and in order to do so we 503 * We want to use the drag_page and drag_step functions, and in order to do so we
496 * need to define the step size and page size of our dragable part. They are 504 * need to define the step size and page size of our dragable part. They are
@@ -505,14 +513,29 @@
505 * this part will receive mouse events). Thus, we set a callback for the signal 513 * this part will receive mouse events). Thus, we set a callback for the signal
506 * "drag", which comes from the dragable part: 514 * "drag", which comes from the dragable part:
507 * 515 *
508 * @until _knob_moved_cb 516 * @dontinclude edje-drag.c
517 * @skipline evas_object_event_callback_add
518 *
519 * @skipline edje_object_signal_callback_add
509 * 520 *
510 * Now, let's take a look at our key down callback: 521 * Now, let's take a look at our key down callback:
511 * 522 *
512 * @dontinclude edje-drag.c 523 * @dontinclude edje-drag.c
513 * @skip _canvas_resize_cb 524 * @skip _on_bg_key_down
514 * @skip static 525 * @until }
515 * @until unhandled key 526 * @skip else
527 * @until }
528 * @skip else
529 * @until }
530 * @skip else
531 * @until }
532 * @skip else
533 * @until }
534 * @skip else
535 * @until }
536 * @skip else
537 * @until }
538 * @skip else
516 * @until } 539 * @until }
517 * 540 *
518 * On this callback we define that the user will use the "up" and "down" arrows 541 * On this callback we define that the user will use the "up" and "down" arrows
@@ -529,6 +552,8 @@
529 * And here is the callback for the @c "drag" signal that is received from the 552 * And here is the callback for the @c "drag" signal that is received from the
530 * theme: 553 * theme:
531 * 554 *
555 * @dontinclude edje-drag.c
556 * @skip _on_knob_moved
532 * @until } 557 * @until }
533 * 558 *
534 * The example's window should look like this picture: 559 * The example's window should look like this picture:
@@ -577,7 +602,7 @@
577 * 602 *
578 * After this, some boilerplate code to load the theme: 603 * After this, some boilerplate code to load the theme:
579 * 604 *
580 * @until evas_object_show(app.edje) 605 * @until evas_object_show(app.bg)
581 * 606 *
582 * Now we are going to setup a callback to tell us that the animation has ended. 607 * Now we are going to setup a callback to tell us that the animation has ended.
583 * We do this just to avoid sending signals to the theme while it's animating. 608 * We do this just to avoid sending signals to the theme while it's animating.
@@ -625,8 +650,10 @@
625 * 650 *
626 * Finally we add a callback for the animation ended signal: 651 * Finally we add a callback for the animation ended signal:
627 * 652 *
653 * @skip _animation_end_cb
628 * @until } 654 * @until }
629 * 655 *
656 *
630 * The example's window should look like this picture: 657 * The example's window should look like this picture:
631 * 658 *
632 * @image html edje-perspective-example.png 659 * @image html edje-perspective-example.png
@@ -953,4 +980,3 @@
953 * @include edje-multisense.c 980 * @include edje-multisense.c
954 * @include sound.edc 981 * @include sound.edc
955 */ 982 */
956