summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-12-08 03:37:33 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-12-08 03:37:33 +0000
commit26462ad89dbd1831e2d64cccf637935783be46b2 (patch)
tree4c15fe1634956058f635a0a6bb0bee3ad029389b /src/bin
parentf0d4465f691882e93877e4df877247465bd5cd6e (diff)
multi-touch has a rotate button for testing.
SVN revision: 55368
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test_multi.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/bin/test_multi.c b/src/bin/test_multi.c
index 2502fd6c5..45fe59d49 100644
--- a/src/bin/test_multi.c
+++ b/src/bin/test_multi.c
@@ -70,9 +70,16 @@ _multi_move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *o __UNUSED__
70} 70}
71 71
72void 72void
73my_bt_rot(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
74{
75 Evas_Object *win = data;
76 elm_win_rotation_set(win, elm_win_rotation_get(win) + 90);
77}
78
79void
73test_multi(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 80test_multi(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
74{ 81{
75 Evas_Object *win, *bg, *r; 82 Evas_Object *win, *bg, *r, *bx, *bt;
76 int i; 83 int i;
77 84
78 win = elm_win_add(NULL, "bg-plain", ELM_WIN_BASIC); 85 win = elm_win_add(NULL, "bg-plain", ELM_WIN_BASIC);
@@ -85,6 +92,7 @@ test_multi(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
85 evas_object_show(bg); 92 evas_object_show(bg);
86 93
87 r = evas_object_rectangle_add(evas_object_evas_get(win)); 94 r = evas_object_rectangle_add(evas_object_evas_get(win));
95 evas_object_size_hint_weight_set(r, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
88 evas_object_color_set(r, 0, 0, 0, 0); 96 evas_object_color_set(r, 0, 0, 0, 0);
89 elm_win_resize_object_add(win, r); 97 elm_win_resize_object_add(win, r);
90 evas_object_show(r); 98 evas_object_show(r);
@@ -104,7 +112,20 @@ test_multi(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
104 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_DOWN, _multi_down, win); 112 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_DOWN, _multi_down, win);
105 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_UP, _multi_up, win); 113 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_UP, _multi_up, win);
106 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_MOVE, _multi_move, win); 114 evas_object_event_callback_add(r, EVAS_CALLBACK_MULTI_MOVE, _multi_move, win);
107 115
116 bx = elm_box_add(win);
117 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
118 elm_win_resize_object_add(win, bx);
119 evas_object_show(bx);
120
121 bt = elm_button_add(win);
122 elm_button_label_set(bt, "Rotate");
123 evas_object_smart_callback_add(bt, "clicked", my_bt_rot, win);
124 evas_object_size_hint_align_set(bt, 0.0, 0.0);
125 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
126 elm_box_pack_end(bx, bt);
127 evas_object_show(bt);
128
108 evas_object_size_hint_min_set(bg, 160, 160); 129 evas_object_size_hint_min_set(bg, 160, 160);
109 evas_object_resize(win, 480, 800); 130 evas_object_resize(win, 480, 800);
110 131