Use key instead of keyname for considering setxkbmap

This commit is contained in:
Jihoon Kim 2014-01-04 13:25:21 +09:00
parent 9637c2b835
commit 3ebc18731f
33 changed files with 223 additions and 223 deletions

View File

@ -1317,7 +1317,7 @@
* ones on our window. Test it by trying to resize it to smaller sizes * ones on our window. Test it by trying to resize it to smaller sizes
* than that: * than that:
* @dontinclude ecore_evas_window_sizes_example.c * @dontinclude ecore_evas_window_sizes_example.c
* @skip keyname, "m" * @skip key, "m"
* @until } * @until }
* @until } * @until }
* @until } * @until }
@ -1326,7 +1326,7 @@
* to two times our initial size. Test it by trying to resize the * to two times our initial size. Test it by trying to resize the
* window to bigger sizes than that: * window to bigger sizes than that:
* @dontinclude ecore_evas_window_sizes_example.c * @dontinclude ecore_evas_window_sizes_example.c
* @skip keyname, "x" * @skip key, "x"
* @until } * @until }
* @until } * @until }
* @until } * @until }
@ -1335,7 +1335,7 @@
* with the @c 'b' key. It will set a base size of two times the * with the @c 'b' key. It will set a base size of two times the
* initial one: * initial one:
* @dontinclude ecore_evas_window_sizes_example.c * @dontinclude ecore_evas_window_sizes_example.c
* @skip keyname, "b" * @skip key, "b"
* @until } * @until }
* @until } * @until }
* @until } * @until }
@ -1344,7 +1344,7 @@
* pixels. With than on (@c 's' key), you'll see the window will * 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 * always be bound to @b multiples of that size, for dimensions on
* both axis: * both axis:
* @skip keyname, "s" * @skip key, "s"
* @until } * @until }
* @until } * @until }
* @until } * @until }

View File

@ -119,7 +119,7 @@
* scale). Scaling will be applied to @c "part_one", only, because * scale). Scaling will be applied to @c "part_one", only, because
* that's the part flagged to be scaled at EDC level: * that's the part flagged to be scaled at EDC level:
* @dontinclude edje-basic.c * @dontinclude edje-basic.c
* @skip strcmp(ev->keyname, "s") == 0 * @skip strcmp(ev->key, "s") == 0
* @until } * @until }
* *
* Note, finally, that the @c 's' command will depend on the 'r' one * 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 * scaling factor. Only when the individual one is set to zero, will
* the global one take effect: * the global one take effect:
* @dontinclude edje-basic.c * @dontinclude edje-basic.c
* @skip strcmp(ev->keyname, "r") == 0 * @skip strcmp(ev->key, "r") == 0
* @until } * @until }
* *
* *
@ -810,7 +810,7 @@
* @until } * @until }
* @until } * @until }
* @dontinclude edje-signals-messages.c * @dontinclude edje-signals-messages.c
* @skip keyname, "t" * @skip key, "t"
* @until } * @until }
* *
* The example's window should look like this picture: * The example's window should look like this picture:

View File

@ -127,7 +127,7 @@
* @until ; * @until ;
* The 'p' one will change the source of the proxy image to one of the * The 'p' one will change the source of the proxy image to one of the
* other two, as seem above. * other two, as seem above.
* @skip if (strcmp(ev->keyname, "p") == 0) * @skip if (strcmp(ev->key, "p") == 0)
* @until } * @until }
* Note the top right image, the smaller one: * Note the top right image, the smaller one:
* @dontinclude evas-images2.c * @dontinclude evas-images2.c
@ -158,7 +158,7 @@
* The 's' command will save one of the images on the disk, in the png * The 's' command will save one of the images on the disk, in the png
* format: * format:
* @dontinclude evas-images2.c * @dontinclude evas-images2.c
* @skip if (strcmp(ev->keyname, "a") == 0) * @skip if (strcmp(ev->key, "a") == 0)
* @until } * @until }
* *
* The full example follows. * The full example follows.
@ -266,13 +266,13 @@
* processing for the canvas (in the example, just for 3 seconds). Try * processing for the canvas (in the example, just for 3 seconds). Try
* to issue events for it during that freeze time: * to issue events for it during that freeze time:
* @dontinclude evas-events.c * @dontinclude evas-events.c
* @skip if (strcmp(ev->keyname, "f") == 0) * @skip if (strcmp(ev->key, "f") == 0)
* @until } * @until }
* The 'd' command will unregister those two canvas callbacks for you, * The 'd' command will unregister those two canvas callbacks for you,
* so you won't see the messages about the focused object and the * so you won't see the messages about the focused object and the
* rendering process anymore: * rendering process anymore:
* @dontinclude evas-events.c * @dontinclude evas-events.c
* @skip if (strcmp(ev->keyname, "d") == 0) * @skip if (strcmp(ev->key, "d") == 0)
* @until } * @until }
* In this example, we start using a focused object to handle the input * 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 * events -- the background rectangle. We register a callback on an key input
@ -282,7 +282,7 @@
* @dontinclude evas-events.c * @dontinclude evas-events.c
* @skip examine the keys pressed * @skip examine the keys pressed
* @until key grab * @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 * information struct for key down events is the #Evas_Event_Key_Down
* one). There's one more trick for grabbing input events on this * one). There's one more trick for grabbing input events on this
* example -- evas_object_key_grab(). The 'c' command will, when * 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 the case) as not belonging to it when calculating mouse
* in/out/up/down events: * in/out/up/down events:
* @dontinclude evas-events.c * @dontinclude evas-events.c
* @skip if (strcmp(ev->keyname, "p") == 0) * @skip if (strcmp(ev->key, "p") == 0)
* @until } * @until }
* To finish the example, try the command bound to Control + 'o', * To finish the example, try the command bound to Control + 'o',
* which exemplifies Evas' <b>obscured regions</b>. When firstly * which exemplifies Evas' <b>obscured regions</b>. When firstly
@ -479,7 +479,7 @@
* height of the box equally and, then, place the items in the cells * height of the box equally and, then, place the items in the cells
* in the diagonal: * in the diagonal:
* @dontinclude evas-box.c * @dontinclude evas-box.c
* @skip keyname, "0" * @skip key, "0"
* @until } * @until }
* @dontinclude evas-box.c * @dontinclude evas-box.c
* @skip custom 'diagonal' layout * @skip custom 'diagonal' layout

