summaryrefslogtreecommitdiff
path: root/src/examples/emotion/emotion_generic_example.c
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2014-01-04 13:25:21 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2014-01-04 13:25:21 +0900
commit3ebc18731fa3712e9f7b29758908bf19fec7df83 (patch)
treea8aa6907b8c4be867689d02331aab1288e68af7e /src/examples/emotion/emotion_generic_example.c
parent9637c2b835c4b48b84a4509d57c1af19d1b8608f (diff)
Use key instead of keyname for considering setxkbmap
Diffstat (limited to 'src/examples/emotion/emotion_generic_example.c')
-rw-r--r--src/examples/emotion/emotion_generic_example.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index 580cae9..6d585fb 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -50,25 +50,25 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
50 Evas_Event_Key_Down *ev = event_info; 50 Evas_Event_Key_Down *ev = event_info;
51 Evas_Object *em = data; 51 Evas_Object *em = data;
52 52
53 if (!strcmp(ev->keyname, "Return")) 53 if (!strcmp(ev->key, "Return"))
54 { 54 {
55 emotion_object_play_set(em, EINA_TRUE); 55 emotion_object_play_set(em, EINA_TRUE);
56 } 56 }
57 else if (!strcmp(ev->keyname, "space")) 57 else if (!strcmp(ev->key, "space"))
58 { 58 {
59 emotion_object_play_set(em, EINA_FALSE); 59 emotion_object_play_set(em, EINA_FALSE);
60 } 60 }
61 else if (!strcmp(ev->keyname, "Escape")) 61 else if (!strcmp(ev->key, "Escape"))
62 { 62 {
63 ecore_main_loop_quit(); 63 ecore_main_loop_quit();
64 } 64 }
65 else if (!strcmp(ev->keyname, "t")) 65 else if (!strcmp(ev->key, "t"))
66 { 66 {
67 int w, h; 67 int w, h;
68 emotion_object_size_get(em, &w, &h); 68 emotion_object_size_get(em, &w, &h);
69 fprintf(stderr, "example -> size: %dx%d\n", w, h); 69 fprintf(stderr, "example -> size: %dx%d\n", w, h);
70 } 70 }
71 else if (!strcmp(ev->keyname, "s")) 71 else if (!strcmp(ev->key, "s"))
72 { 72 {
73 float len, pos; 73 float len, pos;
74 len = emotion_object_play_length_get(em); 74 len = emotion_object_play_length_get(em);
@@ -76,17 +76,17 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
76 fprintf(stderr, "skipping to position %0.3f\n", pos); 76 fprintf(stderr, "skipping to position %0.3f\n", pos);
77 emotion_object_position_set(em, pos); 77 emotion_object_position_set(em, pos);
78 } 78 }
79 else if (!strcmp(ev->keyname, "1")) 79 else if (!strcmp(ev->key, "1"))
80 { 80 {
81 fprintf(stderr, "setting speed to 1.0\n"); 81 fprintf(stderr, "setting speed to 1.0\n");
82 emotion_object_play_speed_set(em, 1.0); 82 emotion_object_play_speed_set(em, 1.0);
83 } 83 }
84 else if (!strcmp(ev->keyname, "2")) 84 else if (!strcmp(ev->key, "2"))
85 { 85 {
86 fprintf(stderr, "setting speed to 2.0\n"); 86 fprintf(stderr, "setting speed to 2.0\n");
87 emotion_object_play_speed_set(em, 2.0); 87 emotion_object_play_speed_set(em, 2.0);
88 } 88 }
89 else if (!strcmp(ev->keyname, "n")) 89 else if (!strcmp(ev->key, "n"))
90 { 90 {
91 const char *file; 91 const char *file;
92 if (!curfile) 92 if (!curfile)
@@ -97,7 +97,7 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
97 fprintf(stderr, "playing next file: %s\n", file); 97 fprintf(stderr, "playing next file: %s\n", file);
98 emotion_object_file_set(em, file); 98 emotion_object_file_set(em, file);
99 } 99 }
100 else if (!strcmp(ev->keyname, "p")) 100 else if (!strcmp(ev->key, "p"))
101 { 101 {
102 const char *file; 102 const char *file;
103 if (!curfile) 103 if (!curfile)
@@ -108,18 +108,18 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
108 fprintf(stderr, "playing next file: %s\n", file); 108 fprintf(stderr, "playing next file: %s\n", file);
109 emotion_object_file_set(em, file); 109 emotion_object_file_set(em, file);
110 } 110 }
111 else if (!strcmp(ev->keyname, "d")) 111 else if (!strcmp(ev->key, "d"))
112 { 112 {
113 evas_object_del(em); 113 evas_object_del(em);
114 } 114 }
115 else if (!strcmp(ev->keyname, "l")) 115 else if (!strcmp(ev->key, "l"))
116 { 116 {
117 // force frame dropping 117 // force frame dropping
118 sleep(5); 118 sleep(5);
119 } 119 }
120 else 120 else
121 { 121 {
122 fprintf(stderr, "unhandled key: %s\n", ev->keyname); 122 fprintf(stderr, "unhandled key: %s\n", ev->key);
123 } 123 }
124} 124}
125 125