diff --git a/doc/ecore_examples.dox b/doc/ecore_examples.dox index e7fc673c41..cc7f063f96 100644 --- a/doc/ecore_examples.dox +++ b/doc/ecore_examples.dox @@ -1317,7 +1317,7 @@ * ones on our window. Test it by trying to resize it to smaller sizes * than that: * @dontinclude ecore_evas_window_sizes_example.c - * @skip keyname, "m" + * @skip key, "m" * @until } * @until } * @until } @@ -1326,7 +1326,7 @@ * to two times our initial size. Test it by trying to resize the * window to bigger sizes than that: * @dontinclude ecore_evas_window_sizes_example.c - * @skip keyname, "x" + * @skip key, "x" * @until } * @until } * @until } @@ -1335,7 +1335,7 @@ * with the @c 'b' key. It will set a base size of two times the * initial one: * @dontinclude ecore_evas_window_sizes_example.c - * @skip keyname, "b" + * @skip key, "b" * @until } * @until } * @until } @@ -1344,7 +1344,7 @@ * pixels. With than on (@c 's' key), you'll see the window will * always be bound to @b multiples of that size, for dimensions on * both axis: - * @skip keyname, "s" + * @skip key, "s" * @until } * @until } * @until } diff --git a/doc/edje_examples.dox b/doc/edje_examples.dox index f44e0fa2f1..c15dfb629d 100644 --- a/doc/edje_examples.dox +++ b/doc/edje_examples.dox @@ -119,7 +119,7 @@ * scale). Scaling will be applied to @c "part_one", only, because * that's the part flagged to be scaled at EDC level: * @dontinclude edje-basic.c - * @skip strcmp(ev->keyname, "s") == 0 + * @skip strcmp(ev->key, "s") == 0 * @until } * * Note, finally, that the @c 's' command will depend on the 'r' one @@ -128,7 +128,7 @@ * scaling factor. Only when the individual one is set to zero, will * the global one take effect: * @dontinclude edje-basic.c - * @skip strcmp(ev->keyname, "r") == 0 + * @skip strcmp(ev->key, "r") == 0 * @until } * * @@ -810,7 +810,7 @@ * @until } * @until } * @dontinclude edje-signals-messages.c - * @skip keyname, "t" + * @skip key, "t" * @until } * * The example's window should look like this picture: diff --git a/doc/evas_examples.dox b/doc/evas_examples.dox index 103b8eabcc..809132f173 100644 --- a/doc/evas_examples.dox +++ b/doc/evas_examples.dox @@ -127,7 +127,7 @@ * @until ; * The 'p' one will change the source of the proxy image to one of the * other two, as seem above. - * @skip if (strcmp(ev->keyname, "p") == 0) + * @skip if (strcmp(ev->key, "p") == 0) * @until } * Note the top right image, the smaller one: * @dontinclude evas-images2.c @@ -158,7 +158,7 @@ * The 's' command will save one of the images on the disk, in the png * format: * @dontinclude evas-images2.c - * @skip if (strcmp(ev->keyname, "a") == 0) + * @skip if (strcmp(ev->key, "a") == 0) * @until } * * The full example follows. @@ -266,13 +266,13 @@ * processing for the canvas (in the example, just for 3 seconds). Try * to issue events for it during that freeze time: * @dontinclude evas-events.c - * @skip if (strcmp(ev->keyname, "f") == 0) + * @skip if (strcmp(ev->key, "f") == 0) * @until } * The 'd' command will unregister those two canvas callbacks for you, * so you won't see the messages about the focused object and the * rendering process anymore: * @dontinclude evas-events.c - * @skip if (strcmp(ev->keyname, "d") == 0) + * @skip if (strcmp(ev->key, "d") == 0) * @until } * In this example, we start using a focused object to handle the input * events -- the background rectangle. We register a callback on an key input @@ -282,7 +282,7 @@ * @dontinclude evas-events.c * @skip examine the keys pressed * @until key grab - * We do so by examining the @c ev->keyname string (remember the event + * We do so by examining the @c ev->key string (remember the event * information struct for key down events is the #Evas_Event_Key_Down * one). There's one more trick for grabbing input events on this * example -- evas_object_key_grab(). The 'c' command will, when @@ -314,7 +314,7 @@ * in the case) as not belonging to it when calculating mouse * in/out/up/down events: * @dontinclude evas-events.c - * @skip if (strcmp(ev->keyname, "p") == 0) + * @skip if (strcmp(ev->key, "p") == 0) * @until } * To finish the example, try the command bound to Control + 'o', * which exemplifies Evas' obscured regions. When firstly @@ -479,7 +479,7 @@ * height of the box equally and, then, place the items in the cells * in the diagonal: * @dontinclude evas-box.c - * @skip keyname, "0" + * @skip key, "0" * @until } * @dontinclude evas-box.c * @skip custom 'diagonal' layout diff --git a/src/examples/ecore/ecore_evas_window_sizes_example.c b/src/examples/ecore/ecore_evas_window_sizes_example.c index a0777a544c..d7f66ae407 100644 --- a/src/examples/ecore/ecore_evas_window_sizes_example.c +++ b/src/examples/ecore/ecore_evas_window_sizes_example.c @@ -68,13 +68,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "m") == 0) /* impose a minimum size on the window */ + if (strcmp(ev->key, "m") == 0) /* impose a minimum size on the window */ { min_set = !min_set; @@ -93,7 +93,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "x") == 0) /* impose a maximum size on the window */ + if (strcmp(ev->key, "x") == 0) /* impose a maximum size on the window */ { max_set = !max_set; @@ -112,7 +112,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "b") == 0) /* impose a base size on the window */ + if (strcmp(ev->key, "b") == 0) /* impose a base size on the window */ { base_set = !base_set; @@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "s") == 0) /* impose a step size on the window */ + if (strcmp(ev->key, "s") == 0) /* impose a step size on the window */ { step_set = !step_set; @@ -149,7 +149,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "g") == 0) /* get screen geometry */ + if (strcmp(ev->key, "g") == 0) /* get screen geometry */ { int x, y, w, h; ecore_evas_screen_geometry_get(ee, &x, &y, &w, &h); diff --git a/src/examples/edje/edje-animations.c b/src/examples/edje/edje-animations.c index 413394c5ca..65f60c266d 100644 --- a/src/examples/edje/edje-animations.c +++ b/src/examples/edje/edje-animations.c @@ -73,7 +73,7 @@ _on_key_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, v ev = (Evas_Event_Key_Down *)event_info; - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; @@ -137,11 +137,11 @@ _on_key_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, v edje_object_animation_set(obj, EINA_FALSE); fprintf(stdout, "Stopping the animation in the Edje object\n"); } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/edje-basic.c b/src/examples/edje/edje-basic.c index 4c7fad6357..a49cf08433 100644 --- a/src/examples/edje/edje-basic.c +++ b/src/examples/edje/edje-basic.c @@ -49,12 +49,12 @@ _on_keydown(void *data, ev = (Evas_Event_Key_Down *)einfo; edje_obj = (Evas_Object *)data; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - else if (strcmp(ev->keyname, "s") == 0) /* global scaling factor */ + else if (strcmp(ev->key, "s") == 0) /* global scaling factor */ { double scale = edje_scale_get(); @@ -69,7 +69,7 @@ _on_keydown(void *data, return; } - else if (strcmp(ev->keyname, "r") == 0) /* individual scaling factor */ + else if (strcmp(ev->key, "r") == 0) /* individual scaling factor */ { double scale = edje_object_scale_get(edje_obj); @@ -86,11 +86,11 @@ _on_keydown(void *data, return; } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/edje-basic2.c b/src/examples/edje/edje-basic2.c index 8836e7e700..e3cdde395f 100644 --- a/src/examples/edje/edje-basic2.c +++ b/src/examples/edje/edje-basic2.c @@ -44,29 +44,29 @@ _on_key_down(void *data, evas_object_geometry_get(edje_obj, &x, &y, NULL, NULL); - if(strcmp(ev->keyname,"Escape") == 0) + if(strcmp(ev->key,"Escape") == 0) { ecore_main_loop_quit(); } - else if(strcmp(ev->keyname, "Down") == 0) + else if(strcmp(ev->key, "Down") == 0) { y+=WALK; } - else if(strcmp(ev->keyname, "Up") == 0) + else if(strcmp(ev->key, "Up") == 0) { y-=WALK; } - else if(strcmp(ev->keyname, "Right") == 0) + else if(strcmp(ev->key, "Right") == 0) { x+=WALK; } - else if(strcmp(ev->keyname, "Left") == 0) + else if(strcmp(ev->key, "Left") == 0) { x-=WALK; } else { - fprintf(stdout, "Key %s not supported.\nCommands:%s", ev->keyname, commands); + fprintf(stdout, "Key %s not supported.\nCommands:%s", ev->key, commands); return; } diff --git a/src/examples/edje/edje-box.c b/src/examples/edje/edje-box.c index 20cf56e094..978a5309c3 100644 --- a/src/examples/edje/edje-box.c +++ b/src/examples/edje/edje-box.c @@ -111,12 +111,12 @@ _on_bg_key_down(void *data, Evas *e, Evas_Object *o EINA_UNUSED, void *event_inf ev = (Evas_Event_Key_Down *)event_info; edje_obj = ecore_evas_data_get(ee, "edje_obj"); - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; } - if (!strcmp(ev->keyname, "i")) + if (!strcmp(ev->key, "i")) { rect = evas_object_rectangle_add(e); evas_object_color_set(rect, 0, 0, 128, 255); @@ -130,7 +130,7 @@ _on_bg_key_down(void *data, Evas *e, Evas_Object *o EINA_UNUSED, void *event_inf evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, NULL); } - else if (!strcmp(ev->keyname, "a")) + else if (!strcmp(ev->key, "a")) { rect = evas_object_rectangle_add(e); evas_object_color_set(rect, 0, 128, 0, 255); @@ -144,13 +144,13 @@ _on_bg_key_down(void *data, Evas *e, Evas_Object *o EINA_UNUSED, void *event_inf evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _on_rect_mouse_down, NULL); } - else if (!strcmp(ev->keyname, "c")) + else if (!strcmp(ev->key, "c")) edje_object_part_box_remove_all(edje_obj, "example/box", EINA_TRUE); - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/edje-box2.c b/src/examples/edje/edje-box2.c index e2a172f267..c61913bfbf 100644 --- a/src/examples/edje/edje-box2.c +++ b/src/examples/edje/edje-box2.c @@ -85,7 +85,7 @@ on_keydown(void *data, Evas *evas, Evas_Object *o EINA_UNUSED, void *einfo) edje_obj = (Evas_Object *)data; mods = evas_key_modifier_get(evas); - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; @@ -94,7 +94,7 @@ on_keydown(void *data, Evas *evas, Evas_Object *o EINA_UNUSED, void *einfo) { int pos; Evas_Object *obj = NULL; - pos = atoi(ev->keyname); + pos = atoi(ev->key); obj = edje_object_part_box_remove_at(edje_obj, "example/box", pos); if (obj) evas_object_del(obj); @@ -104,13 +104,13 @@ on_keydown(void *data, Evas *evas, Evas_Object *o EINA_UNUSED, void *einfo) { Evas_Object *obj; int pos; - pos = atoi(ev->keyname); + pos = atoi(ev->key); obj = new_greenie_block(evas); if (!edje_object_part_box_insert_at(edje_obj, "example/box", obj, pos)) edje_object_part_box_append(edje_obj, "example/box", obj); return; } - if (!strcmp(ev->keyname, "Escape")) + if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); } diff --git a/src/examples/edje/edje-drag.c b/src/examples/edje/edje-drag.c index da7504f07c..6098fd9efb 100644 --- a/src/examples/edje/edje-drag.c +++ b/src/examples/edje/edje-drag.c @@ -78,36 +78,36 @@ _on_bg_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, voi ev = (Evas_Event_Key_Down *)event_info; edje_obj = ecore_evas_data_get(ee, "edje_obj"); - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; } - else if (!strcmp(ev->keyname, "Down")) + else if (!strcmp(ev->key, "Down")) { edje_object_part_drag_step(edje_obj, PARTNAME, 0, 1.0); } - else if (!strcmp(ev->keyname, "Up")) + else if (!strcmp(ev->key, "Up")) { edje_object_part_drag_step(edje_obj, PARTNAME, 0, -1.0); } - else if (!strcmp(ev->keyname, "m")) + else if (!strcmp(ev->key, "m")) { edje_object_part_drag_value_set(edje_obj, PARTNAME, 0.0, 0.5); } - else if (!strcmp(ev->keyname, "Prior")) + else if (!strcmp(ev->key, "Prior")) { edje_object_part_drag_page(edje_obj, PARTNAME, 0.0, -1.0); } - else if (!strcmp(ev->keyname, "Next")) + else if (!strcmp(ev->key, "Next")) { edje_object_part_drag_page(edje_obj, PARTNAME, 0.0, 1.0); } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/edje-perspective.c b/src/examples/edje/edje-perspective.c index dc8c248fe8..7bdcbf49f3 100644 --- a/src/examples/edje/edje-perspective.c +++ b/src/examples/edje/edje-perspective.c @@ -98,44 +98,44 @@ _on_bg_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, voi struct _App *app = data; Evas_Event_Key_Down *ev = event_info; - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; } // just moving the part and text - else if (!strcmp(ev->keyname, "Down")) + else if (!strcmp(ev->key, "Down")) { _part_move(app, 0, 1); } - else if (!strcmp(ev->keyname, "Up")) + else if (!strcmp(ev->key, "Up")) { _part_move(app, 0, -1); } - else if (!strcmp(ev->keyname, "Left")) + else if (!strcmp(ev->key, "Left")) { _part_move(app, -1, 0); } - else if (!strcmp(ev->keyname, "Right")) + else if (!strcmp(ev->key, "Right")) { _part_move(app, 1, 0); } - else if (!strcmp(ev->keyname, "Prior")) + else if (!strcmp(ev->key, "Prior")) { _part_move(app, -1, -1); } - else if (!strcmp(ev->keyname, "Next")) + else if (!strcmp(ev->key, "Next")) { _part_move(app, 1, 1); } // adjusting the perspective focal point distance - else if (!strcmp(ev->keyname, "KP_Add")) + else if (!strcmp(ev->key, "KP_Add")) { app->focal += 5; edje_perspective_set(app->ps, 240, 160, 0, app->focal); edje_object_calc_force(app->edje_obj); } - else if (!strcmp(ev->keyname, "KP_Subtract")) + else if (!strcmp(ev->key, "KP_Subtract")) { app->focal -= 5; if (app->focal < 5) @@ -145,11 +145,11 @@ _on_bg_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, voi edje_object_calc_force(app->edje_obj); } // exiting - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/edje-signals-messages.c b/src/examples/edje/edje-signals-messages.c index b9b5f347e0..22155fde0f 100644 --- a/src/examples/edje/edje-signals-messages.c +++ b/src/examples/edje/edje-signals-messages.c @@ -51,12 +51,12 @@ _on_keydown(void *data, ev = (Evas_Event_Key_Down *)einfo; edje_obj = (Evas_Object *)data; - if (!strcmp(ev->keyname, "h")) /* print help */ + if (!strcmp(ev->key, "h")) /* print help */ { fprintf(stdout, commands); return; } - else if (!strcmp(ev->keyname, "t")) /* toggle right rectangle's visibility */ + else if (!strcmp(ev->key, "t")) /* toggle right rectangle's visibility */ { char buf[1024]; @@ -70,11 +70,11 @@ _on_keydown(void *data, return; } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } diff --git a/src/examples/edje/sigtest.c b/src/examples/edje/sigtest.c index 2d600fff98..a949ca3552 100644 --- a/src/examples/edje/sigtest.c +++ b/src/examples/edje/sigtest.c @@ -45,12 +45,12 @@ _on_keydown(void *data, edje_obj = ecore_evas_data_get(ee, "edje_obj"); edje_file = ecore_evas_data_get(ee, "file"); - if (!strcmp(ev->keyname, "h")) + if (!strcmp(ev->key, "h")) { fprintf(stdout, commands); return; } - else if (!strcmp(ev->keyname, "e")) + else if (!strcmp(ev->key, "e")) { if (!edje_object_file_set(edje_obj, edje_file, "plain/edje/group")) { @@ -64,7 +64,7 @@ _on_keydown(void *data, " file sigtest.edj with success!\n"); return; } - else if (!strcmp(ev->keyname, "l")) + else if (!strcmp(ev->key, "l")) { if (!edje_object_file_set(edje_obj, edje_file, "lua_base")) { @@ -78,7 +78,7 @@ _on_keydown(void *data, " file sigtest.edj with success!\n"); return; } - else if (!strcmp(ev->keyname, "m")) + else if (!strcmp(ev->key, "m")) { Edje_Message_String *msg = malloc(sizeof(*msg)); @@ -89,7 +89,7 @@ _on_keydown(void *data, fprintf(stdout, "C message sent\n"); return; } - else if (!strcmp(ev->keyname, "s")) + else if (!strcmp(ev->key, "s")) { fprintf(stdout, "\n"); edje_object_signal_emit(edje_obj, "C signal 1", "Csource"); @@ -97,11 +97,11 @@ _on_keydown(void *data, fprintf(stdout, "C signal sent\n"); return; } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) ecore_main_loop_quit(); else { - printf("unhandled key: %s\n", ev->keyname); + printf("unhandled key: %s\n", ev->key); fprintf(stdout, commands); } } 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) Evas_Event_Key_Down *ev = event_info; Evas_Object *em = data; - if (!strcmp(ev->keyname, "Return")) + if (!strcmp(ev->key, "Return")) { emotion_object_play_set(em, EINA_TRUE); } - else if (!strcmp(ev->keyname, "space")) + else if (!strcmp(ev->key, "space")) { emotion_object_play_set(em, EINA_FALSE); } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) { ecore_main_loop_quit(); } - else if (!strcmp(ev->keyname, "n")) + else if (!strcmp(ev->key, "n")) { const char *file; if (!curfile) @@ -62,7 +62,7 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info) fprintf(stderr, "playing next file: %s\n", file); emotion_object_file_set(em, file); } - else if (!strcmp(ev->keyname, "p")) + else if (!strcmp(ev->key, "p")) { const char *file; if (!curfile) @@ -73,33 +73,33 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info) fprintf(stderr, "playing next file: %s\n", file); emotion_object_file_set(em, file); } - else if (!strcmp(ev->keyname, "b")) + else if (!strcmp(ev->key, "b")) { emotion_object_border_set(em, 0, 0, 50, 50); } - else if (!strcmp(ev->keyname, "0")) + else if (!strcmp(ev->key, "0")) { emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_NONE); } - else if (!strcmp(ev->keyname, "w")) + else if (!strcmp(ev->key, "w")) { emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_WIDTH); } - else if (!strcmp(ev->keyname, "h")) + else if (!strcmp(ev->key, "h")) { emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_HEIGHT); } - else if (!strcmp(ev->keyname, "2")) + else if (!strcmp(ev->key, "2")) { emotion_object_keep_aspect_set(em, EMOTION_ASPECT_KEEP_BOTH); } - else if (!strcmp(ev->keyname, "c")) + else if (!strcmp(ev->key, "c")) { emotion_object_keep_aspect_set(em, EMOTION_ASPECT_CROP); } else { - fprintf(stderr, "unhandled key: %s\n", ev->keyname); + fprintf(stderr, "unhandled key: %s\n", ev->key); } } 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) Evas_Event_Key_Down *ev = event_info; Evas_Object *em = data; - if (!strcmp(ev->keyname, "Return")) + if (!strcmp(ev->key, "Return")) { emotion_object_play_set(em, EINA_TRUE); } - else if (!strcmp(ev->keyname, "space")) + else if (!strcmp(ev->key, "space")) { emotion_object_play_set(em, EINA_FALSE); } - else if (!strcmp(ev->keyname, "Escape")) + else if (!strcmp(ev->key, "Escape")) { ecore_main_loop_quit(); } - else if (!strcmp(ev->keyname, "t")) + else if (!strcmp(ev->key, "t")) { int w, h; emotion_object_size_get(em, &w, &h); fprintf(stderr, "example -> size: %dx%d\n", w, h); } - else if (!strcmp(ev->keyname, "s")) + else if (!strcmp(ev->key, "s")) { float len, pos; len = emotion_object_play_length_get(em); @@ -76,17 +76,17 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info) fprintf(stderr, "skipping to position %0.3f\n", pos); emotion_object_position_set(em, pos); } - else if (!strcmp(ev->keyname, "1")) + else if (!strcmp(ev->key, "1")) { fprintf(stderr, "setting speed to 1.0\n"); emotion_object_play_speed_set(em, 1.0); } - else if (!strcmp(ev->keyname, "2")) + else if (!strcmp(ev->key, "2")) { fprintf(stderr, "setting speed to 2.0\n"); emotion_object_play_speed_set(em, 2.0); } - else if (!strcmp(ev->keyname, "n")) + else if (!strcmp(ev->key, "n")) { const char *file; if (!curfile) @@ -97,7 +97,7 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info) fprintf(stderr, "playing next file: %s\n", file); emotion_object_file_set(em, file); } - else if (!strcmp(ev->keyname, "p")) + else if (!strcmp(ev->key, "p")) { const char *file; if (!curfile) @@ -108,18 +108,18 @@ _on_key_down(void *data, Evas *e, Evas_Object *o, void *event_info) fprintf(stderr, "playing next file: %s\n", file); emotion_object_file_set(em, file); } - else if (!strcmp(ev->keyname, "d")) + else if (!strcmp(ev->key, "d")) { evas_object_del(em); } - else if (!strcmp(ev->keyname, "l")) + else if (!strcmp(ev->key, "l")) { // force frame dropping sleep(5); } else { - fprintf(stderr, "unhandled key: %s\n", ev->keyname); + fprintf(stderr, "unhandled key: %s\n", ev->key); } } diff --git a/src/examples/ephysics/test_bouncing_ball.c b/src/examples/ephysics/test_bouncing_ball.c index 00736b09c8..6d2ad6d229 100644 --- a/src/examples/ephysics/test_bouncing_ball.c +++ b/src/examples/ephysics/test_bouncing_ball.c @@ -13,13 +13,13 @@ _on_keydown(void *data, Evas_Object *obj __UNUSED__, Evas_Object *src __UNUSED__ if (type != EVAS_CALLBACK_KEY_UP) return EINA_FALSE; - if (strcmp(ev->keyname, "Up") == 0) + if (strcmp(ev->key, "Up") == 0) ephysics_body_central_impulse_apply(body, 0, -300, 0); - else if (strcmp(ev->keyname, "Down") == 0) + else if (strcmp(ev->key, "Down") == 0) ephysics_body_central_impulse_apply(body, 0, 300, 0); - else if (strcmp(ev->keyname, "Right") == 0) + else if (strcmp(ev->key, "Right") == 0) ephysics_body_central_impulse_apply(body, 300, 0, 0); - else if (strcmp(ev->keyname, "Left") == 0) + else if (strcmp(ev->key, "Left") == 0) ephysics_body_central_impulse_apply(body, -300, 0, 0); return EINA_TRUE; diff --git a/src/examples/ephysics/test_velocity.c b/src/examples/ephysics/test_velocity.c index 785767bff1..068020470b 100644 --- a/src/examples/ephysics/test_velocity.c +++ b/src/examples/ephysics/test_velocity.c @@ -24,13 +24,13 @@ _on_keydown(void *data, Evas_Object *obj __UNUSED__, Evas_Object *src __UNUSED__ if (type != EVAS_CALLBACK_KEY_UP) return EINA_FALSE; - if (strcmp(ev->keyname, "Up") == 0) + if (strcmp(ev->key, "Up") == 0) ephysics_body_central_impulse_apply(body, 0, -300, 0); - else if (strcmp(ev->keyname, "Down") == 0) + else if (strcmp(ev->key, "Down") == 0) ephysics_body_central_impulse_apply(body, 0, 300, 0); - else if (strcmp(ev->keyname, "Right") == 0) + else if (strcmp(ev->key, "Right") == 0) ephysics_body_central_impulse_apply(body, 300, 0, 0); - else if (strcmp(ev->keyname, "Left") == 0) + else if (strcmp(ev->key, "Left") == 0) ephysics_body_central_impulse_apply(body, -300, 0, 0); return EINA_TRUE; diff --git a/src/examples/evas/evas-aspect-hints.c b/src/examples/evas/evas-aspect-hints.c index 0d81027075..6da0102ecd 100644 --- a/src/examples/evas/evas-aspect-hints.c +++ b/src/examples/evas/evas-aspect-hints.c @@ -89,7 +89,7 @@ _on_keydown(void *data EINA_UNUSED, mods = evas_key_modifier_get(evas_object_evas_get(o)); if (evas_key_modifier_is_set(mods, "Shift") && - strcmp(ev->keyname, "h") == 0) /* print help */ + strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, "commands are:\n" "\tc - cycle aspect control on object\n" @@ -100,7 +100,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "s") == 0) /* get aspect status of the obj */ + if (strcmp(ev->key, "s") == 0) /* get aspect status of the obj */ { Evas_Coord w, h; Evas_Aspect_Control aspect; @@ -114,7 +114,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* cycle aspect control on obj */ + if (strcmp(ev->key, "c") == 0) /* cycle aspect control on obj */ { Evas_Coord w, h; Evas_Aspect_Control aspect; @@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "h") == 0) /* change horizontal aspect component */ + if (strcmp(ev->key, "h") == 0) /* change horizontal aspect component */ { Evas_Coord w, h; Evas_Aspect_Control aspect; @@ -147,7 +147,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "v") == 0) /* change vertical aspect component */ + if (strcmp(ev->key, "v") == 0) /* change vertical aspect component */ { Evas_Coord w, h; Evas_Aspect_Control aspect; diff --git a/src/examples/evas/evas-box.c b/src/examples/evas/evas-box.c index 839759ef52..c58298e1c5 100644 --- a/src/examples/evas/evas-box.c +++ b/src/examples/evas/evas-box.c @@ -106,7 +106,7 @@ _on_keydown(void *data EINA_UNUSED, Evas_Event_Key_Down *ev = einfo; const Evas_Modifier *mods = evas_key_modifier_get(evas); - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; @@ -119,7 +119,7 @@ _on_keydown(void *data EINA_UNUSED, Evas_Object *obj; Eina_List *children; - pos = atoi(ev->keyname); + pos = atoi(ev->key); children = evas_object_box_children_get(d.box); obj = eina_list_nth(children, pos); @@ -137,14 +137,14 @@ list_free: { Evas_Object *o; int pos; - pos = atoi(ev->keyname); + pos = atoi(ev->key); o = _new_rectangle_add(d.evas); if (!evas_object_box_insert_at(d.box, o, pos)) evas_object_box_append(d.box, o); return; } - if (strcmp(ev->keyname, "a") == 0) + if (strcmp(ev->key, "a") == 0) { double h, v; @@ -166,7 +166,7 @@ list_free: return; } - if (strcmp(ev->keyname, "p") == 0) + if (strcmp(ev->key, "p") == 0) { int h, v; @@ -184,7 +184,7 @@ list_free: return; } - if (strcmp(ev->keyname, "1") == 0) + if (strcmp(ev->key, "1") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_horizontal, NULL, NULL); @@ -193,7 +193,7 @@ list_free: return; } - if (strcmp(ev->keyname, "2") == 0) + if (strcmp(ev->key, "2") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_vertical, NULL, NULL); @@ -202,7 +202,7 @@ list_free: return; } - if (strcmp(ev->keyname, "3") == 0) + if (strcmp(ev->key, "3") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_homogeneous_horizontal, NULL, @@ -213,7 +213,7 @@ list_free: return; } - if (strcmp(ev->keyname, "4") == 0) + if (strcmp(ev->key, "4") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_homogeneous_vertical, NULL, NULL); @@ -223,7 +223,7 @@ list_free: return; } - if (strcmp(ev->keyname, "5") == 0) + if (strcmp(ev->key, "5") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_homogeneous_max_size_horizontal, @@ -234,7 +234,7 @@ list_free: return; } - if (strcmp(ev->keyname, "6") == 0) + if (strcmp(ev->key, "6") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_homogeneous_max_size_vertical, @@ -245,7 +245,7 @@ list_free: return; } - if (strcmp(ev->keyname, "7") == 0) + if (strcmp(ev->key, "7") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_flow_horizontal, NULL, NULL); @@ -254,7 +254,7 @@ list_free: return; } - if (strcmp(ev->keyname, "8") == 0) + if (strcmp(ev->key, "8") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_flow_vertical, NULL, NULL); @@ -263,7 +263,7 @@ list_free: return; } - if (strcmp(ev->keyname, "9") == 0) + if (strcmp(ev->key, "9") == 0) { evas_object_box_layout_set( d.box, evas_object_box_layout_stack, NULL, NULL); @@ -272,7 +272,7 @@ list_free: return; } - if (strcmp(ev->keyname, "0") == 0) + if (strcmp(ev->key, "0") == 0) { evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL); diff --git a/src/examples/evas/evas-events.c b/src/examples/evas/evas-events.c index d89082399c..2f04248594 100644 --- a/src/examples/evas/evas-events.c +++ b/src/examples/evas/evas-events.c @@ -141,17 +141,17 @@ _on_keydown(void *data EINA_UNUSED, const Evas_Modifier *mods; Evas_Event_Key_Down *ev = einfo; - fprintf(stdout, "We've got key input: %s\n", ev->keyname); + fprintf(stdout, "We've got key input: %s\n", ev->key); fprintf(stdout, "It actually came from %s\n", d.focus ? "focus" : "key grab"); - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "a") == 0) /* toggle animation timer */ + if (strcmp(ev->key, "a") == 0) /* toggle animation timer */ { if (d.resize_timer != NULL) { @@ -167,7 +167,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* cycle between focus and key + if (strcmp(ev->key, "c") == 0) /* cycle between focus and key * grabs for key input */ { Eina_Bool ret; @@ -246,7 +246,7 @@ c_end: return; } - if (strcmp(ev->keyname, "d") == 0) /* delete canvas' callbacks */ + if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */ { fprintf(stdout, "Deleting canvas event callbacks\n"); evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, @@ -257,7 +257,7 @@ c_end: return; } - if (strcmp(ev->keyname, "f") == 0) /* freeze input for 3 seconds */ + if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */ { fprintf(stdout, "Freezing input for 3 seconds\n"); evas_event_freeze(evas); @@ -265,7 +265,7 @@ c_end: return; } - if (strcmp(ev->keyname, "p") == 0) /* toggle precise point + if (strcmp(ev->key, "p") == 0) /* toggle precise point * collision detection */ { Eina_Bool precise = evas_object_precise_is_inside_get(d.img); @@ -279,7 +279,7 @@ c_end: mods = evas_key_modifier_get(evas); if (evas_key_modifier_is_set(mods, "Control") && - (strcmp(ev->keyname, "o") == 0)) /* add an obscured + (strcmp(ev->key, "o") == 0)) /* add an obscured * rectangle to the middle * of the canvas */ { diff --git a/src/examples/evas/evas-hints.c b/src/examples/evas/evas-hints.c index 8cfbdb1b00..fb11421f24 100644 --- a/src/examples/evas/evas-hints.c +++ b/src/examples/evas/evas-hints.c @@ -157,12 +157,12 @@ _on_keydown(void *data EINA_UNUSED, r_data = &d.b_data; name = "bottom"; } - else if (strcmp(ev->keyname, "h") == 0) /* print help */ + else if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - else if (strcmp(ev->keyname, "s") == 0) /* get aspect status of the + else if (strcmp(ev->key, "s") == 0) /* get aspect status of the * rectangles WRT size * hints */ { @@ -177,7 +177,7 @@ _on_keydown(void *data EINA_UNUSED, if (!rect) return; - if (strcmp(ev->keyname, "a") == 0) /* alignment hints */ + if (strcmp(ev->key, "a") == 0) /* alignment hints */ { (r_data->align_ptr)++; @@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "m") == 0) /* min. size hints */ + if (strcmp(ev->key, "m") == 0) /* min. size hints */ { (r_data->min_ptr)++; @@ -211,7 +211,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "n") == 0) /* max. size hints */ + if (strcmp(ev->key, "n") == 0) /* max. size hints */ { (r_data->max_ptr)++; @@ -228,7 +228,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "p") == 0) /* padding size hints */ + if (strcmp(ev->key, "p") == 0) /* padding size hints */ { (r_data->padding_ptr)++; @@ -251,7 +251,7 @@ _on_keydown(void *data EINA_UNUSED, /* experiment with weights here. keep in mind that, for the box * object, only if all the children have non zero weights this hint * will have an effect */ - if (strcmp(ev->keyname, "w") == 0) /* weight hints */ + if (strcmp(ev->key, "w") == 0) /* weight hints */ { (r_data->weight_ptr)++; diff --git a/src/examples/evas/evas-images.c b/src/examples/evas/evas-images.c index 59ca8d3c99..d924d2539a 100644 --- a/src/examples/evas/evas-images.c +++ b/src/examples/evas/evas-images.c @@ -95,13 +95,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "m") == 0) /* toggle border image's smooth scaling */ + if (strcmp(ev->key, "m") == 0) /* toggle border image's smooth scaling */ { Eina_Bool smooth_scale = evas_object_image_smooth_scale_get(d.border); @@ -113,7 +113,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "t") == 0) /* change border's thickness */ + if (strcmp(ev->key, "t") == 0) /* change border's thickness */ { int l, r, t, b; @@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* change border's scaling factor */ + if (strcmp(ev->key, "c") == 0) /* change border's scaling factor */ { double scale = evas_object_image_border_scale_get(d.border); @@ -145,7 +145,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "b") == 0) /* change border's center + if (strcmp(ev->key, "b") == 0) /* change border's center * region's aspect */ { Eina_Bool fill = \ @@ -161,7 +161,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "a") == 0) /* toggle alpha channel usage */ + if (strcmp(ev->key, "a") == 0) /* toggle alpha channel usage */ { Eina_Bool alpha = evas_object_image_alpha_get(d.img1); @@ -173,7 +173,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "f") == 0) /* toggle filled property */ + if (strcmp(ev->key, "f") == 0) /* toggle filled property */ { Eina_Bool filled = evas_object_image_filled_get(d.img1); @@ -185,7 +185,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "x") == 0) /* change x fill coordinate */ + if (strcmp(ev->key, "x") == 0) /* change x fill coordinate */ { Evas_Coord x, y, w, h; @@ -198,7 +198,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "y") == 0) /* change y fill coordinate */ + if (strcmp(ev->key, "y") == 0) /* change y fill coordinate */ { Evas_Coord x, y, w, h; @@ -211,7 +211,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "w") == 0) /* change w fill size */ + if (strcmp(ev->key, "w") == 0) /* change w fill size */ { Evas_Coord x, y, w, h; @@ -226,7 +226,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "e") == 0) /* change h fill size */ + if (strcmp(ev->key, "e") == 0) /* change h fill size */ { Evas_Coord x, y, w, h; @@ -241,7 +241,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "s") == 0) /* status */ + if (strcmp(ev->key, "s") == 0) /* status */ { Evas_Coord x, y, w, h; diff --git a/src/examples/evas/evas-images2.c b/src/examples/evas/evas-images2.c index b1c8c79977..f4413018f3 100644 --- a/src/examples/evas/evas-images2.c +++ b/src/examples/evas/evas-images2.c @@ -160,13 +160,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "s") == 0) /* print proxy image' stride value */ + if (strcmp(ev->key, "s") == 0) /* print proxy image' stride value */ { int stride = evas_object_image_stride_get(d.noise_img); @@ -176,7 +176,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "p") == 0) /* change proxy's source */ + if (strcmp(ev->key, "p") == 0) /* change proxy's source */ { Evas_Object *source = evas_object_image_source_get(d.proxy_img); @@ -190,7 +190,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "a") == 0) /* save noise image to disk */ + if (strcmp(ev->key, "a") == 0) /* save noise image to disk */ { if (!evas_object_image_save(d.noise_img, file_path, NULL, quality_str)) fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n", @@ -202,7 +202,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "v") == 0) /* change source visibility */ + if (strcmp(ev->key, "v") == 0) /* change source visibility */ { Eina_Bool src_visible = evas_object_image_source_visible_get(d.proxy_img); @@ -210,7 +210,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "e") == 0) /* change source events */ + if (strcmp(ev->key, "e") == 0) /* change source events */ { Eina_Bool src_events = evas_object_image_source_events_get(d.proxy_img); evas_object_image_source_events_set(d.proxy_img, !src_events); diff --git a/src/examples/evas/evas-images3.c b/src/examples/evas/evas-images3.c index fe35ca3282..52e2656ca3 100644 --- a/src/examples/evas/evas-images3.c +++ b/src/examples/evas/evas-images3.c @@ -73,13 +73,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "i") == 0) /* change proxy's source */ + if (strcmp(ev->key, "i") == 0) /* change proxy's source */ { int stride = evas_object_image_stride_get(d.logo); int w, h; @@ -91,7 +91,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "w") == 0) /* save noise image to disk */ + if (strcmp(ev->key, "w") == 0) /* save noise image to disk */ { int i; char *pixels = evas_object_image_data_get(d.logo, EINA_FALSE); diff --git a/src/examples/evas/evas-map-utils.c b/src/examples/evas/evas-map-utils.c index 30eb052b34..f4acf5bb6d 100644 --- a/src/examples/evas/evas-map-utils.c +++ b/src/examples/evas/evas-map-utils.c @@ -170,7 +170,7 @@ _on_keydown(void *data, Evas *e, Evas_Object *o, void *event) const Evas_Modifier *mods; mods = evas_key_modifier_get(ad->canvas); - switch (ev->keyname[0]) + switch (ev->key[0]) { case 'a': ad->alpha = !ad->alpha; diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c index 03941aad22..5a2bdb8e8f 100644 --- a/src/examples/evas/evas-object-manipulation-eo.c +++ b/src/examples/evas/evas-object-manipulation-eo.c @@ -66,13 +66,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, "%s", commands); return; } - if (strcmp(ev->keyname, "o") == 0) /* change clipper's opacity */ + if (strcmp(ev->key, "o") == 0) /* change clipper's opacity */ { int alpha, r, g, b; @@ -91,7 +91,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "r") == 0) /* toggle clipper's color + if (strcmp(ev->key, "r") == 0) /* toggle clipper's color * between red and white */ { int alpha, r, g, b; @@ -117,7 +117,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* toggle clipper's clipping function */ + if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */ { fprintf(stdout, "Toggling clipping "); @@ -136,7 +136,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "v") == 0) /* toggle clipper's visibility */ + if (strcmp(ev->key, "v") == 0) /* toggle clipper's visibility */ { Eina_Bool visibility; /* Don't use "get"-"set" expressions in one eo_do call, diff --git a/src/examples/evas/evas-object-manipulation.c b/src/examples/evas/evas-object-manipulation.c index adc031667d..d52f221683 100644 --- a/src/examples/evas/evas-object-manipulation.c +++ b/src/examples/evas/evas-object-manipulation.c @@ -55,7 +55,7 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, "commands are:\n" "\to - change clipper's opacity\n" @@ -65,7 +65,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "o") == 0) /* change clipper's opacity */ + if (strcmp(ev->key, "o") == 0) /* change clipper's opacity */ { int alpha, r, g, b; @@ -84,7 +84,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "r") == 0) /* toggle clipper's color + if (strcmp(ev->key, "r") == 0) /* toggle clipper's color * between red and white */ { int alpha, r, g, b; @@ -110,7 +110,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* toggle clipper's clipping function */ + if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */ { fprintf(stdout, "Toggling clipping "); @@ -127,7 +127,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "v") == 0) /* toggle clipper's visibility */ + if (strcmp(ev->key, "v") == 0) /* toggle clipper's visibility */ { fprintf(stdout, "Clipper is now "); diff --git a/src/examples/evas/evas-smart-interface.c b/src/examples/evas/evas-smart-interface.c index 02ab8b2d7c..39e24f3121 100644 --- a/src/examples/evas/evas-smart-interface.c +++ b/src/examples/evas/evas-smart-interface.c @@ -491,19 +491,19 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "q") == 0) /* print help */ + if (strcmp(ev->key, "q") == 0) /* print help */ { _on_destroy(NULL); return; } - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "w") == 0) /* clear out smart object (WRT + if (strcmp(ev->key, "w") == 0) /* clear out smart object (WRT * members) */ { if (d.rects[0]) @@ -524,7 +524,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "l") == 0) /* insert random colored + if (strcmp(ev->key, "l") == 0) /* insert random colored * rectangle on the left */ { Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; @@ -553,7 +553,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "r") == 0) /* insert random colored + if (strcmp(ev->key, "r") == 0) /* insert random colored * rectangle on the right */ { Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; @@ -583,14 +583,14 @@ _on_keydown(void *data EINA_UNUSED, } /* move smart object along the canvas */ - if (strcmp(ev->keyname, "Right") == 0 || strcmp(ev->keyname, "Left") == 0 || - strcmp(ev->keyname, "Up") == 0 || strcmp(ev->keyname, "Down") == 0) + if (strcmp(ev->key, "Right") == 0 || strcmp(ev->key, "Left") == 0 || + strcmp(ev->key, "Up") == 0 || strcmp(ev->key, "Down") == 0) { Evas_Coord x, y; evas_object_geometry_get(d.smt, &x, &y, NULL, NULL); - switch (ev->keyname[0]) + switch (ev->key[0]) { case 'R': x += 20; @@ -615,7 +615,7 @@ _on_keydown(void *data EINA_UNUSED, } /* increase smart object's size */ - if (strcmp(ev->keyname, "i") == 0) + if (strcmp(ev->key, "i") == 0) { Evas_Coord w, h; @@ -630,7 +630,7 @@ _on_keydown(void *data EINA_UNUSED, } /* decrease smart object's size */ - if (strcmp(ev->keyname, "d") == 0) + if (strcmp(ev->key, "d") == 0) { Evas_Coord w, h; @@ -645,7 +645,7 @@ _on_keydown(void *data EINA_UNUSED, } /* change smart object's clipper color */ - if (strcmp(ev->keyname, "c") == 0) + if (strcmp(ev->key, "c") == 0) { cur_color = (cur_color + 1) % 4; diff --git a/src/examples/evas/evas-smart-object.c b/src/examples/evas/evas-smart-object.c index 7377c4731c..c21bfc2a41 100644 --- a/src/examples/evas/evas-smart-object.c +++ b/src/examples/evas/evas-smart-object.c @@ -443,19 +443,19 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "q") == 0) /* print help */ + if (strcmp(ev->key, "q") == 0) /* print help */ { _on_destroy(NULL); return; } - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "w") == 0) /* clear out smart object (WRT + if (strcmp(ev->key, "w") == 0) /* clear out smart object (WRT * members) */ { if (d.rects[0]) @@ -476,7 +476,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "l") == 0) /* insert random colored + if (strcmp(ev->key, "l") == 0) /* insert random colored * rectangle on the left */ { Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; @@ -505,7 +505,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "r") == 0) /* insert random colored + if (strcmp(ev->key, "r") == 0) /* insert random colored * rectangle on the right */ { Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; @@ -535,14 +535,14 @@ _on_keydown(void *data EINA_UNUSED, } /* move smart object along the canvas */ - if (strcmp(ev->keyname, "Right") == 0 || strcmp(ev->keyname, "Left") == 0 || - strcmp(ev->keyname, "Up") == 0 || strcmp(ev->keyname, "Down") == 0) + if (strcmp(ev->key, "Right") == 0 || strcmp(ev->key, "Left") == 0 || + strcmp(ev->key, "Up") == 0 || strcmp(ev->key, "Down") == 0) { Evas_Coord x, y; evas_object_geometry_get(d.smt, &x, &y, NULL, NULL); - switch (ev->keyname[0]) + switch (ev->key[0]) { case 'R': x += 20; @@ -568,7 +568,7 @@ _on_keydown(void *data EINA_UNUSED, } /* increase smart object's size */ - if (strcmp(ev->keyname, "i") == 0) + if (strcmp(ev->key, "i") == 0) { Evas_Coord w, h; @@ -584,7 +584,7 @@ _on_keydown(void *data EINA_UNUSED, } /* decrease smart object's size */ - if (strcmp(ev->keyname, "d") == 0) + if (strcmp(ev->key, "d") == 0) { Evas_Coord w, h; @@ -600,7 +600,7 @@ _on_keydown(void *data EINA_UNUSED, } /* change smart object's clipper color */ - if (strcmp(ev->keyname, "c") == 0) + if (strcmp(ev->key, "c") == 0) { cur_color = (cur_color + 1) % 4; @@ -615,21 +615,21 @@ _on_keydown(void *data EINA_UNUSED, } /* rotate object to the right */ - if (strcmp(ev->keyname, "period") == 0) + if (strcmp(ev->key, "period") == 0) { cur_angle = (cur_angle + 30) % 360; _map_update(); return; } - if (strcmp(ev->keyname, "comma") == 0) + if (strcmp(ev->key, "comma") == 0) { cur_angle = (cur_angle - 30) % 360; _map_update(); return; } - fprintf(stderr, "Invalid key: '%s'\n", ev->keyname); + fprintf(stderr, "Invalid key: '%s'\n", ev->key); } static void diff --git a/src/examples/evas/evas-stacking.c b/src/examples/evas/evas-stacking.c index 9763227f51..18221cd63a 100644 --- a/src/examples/evas/evas-stacking.c +++ b/src/examples/evas/evas-stacking.c @@ -91,13 +91,13 @@ _on_keydown(void *data EINA_UNUSED, Evas_Event_Key_Down *ev = einfo; const char *name = _name_get(d.rects[d.cur_rect]); - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "s") == 0) /* get status of the + if (strcmp(ev->key, "s") == 0) /* get status of the * rectangles WRT size * hints */ { @@ -126,7 +126,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "l") == 0) /* change background rectangle's layer */ + if (strcmp(ev->key, "l") == 0) /* change background rectangle's layer */ { d.cur_layer = (d.cur_layer + 1) % 3; evas_object_layer_set(d.bg, d.layers[d.cur_layer]); @@ -136,7 +136,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "c") == 0) /* change rectangle to operate on */ + if (strcmp(ev->key, "c") == 0) /* change rectangle to operate on */ { d.cur_rect = (d.cur_rect + 1) % 3; @@ -145,7 +145,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "t") == 0) /* bring target to top */ + if (strcmp(ev->key, "t") == 0) /* bring target to top */ { Evas_Object *neighbour; @@ -160,7 +160,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "m") == 0) /* bring target to bottom */ + if (strcmp(ev->key, "m") == 0) /* bring target to bottom */ { Evas_Object *neighbour; @@ -176,7 +176,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "p") == 0) /* toggle pass events */ + if (strcmp(ev->key, "p") == 0) /* toggle pass events */ { Eina_Bool pass = evas_object_pass_events_get(d.rects[d.cur_rect]); @@ -188,7 +188,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "r") == 0) /* toggle repeat events */ + if (strcmp(ev->key, "r") == 0) /* toggle repeat events */ { Eina_Bool repeat = evas_object_repeat_events_get(d.rects[d.cur_rect]); @@ -200,7 +200,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "a") == 0) /* stack target above */ + if (strcmp(ev->key, "a") == 0) /* stack target above */ { Evas_Object *neighbour = evas_object_above_get(d.rects[d.cur_rect]); @@ -222,7 +222,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "b") == 0) /* stack target below */ + if (strcmp(ev->key, "b") == 0) /* stack target below */ { Evas_Object *neighbour = evas_object_below_get(d.rects[d.cur_rect]); diff --git a/src/examples/evas/evas-text.c b/src/examples/evas/evas-text.c index e3c3e85d62..b24ac14e7f 100644 --- a/src/examples/evas/evas-text.c +++ b/src/examples/evas/evas-text.c @@ -154,13 +154,13 @@ _on_keydown(void *data EINA_UNUSED, { Evas_Event_Key_Down *ev = einfo; - if (strcmp(ev->keyname, "h") == 0) /* print help */ + if (strcmp(ev->key, "h") == 0) /* print help */ { fprintf(stdout, commands); return; } - if (strcmp(ev->keyname, "t") == 0) /* change text's current style */ + if (strcmp(ev->key, "t") == 0) /* change text's current style */ { Evas_Text_Style_Type type = evas_object_text_style_get(d.text); @@ -174,7 +174,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "f") == 0) /* change text's font */ + if (strcmp(ev->key, "f") == 0) /* change text's font */ { int sz; @@ -191,7 +191,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "b") == 0) /* change text's base color */ + if (strcmp(ev->key, "b") == 0) /* change text's base color */ { (d.t_data.text_ptr)++; @@ -208,7 +208,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "g") == 0) /* change text's glow 2 color */ + if (strcmp(ev->key, "g") == 0) /* change text's glow 2 color */ { (d.t_data.glow2_ptr)++; @@ -225,7 +225,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "w") == 0) /* change text's glow color */ + if (strcmp(ev->key, "w") == 0) /* change text's glow color */ { (d.t_data.glow_ptr)++; @@ -242,7 +242,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "o") == 0) /* change text's outline color */ + if (strcmp(ev->key, "o") == 0) /* change text's outline color */ { (d.t_data.outline_ptr)++; @@ -259,7 +259,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "s") == 0) /* change text's shadow color */ + if (strcmp(ev->key, "s") == 0) /* change text's shadow color */ { (d.t_data.shadow_ptr)++; @@ -276,7 +276,7 @@ _on_keydown(void *data EINA_UNUSED, return; } - if (strcmp(ev->keyname, "z") == 0) /* change text's font size */ + if (strcmp(ev->key, "z") == 0) /* change text's font size */ { const char *font; int size; diff --git a/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h b/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h index b6c4fc206b..84794c2db2 100644 --- a/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h +++ b/src/lib/ecore_imf_evas/Ecore_IMF_Evas.h @@ -112,7 +112,7 @@ EAPI void ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_eve * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) * { * Evas_Event_Key_Down *ev = event_info; - * if (!ev->keyname) return; + * if (!ev->key) return; * * if (imf_context) * { @@ -143,7 +143,7 @@ EAPI void ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, Ec * _key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) * { * Evas_Event_Key_Up *ev = event_info; - * if (!ev->keyname) return; + * if (!ev->key) return; * * if (imf_context) * { diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index f2b4b2b8c1..ce3841443a 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -2569,7 +2569,7 @@ EAPI void evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) EIN * * Example: * @dontinclude evas-stacking.c - * @skip if (strcmp(ev->keyname, "p") == 0) + * @skip if (strcmp(ev->key, "p") == 0) * @until } * * See the full @ref Example_Evas_Stacking "example". @@ -2597,7 +2597,7 @@ EAPI Eina_Bool evas_object_pass_events_get(const Evas_Object *obj) EINA_WARN_UNU * * Example: * @dontinclude evas-stacking.c - * @skip if (strcmp(ev->keyname, "r") == 0) + * @skip if (strcmp(ev->key, "r") == 0) * @until } * * See the full @ref Example_Evas_Stacking "example". @@ -3006,7 +3006,7 @@ EAPI void evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas * * Example: * @dontinclude evas-aspect-hints.c - * @skip if (strcmp(ev->keyname, "c") == 0) + * @skip if (strcmp(ev->key, "c") == 0) * @until } * * See the full @ref Example_Evas_Aspect_Hints "example". @@ -3434,7 +3434,7 @@ EAPI Evas_Render_Op evas_object_render_op_get(const Evas_Object *obj) * * Example code follows. * @dontinclude evas-events.c - * @skip if (strcmp(ev->keyname, "p") == 0) + * @skip if (strcmp(ev->key, "p") == 0) * @until } * * See the full example @ref Example_Evas_Events "here".