View File

@ -68,13 +68,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, commands);
return; 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; min_set = !min_set;
@ -93,7 +93,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; max_set = !max_set;
@ -112,7 +112,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; base_set = !base_set;
@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; step_set = !step_set;
@ -149,7 +149,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "g") == 0) /* get screen geometry */ if (strcmp(ev->key, "g") == 0) /* get screen geometry */
{ {
int x, y, w, h; int x, y, w, h;
ecore_evas_screen_geometry_get(ee, &x, &y, &w, &h); ecore_evas_screen_geometry_get(ee, &x, &y, &w, &h);

View File

@ -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; ev = (Evas_Event_Key_Down *)event_info;
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; 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); edje_object_animation_set(obj, EINA_FALSE);
fprintf(stdout, "Stopping the animation in the Edje object\n"); 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(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -49,12 +49,12 @@ _on_keydown(void *data,
ev = (Evas_Event_Key_Down *)einfo; ev = (Evas_Event_Key_Down *)einfo;
edje_obj = (Evas_Object *)data; edje_obj = (Evas_Object *)data;
if (strcmp(ev->keyname, "h") == 0) /* print help */ if (strcmp(ev->key, "h") == 0) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; 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(); double scale = edje_scale_get();
@ -69,7 +69,7 @@ _on_keydown(void *data,
return; 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); double scale = edje_object_scale_get(edje_obj);
@ -86,11 +86,11 @@ _on_keydown(void *data,
return; return;
} }
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
ecore_main_loop_quit(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -44,29 +44,29 @@ _on_key_down(void *data,
evas_object_geometry_get(edje_obj, &x, &y, NULL, NULL); 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(); ecore_main_loop_quit();
} }
else if(strcmp(ev->keyname, "Down") == 0) else if(strcmp(ev->key, "Down") == 0)
{ {
y+=WALK; y+=WALK;
} }
else if(strcmp(ev->keyname, "Up") == 0) else if(strcmp(ev->key, "Up") == 0)
{ {
y-=WALK; y-=WALK;
} }
else if(strcmp(ev->keyname, "Right") == 0) else if(strcmp(ev->key, "Right") == 0)
{ {
x+=WALK; x+=WALK;
} }
else if(strcmp(ev->keyname, "Left") == 0) else if(strcmp(ev->key, "Left") == 0)
{ {
x-=WALK; x-=WALK;
} }
else else
{ {
fprintf(stdout, "Key %s not supported.\nCommands:%s", ev->keyname, commands); fprintf(stdout, "Key %s not supported.\nCommands:%s", ev->key, commands);
return; return;
} }

View File

@ -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; ev = (Evas_Event_Key_Down *)event_info;
edje_obj = ecore_evas_data_get(ee, "edje_obj"); edje_obj = ecore_evas_data_get(ee, "edje_obj");
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
if (!strcmp(ev->keyname, "i")) if (!strcmp(ev->key, "i"))
{ {
rect = evas_object_rectangle_add(e); rect = evas_object_rectangle_add(e);
evas_object_color_set(rect, 0, 0, 128, 255); 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); 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); rect = evas_object_rectangle_add(e);
evas_object_color_set(rect, 0, 128, 0, 255); 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); 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); 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(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -85,7 +85,7 @@ on_keydown(void *data, Evas *evas, Evas_Object *o EINA_UNUSED, void *einfo)
edje_obj = (Evas_Object *)data; edje_obj = (Evas_Object *)data;
mods = evas_key_modifier_get(evas); mods = evas_key_modifier_get(evas);
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
@ -94,7 +94,7 @@ on_keydown(void *data, Evas *evas, Evas_Object *o EINA_UNUSED, void *einfo)
{ {
int pos; int pos;
Evas_Object *obj = NULL; Evas_Object *obj = NULL;
pos = atoi(ev->keyname); pos = atoi(ev->key);
obj = edje_object_part_box_remove_at(edje_obj, "example/box", pos); obj = edje_object_part_box_remove_at(edje_obj, "example/box", pos);
if (obj) if (obj)
evas_object_del(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; Evas_Object *obj;
int pos; int pos;
pos = atoi(ev->keyname); pos = atoi(ev->key);
obj = new_greenie_block(evas); obj = new_greenie_block(evas);
if (!edje_object_part_box_insert_at(edje_obj, "example/box", obj, pos)) if (!edje_object_part_box_insert_at(edje_obj, "example/box", obj, pos))
edje_object_part_box_append(edje_obj, "example/box", obj); edje_object_part_box_append(edje_obj, "example/box", obj);
return; return;
} }
if (!strcmp(ev->keyname, "Escape")) if (!strcmp(ev->key, "Escape"))
ecore_main_loop_quit(); ecore_main_loop_quit();
} }

