summaryrefslogtreecommitdiff
path: root/src/examples/emotion
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
parent9637c2b835c4b48b84a4509d57c1af19d1b8608f (diff)
Use key instead of keyname for considering setxkbmap
Diffstat (limited to 'src/examples/emotion')
-rw-r--r--src/examples/emotion/emotion_border_example.c24
-rw-r--r--src/examples/emotion/emotion_generic_example.c24
2 files changed, 24 insertions, 24 deletions
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index 5fa6f0f130..a9d22e98b2 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -39,19 +39,19 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
39 Evas_Event_Key_Down *ev = event_info; 39 Evas_Event_Key_Down *ev = event_info;
40 Evas_Object *em = data; 40 Evas_Object *em = data;
41 41
42 if (!strcmp(ev->keyname, "Return")) 42 if (!strcmp(ev->key, "Return"))
43 { 43 {
44 emotion_object_play_set(em, EINA_TRUE); 44 emotion_object_play_set(em, EINA_TRUE);
45 } 45 }
46 else if (!strcmp(ev->keyname, "space")) 46 else if (!strcmp(ev->key, "space"))
47 { 47 {
48 emotion_object_play_set(em, EINA_FALSE); 48 emotion_object_play_set(em, EINA_FALSE);
49 } 49 }
50 else if (!strcmp(ev->keyname, "Escape")) 50 else if (!strcmp(ev->key, "Escape"))
51 { 51 {
52 ecore_main_loop_quit(); 52 ecore_main_loop_quit();
53 } 53 }
54 else if (!strcmp(ev->keyname, "n")) 54 else if (!strcmp(ev->key, "n"))
55 { 55 {
56 const char *file; 56 const char *file;
57 if (!curfile) 57 if (!curfile)
@@ -62,7 +62,7 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
62 fprintf(stderr, "playing next file: %s\n", file); 62 fprintf(stderr, "playing next file: %s\n", file);
63 emotion_object_file_set(em, file); 63 emotion_object_file_set(em, file);
64 } 64 }
65 else if (!strcmp(ev->keyname, "p")) 65 else if (!strcmp(ev->key, "p"))
66 { 66 {
67 const char *file; 67 const char *file;
68 if (!curfile) 68 if (!curfile)
@@ -73,33 +73,33 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info)
73 fprintf(stderr, "playing next file: %s\n", file); 73 fprintf(stderr, "playing next file: %s\n", file);
74 emotion_object_file_set(em, file); 74 emotion_object_file_set(em, file);
75 } 75 }
76 else if (!strcmp(ev->keyname, "b")) 76 else if (!strcmp(ev->key, "b"))
77 { 77 {
78 emotion_object_border_set(em, 0, 0, 50, 50); 78 emotion_object_border_set(em, 0, 0, 50, 50);
79 } 79 }
80 else if (!strcmp(ev->keyname, "0")) 80 else if (!strcmp(ev->key, "0"))
81 { 81 {
82 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_NONE); 82 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_NONE);
83 } 83 }
84 else if (!strcmp(ev->keyname, "w")) 84 else if (!strcmp(ev->key, "w"))
85 { 85 {
86 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_WIDTH); 86 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_WIDTH);
87 } 87 }
88 else if (!strcmp(ev->keyname, "h")) 88 else if (!strcmp(ev->key, "h"))
89 { 89 {
90 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_HEIGHT); 90 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_HEIGHT);
91 } 91 }
92 else if (!strcmp(ev->keyname, "2")) 92 else if (!strcmp(ev->key, "2"))
93 { 93 {
94 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_BOTH); 94 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_BOTH);
95 } 95 }
96 else if (!strcmp(ev->keyname, "c")) 96 else if (!strcmp(ev->key, "c"))
97 { 97 {
98 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_CROP); 98 emotion_object_keep_aspect_set(em, EMOTION_ASPECT_CROP);
99 } 99 }
100 else 100 else
101 { 101 {
102 fprintf(stderr, "unhandled key: %s\n", ev->keyname); 102 fprintf(stderr, "unhandled key: %s\n", ev->key);
103 } 103 }
104} 104}
105 105
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index 580cae9821..6d585fb396 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