summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiscomfitor <michael.blumenkrantz@gmail.com>2013-09-29 18:49:38 +0100
committerdiscomfitor <michael.blumenkrantz@gmail.com>2013-09-29 18:49:38 +0100
commit72f60c2391d8d89bddcc6fa98158a74c257280cd (patch)
treea3b4d063886b662469f1362195516c5eaae65bb7
parent411307f4fea7c5f85d534c4e538999a9995623f4 (diff)
add more sequences
-rw-r--r--compbench.c78
1 files changed, 71 insertions, 7 deletions
diff --git a/compbench.c b/compbench.c
index e2cfcf3..37c0670 100644
--- a/compbench.c
+++ b/compbench.c
@@ -1,15 +1,71 @@
1#include <Elementary.h> 1#include <Elementary.h>
2#include <Efx.h> 2#include <Efx.h>
3 3
4/* screen size
5 * broken for multimonitor
6 */
7static int sw, sh;
8
4static Evas_Object *win, *rect; 9static Evas_Object *win, *rect;
5 10
6static void 11static void
7_resize2(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED) 12_fs_toggle(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED)
8{ 13{
9 efx_move(win, EFX_EFFECT_SPEED_LINEAR, EFX_POINT(600, 0), 30.0, NULL, NULL); 14 elm_win_fullscreen_set(win, !elm_win_fullscreen_get(win));
15 evas_object_move(win, -1, -1);
16 evas_object_move(win, 0, 0);
17}
10 18
11 efx_resize(rect, EFX_EFFECT_SPEED_LINEAR, NULL, 600, 600, 30.0, NULL, NULL); 19static void
12 efx_fade(rect, EFX_EFFECT_SPEED_LINEAR, EFX_COLOR(0, 0, 255), 255, 30.0, NULL, NULL); 20_rect_resize3(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED)
21{
22 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
23 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(0, 30, 222, 255)),
24 3.0, NULL, NULL);
25 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
26 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(0, 60, 180, 255)),
27 3.0, NULL, NULL);
28 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
29 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(0, 90, 150, 255)),
30 3.0, NULL, NULL);
31 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
32 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(0, 120, 120, 255)),
33 3.0, NULL, NULL);
34 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
35 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(30, 150, 90, 255)),
36 3.0, NULL, NULL);
37 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
38 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(60, 180, 60, 255)),
39 3.0, NULL, NULL);
40 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
41 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(90, 210, 30, 255)),
42 3.0, NULL, NULL);
43 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
44 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(120, 255, 0, 255)),
45 3.0, _fs_toggle, NULL);
46 efx_queue_append(rect, EFX_EFFECT_SPEED_LINEAR,
47 EFX_QUEUED_EFFECT(EFX_EFFECT_FADE(255, 0, 0, 255)),
48 3.0, _rect_resize3, NULL);
49 efx_queue_run(rect);
50}
51
52static void
53_rect_resize2_5(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED)
54{
55 efx_resize(rect, EFX_EFFECT_SPEED_LINEAR, NULL, sw, sh, 30.0, _rect_resize2_5, NULL);
56}
57
58static void
59_rect_resize2(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED)
60{
61 efx_resize(rect, EFX_EFFECT_SPEED_LINEAR, NULL, sw / 2, sh / 2, 30.0, _rect_resize2_5, NULL);
62 efx_fade(rect, EFX_EFFECT_SPEED_LINEAR, EFX_COLOR(0, 0, 255), 255, 30.0, _rect_resize3, NULL);
63}
64
65static void
66_win_resize2(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o EINA_UNUSED)
67{
68 efx_move(win, EFX_EFFECT_SPEED_LINEAR, EFX_POINT(sw / 2, 0), 30.0, NULL, NULL);
13} 69}
14 70
15static void 71static void
@@ -17,14 +73,17 @@ _resize1(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *o E
17{ 73{
18 efx_queue_append(win, EFX_EFFECT_SPEED_LINEAR, 74 efx_queue_append(win, EFX_EFFECT_SPEED_LINEAR,
19 EFX_QUEUED_EFFECT(EFX_EFFECT_RESIZE(NULL, 100, 100)), 75 EFX_QUEUED_EFFECT(EFX_EFFECT_RESIZE(NULL, 100, 100)),
20 10.0, _resize2, NULL); 76 10.0, _win_resize2, NULL);
77 efx_queue_append(win, EFX_EFFECT_SPEED_LINEAR,
78 EFX_QUEUED_EFFECT(EFX_EFFECT_RESIZE(EFX_POINT(sw / 2, sh / 2), sw / 2, sh / 2)),
79 30.0, NULL, NULL);
21 efx_queue_append(win, EFX_EFFECT_SPEED_LINEAR, 80 efx_queue_append(win, EFX_EFFECT_SPEED_LINEAR,
22 EFX_QUEUED_EFFECT(EFX_EFFECT_RESIZE(NULL, 600, 600)), 81 EFX_QUEUED_EFFECT(EFX_EFFECT_RESIZE(EFX_POINT(0, 0), sw, sh)),
23 30.0, NULL, NULL); 82 30.0, NULL, NULL);
24 efx_queue_run(win); 83 efx_queue_run(win);
25 84
26 efx_resize(rect, EFX_EFFECT_SPEED_LINEAR, NULL, 1, 1, 10.0, NULL, NULL); 85 efx_resize(rect, EFX_EFFECT_SPEED_LINEAR, NULL, 1, 1, 10.0, NULL, NULL);
27 efx_fade(rect, EFX_EFFECT_SPEED_LINEAR, EFX_COLOR(0, 255, 0), 255, 10.0, NULL, NULL); 86 efx_fade(rect, EFX_EFFECT_SPEED_LINEAR, EFX_COLOR(0, 255, 0), 255, 10.0, _rect_resize2, NULL);
28} 87}
29 88
30int 89int
@@ -37,6 +96,11 @@ main(int argc, char *argv[])
37 win = elm_win_util_standard_add("compbench", "compbench"); 96 win = elm_win_util_standard_add("compbench", "compbench");
38 elm_win_autodel_set(win, 1); 97 elm_win_autodel_set(win, 1);
39 evas_object_show(win); 98 evas_object_show(win);
99 elm_win_screen_size_get(win, NULL, NULL, &sw, &sh);
100 /* objects start at 0,0
101 * need to do some other move to force the 0,0 coords
102 */
103 evas_object_move(win, -1, -1);
40 evas_object_move(win, 0, 0); 104 evas_object_move(win, 0, 0);
41 evas_object_resize(win, 400, 400); 105 evas_object_resize(win, 400, 400);
42 rect = elm_bg_add(win); 106 rect = elm_bg_add(win);