View File

@ -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; ev = (Evas_Event_Key_Down *)event_info;
edje_obj = ecore_evas_data_get(ee, "edje_obj"); edje_obj = ecore_evas_data_get(ee, "edje_obj");
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
else if (!strcmp(ev->keyname, "Down")) else if (!strcmp(ev->key, "Down"))
{ {
edje_object_part_drag_step(edje_obj, PARTNAME, 0, 1.0); 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); 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); 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); 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); 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(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -98,44 +98,44 @@ _on_bg_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, voi
struct _App *app = data; struct _App *app = data;
Evas_Event_Key_Down *ev = event_info; Evas_Event_Key_Down *ev = event_info;
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
// just moving the part and text // just moving the part and text
else if (!strcmp(ev->keyname, "Down")) else if (!strcmp(ev->key, "Down"))
{ {
_part_move(app, 0, 1); _part_move(app, 0, 1);
} }
else if (!strcmp(ev->keyname, "Up")) else if (!strcmp(ev->key, "Up"))
{ {
_part_move(app, 0, -1); _part_move(app, 0, -1);
} }
else if (!strcmp(ev->keyname, "Left")) else if (!strcmp(ev->key, "Left"))
{ {
_part_move(app, -1, 0); _part_move(app, -1, 0);
} }
else if (!strcmp(ev->keyname, "Right")) else if (!strcmp(ev->key, "Right"))
{ {
_part_move(app, 1, 0); _part_move(app, 1, 0);
} }
else if (!strcmp(ev->keyname, "Prior")) else if (!strcmp(ev->key, "Prior"))
{ {
_part_move(app, -1, -1); _part_move(app, -1, -1);
} }
else if (!strcmp(ev->keyname, "Next")) else if (!strcmp(ev->key, "Next"))
{ {
_part_move(app, 1, 1); _part_move(app, 1, 1);
} }
// adjusting the perspective focal point distance // adjusting the perspective focal point distance
else if (!strcmp(ev->keyname, "KP_Add")) else if (!strcmp(ev->key, "KP_Add"))
{ {
app->focal += 5; app->focal += 5;
edje_perspective_set(app->ps, 240, 160, 0, app->focal); edje_perspective_set(app->ps, 240, 160, 0, app->focal);
edje_object_calc_force(app->edje_obj); edje_object_calc_force(app->edje_obj);
} }
else if (!strcmp(ev->keyname, "KP_Subtract")) else if (!strcmp(ev->key, "KP_Subtract"))
{ {
app->focal -= 5; app->focal -= 5;
if (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); edje_object_calc_force(app->edje_obj);
} }
// exiting // exiting
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
ecore_main_loop_quit(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -51,12 +51,12 @@ _on_keydown(void *data,
ev = (Evas_Event_Key_Down *)einfo; ev = (Evas_Event_Key_Down *)einfo;
edje_obj = (Evas_Object *)data; edje_obj = (Evas_Object *)data;
if (!strcmp(ev->keyname, "h")) /* print help */ if (!strcmp(ev->key, "h")) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; 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]; char buf[1024];
@ -70,11 +70,11 @@ _on_keydown(void *data,
return; return;
} }
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
ecore_main_loop_quit(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -45,12 +45,12 @@ _on_keydown(void *data,
edje_obj = ecore_evas_data_get(ee, "edje_obj"); edje_obj = ecore_evas_data_get(ee, "edje_obj");
edje_file = ecore_evas_data_get(ee, "file"); edje_file = ecore_evas_data_get(ee, "file");
if (!strcmp(ev->keyname, "h")) if (!strcmp(ev->key, "h"))
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; 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")) 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"); " file sigtest.edj with success!\n");
return; return;
} }
else if (!strcmp(ev->keyname, "l")) else if (!strcmp(ev->key, "l"))
{ {
if (!edje_object_file_set(edje_obj, edje_file, "lua_base")) 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"); " file sigtest.edj with success!\n");
return; return;
} }
else if (!strcmp(ev->keyname, "m")) else if (!strcmp(ev->key, "m"))
{ {
Edje_Message_String *msg = malloc(sizeof(*msg)); Edje_Message_String *msg = malloc(sizeof(*msg));
@ -89,7 +89,7 @@ _on_keydown(void *data,
fprintf(stdout, "C message sent\n"); fprintf(stdout, "C message sent\n");
return; return;
} }
else if (!strcmp(ev->keyname, "s")) else if (!strcmp(ev->key, "s"))
{ {
fprintf(stdout, "\n"); fprintf(stdout, "\n");
edje_object_signal_emit(edje_obj, "C signal 1", "Csource"); edje_object_signal_emit(edje_obj, "C signal 1", "Csource");
@ -97,11 +97,11 @@ _on_keydown(void *data,
fprintf(stdout, "C signal sent\n"); fprintf(stdout, "C signal sent\n");
return; return;
} }
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
ecore_main_loop_quit(); ecore_main_loop_quit();
else else
{ {
printf("unhandled key: %s\n", ev->keyname); printf("unhandled key: %s\n", ev->key);
fprintf(stdout, commands); fprintf(stdout, commands);
} }
} }

View File

@ -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_Event_Key_Down *ev = event_info;
Evas_Object *em = data; Evas_Object *em = data;
if (!strcmp(ev->keyname, "Return")) if (!strcmp(ev->key, "Return"))
{ {
emotion_object_play_set(em, EINA_TRUE); 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); emotion_object_play_set(em, EINA_FALSE);
} }
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
{ {
ecore_main_loop_quit(); ecore_main_loop_quit();
} }
else if (!strcmp(ev->keyname, "n")) else if (!strcmp(ev->key, "n"))
{ {
const char *file; const char *file;
if (!curfile) 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); fprintf(stderr, "playing next file: %s\n", file);
emotion_object_file_set(em, file); emotion_object_file_set(em, file);
} }
else if (!strcmp(ev->keyname, "p")) else if (!strcmp(ev->key, "p"))
{ {
const char *file; const char *file;
if (!curfile) 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); fprintf(stderr, "playing next file: %s\n", file);
emotion_object_file_set(em, 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); 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); 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); 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); 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); 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); emotion_object_keep_aspect_set(em, EMOTION_ASPECT_CROP);
} }
else else
{ {
fprintf(stderr, "unhandled key: %s\n", ev->keyname); fprintf(stderr, "unhandled key: %s\n", ev->key);
} }
} }

View File

@ -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_Event_Key_Down *ev = event_info;
Evas_Object *em = data; Evas_Object *em = data;
if (!strcmp(ev->keyname, "Return")) if (!strcmp(ev->key, "Return"))
{ {
emotion_object_play_set(em, EINA_TRUE); 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); emotion_object_play_set(em, EINA_FALSE);
} }
else if (!strcmp(ev->keyname, "Escape")) else if (!strcmp(ev->key, "Escape"))
{ {
ecore_main_loop_quit(); ecore_main_loop_quit();
} }
else if (!strcmp(ev->keyname, "t")) else if (!strcmp(ev->key, "t"))
{ {
int w, h; int w, h;
emotion_object_size_get(em, &w, &h); emotion_object_size_get(em, &w, &h);
fprintf(stderr, "example -> size: %dx%d\n", 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; float len, pos;
len = emotion_object_play_length_get(em); 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); fprintf(stderr, "skipping to position %0.3f\n", pos);
emotion_object_position_set(em, 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"); fprintf(stderr, "setting speed to 1.0\n");
emotion_object_play_speed_set(em, 1.0); 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"); fprintf(stderr, "setting speed to 2.0\n");
emotion_object_play_speed_set(em, 2.0); emotion_object_play_speed_set(em, 2.0);
} }
else if (!strcmp(ev->keyname, "n")) else if (!strcmp(ev->key, "n"))
{ {
const char *file; const char *file;
if (!curfile) 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); fprintf(stderr, "playing next file: %s\n", file);
emotion_object_file_set(em, file); emotion_object_file_set(em, file);
} }
else if (!strcmp(ev->keyname, "p")) else if (!strcmp(ev->key, "p"))
{ {
const char *file; const char *file;
if (!curfile) 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); fprintf(stderr, "playing next file: %s\n", file);
emotion_object_file_set(em, file); emotion_object_file_set(em, file);
} }
else if (!strcmp(ev->keyname, "d")) else if (!strcmp(ev->key, "d"))
{ {
evas_object_del(em); evas_object_del(em);
} }
else if (!strcmp(ev->keyname, "l")) else if (!strcmp(ev->key, "l"))
{ {
// force frame dropping // force frame dropping
sleep(5); sleep(5);
} }
else else
{ {
fprintf(stderr, "unhandled key: %s\n", ev->keyname); fprintf(stderr, "unhandled key: %s\n", ev->key);
} }
} }

View File

@ -13,13 +13,13 @@ _on_keydown(void *data, Evas_Object *obj __UNUSED__, Evas_Object *src __UNUSED__
if (type != EVAS_CALLBACK_KEY_UP) if (type != EVAS_CALLBACK_KEY_UP)
return EINA_FALSE; return EINA_FALSE;
if (strcmp(ev->keyname, "Up") == 0) if (strcmp(ev->key, "Up") == 0)
ephysics_body_central_impulse_apply(body, 0, -300, 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); 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); 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); ephysics_body_central_impulse_apply(body, -300, 0, 0);
return EINA_TRUE; return EINA_TRUE;

View File

@ -24,13 +24,13 @@ _on_keydown(void *data, Evas_Object *obj __UNUSED__, Evas_Object *src __UNUSED__
if (type != EVAS_CALLBACK_KEY_UP) if (type != EVAS_CALLBACK_KEY_UP)
return EINA_FALSE; return EINA_FALSE;
if (strcmp(ev->keyname, "Up") == 0) if (strcmp(ev->key, "Up") == 0)
ephysics_body_central_impulse_apply(body, 0, -300, 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); 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); 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); ephysics_body_central_impulse_apply(body, -300, 0, 0);
return EINA_TRUE; return EINA_TRUE;

View File

@ -89,7 +89,7 @@ _on_keydown(void *data EINA_UNUSED,
mods = evas_key_modifier_get(evas_object_evas_get(o)); mods = evas_key_modifier_get(evas_object_evas_get(o));
if (evas_key_modifier_is_set(mods, "Shift") && 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" fprintf(stdout, "commands are:\n"
"\tc - cycle aspect control on object\n" "\tc - cycle aspect control on object\n"
@ -100,7 +100,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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_Coord w, h;
Evas_Aspect_Control aspect; Evas_Aspect_Control aspect;
@ -114,7 +114,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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_Coord w, h;
Evas_Aspect_Control aspect; Evas_Aspect_Control aspect;
@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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_Coord w, h;
Evas_Aspect_Control aspect; Evas_Aspect_Control aspect;
@ -147,7 +147,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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_Coord w, h;
Evas_Aspect_Control aspect; Evas_Aspect_Control aspect;

View File

@ -106,7 +106,7 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Event_Key_Down *ev = einfo; Evas_Event_Key_Down *ev = einfo;
const Evas_Modifier *mods = evas_key_modifier_get(evas); 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); fprintf(stdout, commands);
return; return;
@ -119,7 +119,7 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Object *obj; Evas_Object *obj;
Eina_List *children; Eina_List *children;
pos = atoi(ev->keyname); pos = atoi(ev->key);
children = evas_object_box_children_get(d.box); children = evas_object_box_children_get(d.box);
obj = eina_list_nth(children, pos); obj = eina_list_nth(children, pos);
@ -137,14 +137,14 @@ list_free:
{ {
Evas_Object *o; Evas_Object *o;
int pos; int pos;
pos = atoi(ev->keyname); pos = atoi(ev->key);
o = _new_rectangle_add(d.evas); o = _new_rectangle_add(d.evas);
if (!evas_object_box_insert_at(d.box, o, pos)) if (!evas_object_box_insert_at(d.box, o, pos))
evas_object_box_append(d.box, o); evas_object_box_append(d.box, o);
return; return;
} }
if (strcmp(ev->keyname, "a") == 0) if (strcmp(ev->key, "a") == 0)
{ {
double h, v; double h, v;
@ -166,7 +166,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "p") == 0) if (strcmp(ev->key, "p") == 0)
{ {
int h, v; int h, v;
@ -184,7 +184,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "1") == 0) if (strcmp(ev->key, "1") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_horizontal, NULL, NULL); d.box, evas_object_box_layout_horizontal, NULL, NULL);
@ -193,7 +193,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "2") == 0) if (strcmp(ev->key, "2") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_vertical, NULL, NULL); d.box, evas_object_box_layout_vertical, NULL, NULL);
@ -202,7 +202,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "3") == 0) if (strcmp(ev->key, "3") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_homogeneous_horizontal, NULL, d.box, evas_object_box_layout_homogeneous_horizontal, NULL,
@ -213,7 +213,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "4") == 0) if (strcmp(ev->key, "4") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_homogeneous_vertical, NULL, NULL); d.box, evas_object_box_layout_homogeneous_vertical, NULL, NULL);
@ -223,7 +223,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "5") == 0) if (strcmp(ev->key, "5") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_homogeneous_max_size_horizontal, d.box, evas_object_box_layout_homogeneous_max_size_horizontal,
@ -234,7 +234,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "6") == 0) if (strcmp(ev->key, "6") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_homogeneous_max_size_vertical, d.box, evas_object_box_layout_homogeneous_max_size_vertical,
@ -245,7 +245,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "7") == 0) if (strcmp(ev->key, "7") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_flow_horizontal, NULL, NULL); d.box, evas_object_box_layout_flow_horizontal, NULL, NULL);
@ -254,7 +254,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "8") == 0) if (strcmp(ev->key, "8") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_flow_vertical, NULL, NULL); d.box, evas_object_box_layout_flow_vertical, NULL, NULL);
@ -263,7 +263,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "9") == 0) if (strcmp(ev->key, "9") == 0)
{ {
evas_object_box_layout_set( evas_object_box_layout_set(
d.box, evas_object_box_layout_stack, NULL, NULL); d.box, evas_object_box_layout_stack, NULL, NULL);
@ -272,7 +272,7 @@ list_free:
return; return;
} }
if (strcmp(ev->keyname, "0") == 0) if (strcmp(ev->key, "0") == 0)
{ {
evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL); evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL);

View File

@ -141,17 +141,17 @@ _on_keydown(void *data EINA_UNUSED,
const Evas_Modifier *mods; const Evas_Modifier *mods;
Evas_Event_Key_Down *ev = einfo; 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 ? fprintf(stdout, "It actually came from %s\n", d.focus ?
"focus" : "key grab"); "focus" : "key grab");
if (strcmp(ev->keyname, "h") == 0) /* print help */ if (strcmp(ev->key, "h") == 0) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
if (strcmp(ev->keyname, "a") == 0) /* toggle animation timer */ if (strcmp(ev->key, "a") == 0) /* toggle animation timer */
{ {
if (d.resize_timer != NULL) if (d.resize_timer != NULL)
{ {
@ -167,7 +167,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 */ * grabs for key input */
{ {
Eina_Bool ret; Eina_Bool ret;
@ -246,7 +246,7 @@ c_end:
return; 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"); fprintf(stdout, "Deleting canvas event callbacks\n");
evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
@ -257,7 +257,7 @@ c_end:
return; 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"); fprintf(stdout, "Freezing input for 3 seconds\n");
evas_event_freeze(evas); evas_event_freeze(evas);
@ -265,7 +265,7 @@ c_end:
return; return;
} }
if (strcmp(ev->keyname, "p") == 0) /* toggle precise point if (strcmp(ev->key, "p") == 0) /* toggle precise point
* collision detection */ * collision detection */
{ {
Eina_Bool precise = evas_object_precise_is_inside_get(d.img); Eina_Bool precise = evas_object_precise_is_inside_get(d.img);
@ -279,7 +279,7 @@ c_end:
mods = evas_key_modifier_get(evas); mods = evas_key_modifier_get(evas);
if (evas_key_modifier_is_set(mods, "Control") && 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 * rectangle to the middle
* of the canvas */ * of the canvas */
{ {

View File

@ -157,12 +157,12 @@ _on_keydown(void *data EINA_UNUSED,
r_data = &d.b_data; r_data = &d.b_data;
name = "bottom"; name = "bottom";
} }
else if (strcmp(ev->keyname, "h") == 0) /* print help */ else if (strcmp(ev->key, "h") == 0) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; 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 * rectangles WRT size
* hints */ * hints */
{ {
@ -177,7 +177,7 @@ _on_keydown(void *data EINA_UNUSED,
if (!rect) return; if (!rect) return;
if (strcmp(ev->keyname, "a") == 0) /* alignment hints */ if (strcmp(ev->key, "a") == 0) /* alignment hints */
{ {
(r_data->align_ptr)++; (r_data->align_ptr)++;
@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "m") == 0) /* min. size hints */ if (strcmp(ev->key, "m") == 0) /* min. size hints */
{ {
(r_data->min_ptr)++; (r_data->min_ptr)++;
@ -211,7 +211,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "n") == 0) /* max. size hints */ if (strcmp(ev->key, "n") == 0) /* max. size hints */
{ {
(r_data->max_ptr)++; (r_data->max_ptr)++;
@ -228,7 +228,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "p") == 0) /* padding size hints */ if (strcmp(ev->key, "p") == 0) /* padding size hints */
{ {
(r_data->padding_ptr)++; (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 /* experiment with weights here. keep in mind that, for the box
* object, only if all the children have non zero weights this hint * object, only if all the children have non zero weights this hint
* will have an effect */ * will have an effect */
if (strcmp(ev->keyname, "w") == 0) /* weight hints */ if (strcmp(ev->key, "w") == 0) /* weight hints */
{ {
(r_data->weight_ptr)++; (r_data->weight_ptr)++;

View File

@ -95,13 +95,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, commands);
return; 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); Eina_Bool smooth_scale = evas_object_image_smooth_scale_get(d.border);
@ -113,7 +113,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; int l, r, t, b;
@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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); double scale = evas_object_image_border_scale_get(d.border);
@ -145,7 +145,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "b") == 0) /* change border's center if (strcmp(ev->key, "b") == 0) /* change border's center
* region's aspect */ * region's aspect */
{ {
Eina_Bool fill = \ Eina_Bool fill = \
@ -161,7 +161,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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); Eina_Bool alpha = evas_object_image_alpha_get(d.img1);
@ -173,7 +173,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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); Eina_Bool filled = evas_object_image_filled_get(d.img1);
@ -185,7 +185,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; Evas_Coord x, y, w, h;
@ -198,7 +198,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; Evas_Coord x, y, w, h;
@ -211,7 +211,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; Evas_Coord x, y, w, h;
@ -226,7 +226,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; Evas_Coord x, y, w, h;
@ -241,7 +241,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "s") == 0) /* status */ if (strcmp(ev->key, "s") == 0) /* status */
{ {
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;

View File

@ -160,13 +160,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, commands);
return; 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); int stride = evas_object_image_stride_get(d.noise_img);
@ -176,7 +176,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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); Evas_Object *source = evas_object_image_source_get(d.proxy_img);
@ -190,7 +190,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)) if (!evas_object_image_save(d.noise_img, file_path, NULL, quality_str))
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n", fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
@ -202,7 +202,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "v") == 0) /* change source visibility */ if (strcmp(ev->key, "v") == 0) /* change source visibility */
{ {
Eina_Bool src_visible = Eina_Bool src_visible =
evas_object_image_source_visible_get(d.proxy_img); evas_object_image_source_visible_get(d.proxy_img);
@ -210,7 +210,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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); Eina_Bool src_events = evas_object_image_source_events_get(d.proxy_img);
evas_object_image_source_events_set(d.proxy_img, !src_events); evas_object_image_source_events_set(d.proxy_img, !src_events);

View File

@ -73,13 +73,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, commands);
return; 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 stride = evas_object_image_stride_get(d.logo);
int w, h; int w, h;
@ -91,7 +91,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; int i;
char *pixels = evas_object_image_data_get(d.logo, EINA_FALSE); char *pixels = evas_object_image_data_get(d.logo, EINA_FALSE);

View File

@ -170,7 +170,7 @@ _on_keydown(void *data, Evas *e, Evas_Object *o, void *event)
const Evas_Modifier *mods; const Evas_Modifier *mods;
mods = evas_key_modifier_get(ad->canvas); mods = evas_key_modifier_get(ad->canvas);
switch (ev->keyname[0]) switch (ev->key[0])
{ {
case 'a': case 'a':
ad->alpha = !ad->alpha; ad->alpha = !ad->alpha;

View File

@ -66,13 +66,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, "%s", commands);
return; 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; int alpha, r, g, b;
@ -91,7 +91,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 */ * between red and white */
{ {
int alpha, r, g, b; int alpha, r, g, b;
@ -117,7 +117,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 "); fprintf(stdout, "Toggling clipping ");
@ -136,7 +136,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "v") == 0) /* toggle clipper's visibility */ if (strcmp(ev->key, "v") == 0) /* toggle clipper's visibility */
{ {
Eina_Bool visibility; Eina_Bool visibility;
/* Don't use "get"-"set" expressions in one eo_do call, /* Don't use "get"-"set" expressions in one eo_do call,

View File

@ -55,7 +55,7 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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" fprintf(stdout, "commands are:\n"
"\to - change clipper's opacity\n" "\to - change clipper's opacity\n"
@ -65,7 +65,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; int alpha, r, g, b;
@ -84,7 +84,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 */ * between red and white */
{ {
int alpha, r, g, b; int alpha, r, g, b;
@ -110,7 +110,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 "); fprintf(stdout, "Toggling clipping ");
@ -127,7 +127,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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 "); fprintf(stdout, "Clipper is now ");

View File

@ -491,19 +491,19 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); _on_destroy(NULL);
return; return;
} }
if (strcmp(ev->keyname, "h") == 0) /* print help */ if (strcmp(ev->key, "h") == 0) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
if (strcmp(ev->keyname, "w") == 0) /* clear out smart object (WRT if (strcmp(ev->key, "w") == 0) /* clear out smart object (WRT
* members) */ * members) */
{ {
if (d.rects[0]) if (d.rects[0])
@ -524,7 +524,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "l") == 0) /* insert random colored if (strcmp(ev->key, "l") == 0) /* insert random colored
* rectangle on the left */ * rectangle on the left */
{ {
Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev;
@ -553,7 +553,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "r") == 0) /* insert random colored if (strcmp(ev->key, "r") == 0) /* insert random colored
* rectangle on the right */ * rectangle on the right */
{ {
Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; 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 */ /* move smart object along the canvas */
if (strcmp(ev->keyname, "Right") == 0 || strcmp(ev->keyname, "Left") == 0 || if (strcmp(ev->key, "Right") == 0 || strcmp(ev->key, "Left") == 0 ||
strcmp(ev->keyname, "Up") == 0 || strcmp(ev->keyname, "Down") == 0) strcmp(ev->key, "Up") == 0 || strcmp(ev->key, "Down") == 0)
{ {
Evas_Coord x, y; Evas_Coord x, y;
evas_object_geometry_get(d.smt, &x, &y, NULL, NULL); evas_object_geometry_get(d.smt, &x, &y, NULL, NULL);
switch (ev->keyname[0]) switch (ev->key[0])
{ {
case 'R': case 'R':
x += 20; x += 20;
@ -615,7 +615,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* increase smart object's size */ /* increase smart object's size */
if (strcmp(ev->keyname, "i") == 0) if (strcmp(ev->key, "i") == 0)
{ {
Evas_Coord w, h; Evas_Coord w, h;
@ -630,7 +630,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* decrease smart object's size */ /* decrease smart object's size */
if (strcmp(ev->keyname, "d") == 0) if (strcmp(ev->key, "d") == 0)
{ {
Evas_Coord w, h; Evas_Coord w, h;
@ -645,7 +645,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* change smart object's clipper color */ /* change smart object's clipper color */
if (strcmp(ev->keyname, "c") == 0) if (strcmp(ev->key, "c") == 0)
{ {
cur_color = (cur_color + 1) % 4; cur_color = (cur_color + 1) % 4;

View File

@ -443,19 +443,19 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); _on_destroy(NULL);
return; return;
} }
if (strcmp(ev->keyname, "h") == 0) /* print help */ if (strcmp(ev->key, "h") == 0) /* print help */
{ {
fprintf(stdout, commands); fprintf(stdout, commands);
return; return;
} }
if (strcmp(ev->keyname, "w") == 0) /* clear out smart object (WRT if (strcmp(ev->key, "w") == 0) /* clear out smart object (WRT
* members) */ * members) */
{ {
if (d.rects[0]) if (d.rects[0])
@ -476,7 +476,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "l") == 0) /* insert random colored if (strcmp(ev->key, "l") == 0) /* insert random colored
* rectangle on the left */ * rectangle on the left */
{ {
Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev;
@ -505,7 +505,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "r") == 0) /* insert random colored if (strcmp(ev->key, "r") == 0) /* insert random colored
* rectangle on the right */ * rectangle on the right */
{ {
Evas_Object *rect = evas_object_rectangle_add(d.evas), *prev; 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 */ /* move smart object along the canvas */
if (strcmp(ev->keyname, "Right") == 0 || strcmp(ev->keyname, "Left") == 0 || if (strcmp(ev->key, "Right") == 0 || strcmp(ev->key, "Left") == 0 ||
strcmp(ev->keyname, "Up") == 0 || strcmp(ev->keyname, "Down") == 0) strcmp(ev->key, "Up") == 0 || strcmp(ev->key, "Down") == 0)
{ {
Evas_Coord x, y; Evas_Coord x, y;
evas_object_geometry_get(d.smt, &x, &y, NULL, NULL); evas_object_geometry_get(d.smt, &x, &y, NULL, NULL);
switch (ev->keyname[0]) switch (ev->key[0])
{ {
case 'R': case 'R':
x += 20; x += 20;
@ -568,7 +568,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* increase smart object's size */ /* increase smart object's size */
if (strcmp(ev->keyname, "i") == 0) if (strcmp(ev->key, "i") == 0)
{ {
Evas_Coord w, h; Evas_Coord w, h;
@ -584,7 +584,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* decrease smart object's size */ /* decrease smart object's size */
if (strcmp(ev->keyname, "d") == 0) if (strcmp(ev->key, "d") == 0)
{ {
Evas_Coord w, h; Evas_Coord w, h;
@ -600,7 +600,7 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* change smart object's clipper color */ /* change smart object's clipper color */
if (strcmp(ev->keyname, "c") == 0) if (strcmp(ev->key, "c") == 0)
{ {
cur_color = (cur_color + 1) % 4; cur_color = (cur_color + 1) % 4;
@ -615,21 +615,21 @@ _on_keydown(void *data EINA_UNUSED,
} }
/* rotate object to the right */ /* rotate object to the right */
if (strcmp(ev->keyname, "period") == 0) if (strcmp(ev->key, "period") == 0)
{ {
cur_angle = (cur_angle + 30) % 360; cur_angle = (cur_angle + 30) % 360;
_map_update(); _map_update();
return; return;
} }
if (strcmp(ev->keyname, "comma") == 0) if (strcmp(ev->key, "comma") == 0)
{ {
cur_angle = (cur_angle - 30) % 360; cur_angle = (cur_angle - 30) % 360;
_map_update(); _map_update();
return; return;
} }
fprintf(stderr, "Invalid key: '%s'\n", ev->keyname); fprintf(stderr, "Invalid key: '%s'\n", ev->key);
} }
static void static void

View File

@ -91,13 +91,13 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Event_Key_Down *ev = einfo; Evas_Event_Key_Down *ev = einfo;
const char *name = _name_get(d.rects[d.cur_rect]); 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); fprintf(stdout, commands);
return; return;
} }
if (strcmp(ev->keyname, "s") == 0) /* get status of the if (strcmp(ev->key, "s") == 0) /* get status of the
* rectangles WRT size * rectangles WRT size
* hints */ * hints */
{ {
@ -126,7 +126,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; d.cur_layer = (d.cur_layer + 1) % 3;
evas_object_layer_set(d.bg, d.layers[d.cur_layer]); evas_object_layer_set(d.bg, d.layers[d.cur_layer]);
@ -136,7 +136,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; d.cur_rect = (d.cur_rect + 1) % 3;
@ -145,7 +145,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "t") == 0) /* bring target to top */ if (strcmp(ev->key, "t") == 0) /* bring target to top */
{ {
Evas_Object *neighbour; Evas_Object *neighbour;
@ -160,7 +160,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "m") == 0) /* bring target to bottom */ if (strcmp(ev->key, "m") == 0) /* bring target to bottom */
{ {
Evas_Object *neighbour; Evas_Object *neighbour;
@ -176,7 +176,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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]); Eina_Bool pass = evas_object_pass_events_get(d.rects[d.cur_rect]);
@ -188,7 +188,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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]); Eina_Bool repeat = evas_object_repeat_events_get(d.rects[d.cur_rect]);
@ -200,7 +200,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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]); Evas_Object *neighbour = evas_object_above_get(d.rects[d.cur_rect]);
@ -222,7 +222,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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]); Evas_Object *neighbour = evas_object_below_get(d.rects[d.cur_rect]);

View File

@ -154,13 +154,13 @@ _on_keydown(void *data EINA_UNUSED,
{ {
Evas_Event_Key_Down *ev = einfo; 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); fprintf(stdout, commands);
return; 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); Evas_Text_Style_Type type = evas_object_text_style_get(d.text);
@ -174,7 +174,7 @@ _on_keydown(void *data EINA_UNUSED,
return; return;
} }
if (strcmp(ev->keyname, "f") == 0) /* change text's font */ if (strcmp(ev->key, "f") == 0) /* change text's font */
{ {
int sz; int sz;
@ -191,7 +191,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)++; (d.t_data.text_ptr)++;
@ -208,7 +208,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)++; (d.t_data.glow2_ptr)++;
@ -225,7 +225,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)++; (d.t_data.glow_ptr)++;
@ -242,7 +242,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)++; (d.t_data.outline_ptr)++;
@ -259,7 +259,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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)++; (d.t_data.shadow_ptr)++;
@ -276,7 +276,7 @@ _on_keydown(void *data EINA_UNUSED,
return; 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; const char *font;
int size; int size;

View File

@ -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) * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
* { * {
* Evas_Event_Key_Down *ev = event_info; * Evas_Event_Key_Down *ev = event_info;
* if (!ev->keyname) return; * if (!ev->key) return;
* *
* if (imf_context) * 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) * _key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
* { * {
* Evas_Event_Key_Up *ev = event_info; * Evas_Event_Key_Up *ev = event_info;
* if (!ev->keyname) return; * if (!ev->key) return;
* *
* if (imf_context) * if (imf_context)
* { * {

View File

@ -2569,7 +2569,7 @@ EAPI void evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) EIN
* *
* Example: * Example:
* @dontinclude evas-stacking.c * @dontinclude evas-stacking.c
* @skip if (strcmp(ev->keyname, "p") == 0) * @skip if (strcmp(ev->key, "p") == 0)
* @until } * @until }
* *
* See the full @ref Example_Evas_Stacking "example". * 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: * Example:
* @dontinclude evas-stacking.c * @dontinclude evas-stacking.c
* @skip if (strcmp(ev->keyname, "r") == 0) * @skip if (strcmp(ev->key, "r") == 0)
* @until } * @until }
* *
* See the full @ref Example_Evas_Stacking "example". * 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: * Example:
* @dontinclude evas-aspect-hints.c * @dontinclude evas-aspect-hints.c
* @skip if (strcmp(ev->keyname, "c") == 0) * @skip if (strcmp(ev->key, "c") == 0)
* @until } * @until }
* *
* See the full @ref Example_Evas_Aspect_Hints "example". * 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. * Example code follows.
* @dontinclude evas-events.c * @dontinclude evas-events.c
* @skip if (strcmp(ev->keyname, "p") == 0) * @skip if (strcmp(ev->key, "p") == 0)
* @until } * @until }
* *
* See the full example @ref Example_Evas_Events "here". * See the full example @ref Example_Evas_Events "here".