examples/evas: Use printf instead of fprintf(stdout, ...)

Summary:
Applies the correction purely mechanically using the following shell
command-line:

    src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 | uniq | \
        xargs sed -i "s/fprintf(stdout/printf(/"

This fixes a few warnings about lack of a format string:

    warning: format not a string literal and no format arguments [-Wformat-security]
        fprintf(stdout, commands);

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4691
This commit is contained in:
Bryce Harrington 2017-04-20 14:21:21 +09:00 committed by Jean-Philippe Andre
parent c4dae329e8
commit b847d3124b
19 changed files with 204 additions and 204 deletions

View File

@ -193,7 +193,7 @@ _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
_recalculate_position();
}
else
fprintf(stdout, "Down, Up for position of camera; Left, Right for scale of each node");
printf("Down, Up for position of camera; Left, Right for scale of each node");
}
static void
_on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event_info)
@ -215,7 +215,7 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
if (flag)
{
fprintf(stdout, "Boom! Time expended for color pick: %2.7f .\n", diff_sec);
printf("Boom! Time expended for color pick: %2.7f .\n", diff_sec);
evas_canvas3d_node_scale_set(n, VEC_3(SMALL_SCALE));
}
}
@ -227,7 +227,7 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
if (flag)
{
fprintf(stdout, "Boom! Time expended for geometry pick: %2.7f .\n", diff_sec);
printf("Boom! Time expended for geometry pick: %2.7f .\n", diff_sec);
evas_canvas3d_node_scale_set(n, VEC_3(BIG_SCALE));
}
}
@ -356,7 +356,7 @@ int main(int argc, char **argv)
if (!precision) precision = 30;
if (!texture) texture = (char *)image_path;
fprintf(stdout, "row - %d, col - %d, precision of spheres - %d, texture - %s\n",
printf("row - %d, col - %d, precision of spheres - %d, texture - %s\n",
row, col, precision, texture);
ecore_evas = ecore_evas_new("opengl_x11", 10, 10, WIDTH, HEIGHT, NULL);

View File

@ -65,12 +65,12 @@ Evas_Canvas3D_Frustum_Mode key = EVAS_CANVAS3D_FRUSTUM_MODE_AABB;
static void
_show_help()
{
fprintf(stdout, "Press 'w'/'s' key to move far frustum plane from/to the camera\n");
fprintf(stdout, "Press 't'/'g' key to move near frustum plane from/to the camera\n");
fprintf(stdout, "Press '1'/'2' key to set camera to the first/second position\n");
fprintf(stdout, "Press '3'/'4'/'5' key to set bounding sphere/aabb/central point mode\n");
fprintf(stdout, "Press 'i', 'k', 'j', 'l', 'u' and 'o' keys to move mesh node in 3D\n");
fprintf(stdout, "Press 'z', 'x', 'c', 'Z', 'X' and 'C' keys to change scaling constants of mesh\n");
printf("Press 'w'/'s' key to move far frustum plane from/to the camera\n");
printf("Press 't'/'g' key to move near frustum plane from/to the camera\n");
printf("Press '1'/'2' key to set camera to the first/second position\n");
printf("Press '3'/'4'/'5' key to set bounding sphere/aabb/central point mode\n");
printf("Press 'i', 'k', 'j', 'l', 'u' and 'o' keys to move mesh node in 3D\n");
printf("Press 'z', 'x', 'c', 'Z', 'X' and 'C' keys to change scaling constants of mesh\n");
}
static void
@ -246,13 +246,13 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
{
evas_canvas3d_node_position_set(scene->camera_node, 0.0, 0.0, 300.0);
evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
fprintf(stdout, "Changed position and view of camera\n");
printf("Changed position and view of camera\n");
}
else if (!strcmp("2", ev->key))
{
evas_canvas3d_node_position_set(scene->camera_node, 300.0, 300.0, 300.0);
evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
fprintf(stdout, "Changed position and view of camera\n");
printf("Changed position and view of camera\n");
}
else if (!strcmp("3", ev->key))
{
@ -273,7 +273,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
_redraw_bounding_object(data);
frustum = evas_canvas3d_camera_node_visible_get(scene->camera, scene->camera_node, scene->mesh_node_model, key);
fprintf(stdout, "far - %f frustum - %d radius - %f\n", ffar, frustum, radius);
printf("far - %f frustum - %d radius - %f\n", ffar, frustum, radius);
}
static void

View File

@ -130,17 +130,17 @@ _cb_collision(void *data EINA_UNUSED, const Efl_Event *event)
static void
_show_help()
{
fprintf(stdout, "Press 'w'/'s' key to move up/down object\n");
fprintf(stdout, "Press 'a'/'d' key to move left/right object\n");
fprintf(stdout, "Press 'q'/'e' key to move near/far object\n");
fprintf(stdout, "Cude and model can be moved.\n");
fprintf(stdout, "Cube detects intersection with model, sphere, cone\n");
fprintf(stdout, "Model detects intersection with sphere\n");
fprintf(stdout, "Press '1'/'2' key to change kind of node - billboard/normal model\n");
fprintf(stdout, "Press '3'/'4' key to enable/disable post render with anti-aliasing\n");
fprintf(stdout, "Press '5'/'6' key to enable/disable shadow effect\n");
fprintf(stdout, "Press Up/Down key to change position of camera\n");
fprintf(stdout, "Press 'i' key to return initial view of scene\n");
printf("Press 'w'/'s' key to move up/down object\n");
printf("Press 'a'/'d' key to move left/right object\n");
printf("Press 'q'/'e' key to move near/far object\n");
printf("Cude and model can be moved.\n");
printf("Cube detects intersection with model, sphere, cone\n");
printf("Model detects intersection with sphere\n");
printf("Press '1'/'2' key to change kind of node - billboard/normal model\n");
printf("Press '3'/'4' key to enable/disable post render with anti-aliasing\n");
printf("Press '5'/'6' key to enable/disable shadow effect\n");
printf("Press Up/Down key to change position of camera\n");
printf("Press 'i' key to return initial view of scene\n");
}
static Eina_Bool

View File

@ -92,7 +92,7 @@ _on_keydown(void *data EINA_UNUSED,
if (evas_key_modifier_is_set(mods, "Shift") &&
strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, "commands are:\n"
printf("commands are:\n"
"\tc - cycle aspect control on object\n"
"\th - change horizontal aspect component\n"
"\tv - change vertical aspect component\n"
@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_aspect_get(d.rect, &aspect, &w, &h);
fprintf(stdout, "Object has aspect %s, with horizontal compontent %d"
printf("Object has aspect %s, with horizontal compontent %d"
" and vertical compontent %d\n",
_get_aspect_name(aspect), w, h);
@ -126,7 +126,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_aspect_set(d.rect, aspect, w, h);
fprintf(stdout, "Changing aspect control to %s\n",
printf("Changing aspect control to %s\n",
_get_aspect_name(aspect));
return;
@ -143,7 +143,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_aspect_set(d.rect, aspect, w, h);
fprintf(stdout, "Changing horizontal aspect component to %d\n", w);
printf("Changing horizontal aspect component to %d\n", w);
return;
}
@ -159,7 +159,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_aspect_set(d.rect, aspect, w, h);
fprintf(stdout, "Changing vertical aspect component to %d\n", h);
printf("Changing vertical aspect component to %d\n", h);
return;
}

View File

@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, "%s", commands);
printf("%s", commands);
return;
}
@ -161,7 +161,7 @@ list_free:
evas_object_box_align_set(d.box, h, v);
fprintf(stdout, "Applying new alignment values (%.1f, %.1f)"
printf("Applying new alignment values (%.1f, %.1f)"
" on the box\n", h, v);
return;
}
@ -179,7 +179,7 @@ list_free:
evas_object_box_padding_set(d.box, h, v);
fprintf(stdout, "Applying new padding values (%d, %d)"
printf("Applying new padding values (%d, %d)"
" on the box\n", h, v);
return;
}
@ -189,7 +189,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_horizontal, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal");
printf("Applying '%s' layout on the box\n", "horizontal");
return;
}
@ -198,7 +198,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_vertical, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "vertical");
printf("Applying '%s' layout on the box\n", "vertical");
return;
}
@ -208,7 +208,7 @@ list_free:
d.box, evas_object_box_layout_homogeneous_horizontal, NULL,
NULL);
fprintf(stdout, "Applying '%s' layout on the box\n",
printf("Applying '%s' layout on the box\n",
"horizontal homogeneous");
return;
}
@ -218,7 +218,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_homogeneous_vertical, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n",
printf("Applying '%s' layout on the box\n",
"vertical homogeneous");
return;
}
@ -229,7 +229,7 @@ list_free:
d.box, evas_object_box_layout_homogeneous_max_size_horizontal,
NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n",
printf("Applying '%s' layout on the box\n",
"horizontal maximum size homogeneous");
return;
}
@ -240,7 +240,7 @@ list_free:
d.box, evas_object_box_layout_homogeneous_max_size_vertical,
NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n",
printf("Applying '%s' layout on the box\n",
"vertical maximum size homogeneous");
return;
}
@ -250,7 +250,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_flow_horizontal, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal flow");
printf("Applying '%s' layout on the box\n", "horizontal flow");
return;
}
@ -259,7 +259,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_flow_vertical, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "vertical flow");
printf("Applying '%s' layout on the box\n", "vertical flow");
return;
}
@ -268,7 +268,7 @@ list_free:
evas_object_box_layout_set(
d.box, evas_object_box_layout_stack, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "stack");
printf("Applying '%s' layout on the box\n", "stack");
return;
}
@ -276,7 +276,7 @@ list_free:
{
evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL);
fprintf(stdout, "Applying '%s' layout on the box\n", "CUSTOM");
printf("Applying '%s' layout on the box\n", "CUSTOM");
return;
}
}
@ -361,7 +361,7 @@ main(void)
evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE);
evas_object_show(d.border);
fprintf(stdout, "%s", commands);
printf("%s", commands);
_canvas_resize_cb(d.ee);
ecore_main_loop_begin();

View File

@ -66,13 +66,13 @@ _object_focus_in_cb(void *data EINA_UNUSED,
Evas *e,
void *event_info)
{
fprintf(stdout, "An object got focused: %s\n",
printf("An object got focused: %s\n",
evas_object_name_get(event_info));
fprintf(stdout, "Let's recheck it: %s\n",
printf("Let's recheck it: %s\n",
evas_object_name_get(evas_focus_get(e)));
fprintf(stdout, "And again: %s\n", evas_object_focus_get(event_info) ?
printf("And again: %s\n", evas_object_focus_get(event_info) ?
"OK!" : "Oops, something is bad.");
}
@ -82,7 +82,7 @@ _render_flush_cb(void *data EINA_UNUSED,
Evas *e EINA_UNUSED,
void *event_info EINA_UNUSED)
{
fprintf(stdout, "Canvas is about to flush its rendering pipeline!\n");
printf("Canvas is about to flush its rendering pipeline!\n");
}
/* put some action in the canvas */
@ -106,7 +106,7 @@ _resize_cb(void *data EINA_UNUSED)
static Eina_Bool
_thaw_cb(void *data EINA_UNUSED)
{
fprintf(stdout, "Canvas was frozen %d times, now thawing.\n",
printf("Canvas was frozen %d times, now thawing.\n",
evas_event_freeze_get(d.canvas));
evas_event_thaw(d.canvas);
return EINA_FALSE; /* do not re-issue the timer */
@ -119,7 +119,7 @@ _on_mouse_in(void *data EINA_UNUSED,
Evas_Object *o EINA_UNUSED,
void *einfo EINA_UNUSED)
{
fprintf(stdout, "Enlightenment logo has had the mouse in.\n");
printf("Enlightenment logo has had the mouse in.\n");
}
static void
@ -128,7 +128,7 @@ _on_mouse_out(void *data EINA_UNUSED,
Evas_Object *o EINA_UNUSED,
void *einfo EINA_UNUSED)
{
fprintf(stdout, "Enlightenment logo has had the mouse out.\n");
printf("Enlightenment logo has had the mouse out.\n");
} /* mouse exits the object's area */
/* examine the keys pressed */
@ -141,8 +141,8 @@ _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->key);
fprintf(stdout, "It actually came from %s\n", d.focus ?
printf("We've got key input: %s\n", ev->key);
printf("It actually came from %s\n", d.focus ?
"focus" : "key grab");
if (strcmp(ev->key, "h") == 0) /* print help */
@ -155,13 +155,13 @@ _on_keydown(void *data EINA_UNUSED,
{
if (d.resize_timer != NULL)
{
fprintf(stdout, "Stopping animation timer\n");
printf("Stopping animation timer\n");
ecore_timer_del(d.resize_timer);
d.resize_timer = NULL;
}
else
{
fprintf(stdout, "Re-issuing animation timer\n");
printf("Re-issuing animation timer\n");
d.resize_timer = ecore_timer_add(2, _resize_cb, NULL);
}
return;
@ -174,56 +174,56 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Modifier_Mask mask =
evas_key_modifier_mask_get(d.canvas, "Control");
fprintf(stdout, "Switching to %s for key input\n", d.focus ?
printf("Switching to %s for key input\n", d.focus ?
"key grabs" : "focus");
if (d.focus)
{
evas_object_focus_set(d.bg, EINA_FALSE);
fprintf(stdout, "Focused object is now %s\n",
printf("Focused object is now %s\n",
evas_focus_get(d.canvas) ?
"still valid! Something went wrong." : "none.");
ret = evas_object_key_grab(d.bg, "a", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "c", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "d", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "f", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "p", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "o", mask, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
ret = evas_object_key_grab(d.bg, "h", 0, 0, EINA_TRUE);
if (!ret)
{
fprintf(stdout, "Something went wrong with key grabs.\n");
printf("Something went wrong with key grabs.\n");
goto c_end;
}
}
@ -248,7 +248,7 @@ c_end:
if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
{
fprintf(stdout, "Deleting canvas event callbacks\n");
printf("Deleting canvas event callbacks\n");
evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
_render_flush_cb, NULL);
evas_event_callback_del_full(
@ -259,7 +259,7 @@ c_end:
if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */
{
fprintf(stdout, "Freezing input for 3 seconds\n");
printf("Freezing input for 3 seconds\n");
evas_event_freeze(evas);
d.freeze_timer = ecore_timer_add(3, _thaw_cb, NULL);
return;
@ -270,7 +270,7 @@ c_end:
{
Eina_Bool precise = evas_object_precise_is_inside_get(d.img);
fprintf(stdout, "Toggling precise point collision detection %s on"
printf("Toggling precise point collision detection %s on"
" Enlightenment logo\n", precise ? "off" : "on");
evas_object_precise_is_inside_set(d.img, !precise);
@ -283,7 +283,7 @@ c_end:
* rectangle to the middle
* of the canvas */
{
fprintf(stdout, "Toggling obscured rectangle on canvas\n");
printf("Toggling obscured rectangle on canvas\n");
if (!d.obscured)
{
int w, h;
@ -309,7 +309,7 @@ c_end:
EINA_LIST_FOREACH(updates, l, rect)
{
fprintf(stdout, "Rectangle (%d, %d, %d, %d) on canvas got a"
printf("Rectangle (%d, %d, %d, %d) on canvas got a"
" rendering update.\n", rect->x, rect->y,
rect->w,
rect->h);

View File

@ -114,20 +114,20 @@ _print_rect_stats(Evas_Object *rect)
double x, y;
evas_object_size_hint_align_get(rect, &x, &y);
fprintf(stdout, "\talign hints: h(%f), v(%f)\n", x, y);
printf("\talign hints: h(%f), v(%f)\n", x, y);
efl_gfx_size_hint_combined_min_get(rect, &w, &h);
fprintf(stdout, "\tmin. size hints: h(%d), v(%d)\n", w, h);
printf("\tmin. size hints: h(%d), v(%d)\n", w, h);
evas_object_size_hint_max_get(rect, &w, &h);
fprintf(stdout, "\tmax. size hints: h(%d), v(%d)\n", w, h);
printf("\tmax. size hints: h(%d), v(%d)\n", w, h);
evas_object_size_hint_padding_get(rect, &l, &r, &t, &b);
fprintf(stdout, "\tpadding hints: l(%d), r(%d), t(%d), b(%d)\n",
printf("\tpadding hints: l(%d), r(%d), t(%d), b(%d)\n",
l, r, t, b);
evas_object_size_hint_weight_get(rect, &x, &y);
fprintf(stdout, "\tweight hints: h(%f), v(%f)\n", x, y);
printf("\tweight hints: h(%f), v(%f)\n", x, y);
}
/* use the following commands to interact with this example - 'h' is
@ -159,17 +159,17 @@ _on_keydown(void *data EINA_UNUSED,
}
else if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, commands);
printf(commands);
return;
}
else if (strcmp(ev->key, "s") == 0) /* get aspect status of the
* rectangles WRT size
* hints */
{
fprintf(stdout, "Top rectangle:\n");
printf("Top rectangle:\n");
_print_rect_stats(d.t_rect);
fprintf(stdout, "\nBottom rectangle:\n");
printf("\nBottom rectangle:\n");
_print_rect_stats(d.b_rect);
return;
@ -189,7 +189,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_align_set(
rect, r_data->align_ptr->x, r_data->align_ptr->y);
fprintf(stdout, "Changing align hints for %s rect. to (%f, %f)\n",
printf("Changing align hints for %s rect. to (%f, %f)\n",
name, r_data->align_ptr->x, r_data->align_ptr->y);
return;
}
@ -206,7 +206,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_min_set(
rect, r_data->min_ptr->w, r_data->min_ptr->h);
fprintf(stdout, "Changing min. size hints for %s rect. to (%d, %d)\n",
printf("Changing min. size hints for %s rect. to (%d, %d)\n",
name, r_data->min_ptr->w, r_data->min_ptr->h);
return;
}
@ -223,7 +223,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_max_set(
rect, r_data->max_ptr->w, r_data->max_ptr->h);
fprintf(stdout, "Changing max. size hints for %s rect. to (%d, %d)\n",
printf("Changing max. size hints for %s rect. to (%d, %d)\n",
name, r_data->max_ptr->w, r_data->max_ptr->h);
return;
}
@ -241,7 +241,7 @@ _on_keydown(void *data EINA_UNUSED,
rect, r_data->padding_ptr->l, r_data->padding_ptr->r,
r_data->padding_ptr->t, r_data->padding_ptr->b);
fprintf(stdout, "Changing padding size hints for %s rect."
printf("Changing padding size hints for %s rect."
" to (%d, %d, %d, %d)\n",
name, r_data->padding_ptr->l, r_data->padding_ptr->r,
r_data->padding_ptr->t, r_data->padding_ptr->b);
@ -263,7 +263,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_size_hint_weight_set(
rect, r_data->weight_ptr->x, r_data->weight_ptr->y);
fprintf(stdout, "Changing weight hints for %s rect. to (%f, %f)\n",
printf("Changing weight hints for %s rect. to (%f, %f)\n",
name, r_data->weight_ptr->x, r_data->weight_ptr->y);
return;
}
@ -364,7 +364,7 @@ main(void)
_canvas_resize_cb(d.ee);
fprintf(stdout, commands);
printf(commands);
ecore_main_loop_begin();
ecore_evas_shutdown();
return 0;

View File

@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_smooth_scale_set(d.border, !smooth_scale);
fprintf(stdout, "Image's border is now %s smooth scaling\n",
printf("Image's border is now %s smooth scaling\n",
smooth_scale ? "without" : "with");
return;
@ -127,7 +127,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_border_set(d.border, l, r, t, b);
fprintf(stdout, "Image's border thickness is now %d\n", l);
printf("Image's border thickness is now %d\n", l);
return;
}
@ -141,7 +141,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_border_scale_set(d.border, scale);
fprintf(stdout, "Image's border scaling factor is now %f\n", scale);
printf("Image's border scaling factor is now %f\n", scale);
return;
}
@ -156,7 +156,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_border_center_fill_set(d.border, fill);
fprintf(stdout, "Image's border center region aspect is now \"%s\"\n",
printf("Image's border center region aspect is now \"%s\"\n",
_border_fill_mode_to_str(fill));
return;
@ -168,7 +168,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_alpha_set(d.img1, !alpha);
fprintf(stdout, "Image's alpha channel is now %s\n",
printf("Image's alpha channel is now %s\n",
alpha ? "off" : "on");
return;
@ -180,7 +180,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_filled_set(d.img1, !filled);
fprintf(stdout, "Image's x filled property is now %s\n",
printf("Image's x filled property is now %s\n",
filled ? "off" : "on");
return;
@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED,
x = (x + 20) % (WIDTH / 2);
evas_object_image_fill_set(d.img1, x, y, w, h);
fprintf(stdout, "Image's x fill coordinate changed to %d\n", x);
printf("Image's x fill coordinate changed to %d\n", x);
return;
}
@ -207,7 +207,7 @@ _on_keydown(void *data EINA_UNUSED,
y = (y + 20) % (HEIGHT / 2);
evas_object_image_fill_set(d.img1, x, y, w, h);
fprintf(stdout, "Image's y fill coordinate changed to %d\n", y);
printf("Image's y fill coordinate changed to %d\n", y);
return;
}
@ -222,7 +222,7 @@ _on_keydown(void *data EINA_UNUSED,
else w = (WIDTH / 4);
evas_object_image_fill_set(d.img1, x, y, w, h);
fprintf(stdout, "Image's w fill size changed to %d\n", w);
printf("Image's w fill size changed to %d\n", w);
return;
}
@ -237,7 +237,7 @@ _on_keydown(void *data EINA_UNUSED,
else h = (HEIGHT / 4);
evas_object_image_fill_set(d.img1, x, y, w, h);
fprintf(stdout, "Image's h fill size changed to %d\n", h);
printf("Image's h fill size changed to %d\n", h);
return;
}
@ -248,7 +248,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_fill_get(d.img1, &x, &y, &w, &h);
fprintf(stdout, "Image has fill properties set to: %d, %d, %d, %d\n",
printf("Image has fill properties set to: %d, %d, %d, %d\n",
x, y, w, h);
return;
@ -292,7 +292,7 @@ main(void)
}
else
{
fprintf(stdout,
printf(
"loaded image '%s' with succes! error string is \"%s\"\n",
valid_path, evas_load_error_str(err));

View File

@ -133,7 +133,7 @@ _on_preloaded(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
fprintf(stdout, "Image has been pre-loaded!\n");
printf("Image has been pre-loaded!\n");
}
static void
@ -171,7 +171,7 @@ _on_keydown(void *data EINA_UNUSED,
{
int stride = evas_object_image_stride_get(d.noise_img);
fprintf(stdout, "Image has row stride value of %d, which accounts"
printf("Image has row stride value of %d, which accounts"
" for %d pixels\n", stride, stride / 4);
return;
@ -187,7 +187,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_image_source_set(d.proxy_img, source);
fprintf(stdout, "Proxy image's source changed\n");
printf("Proxy image's source changed\n");
return;
}
@ -198,7 +198,7 @@ _on_keydown(void *data EINA_UNUSED,
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
file_path, quality_str);
else
fprintf(stdout, "Image saved to '%s' (flags '%s'), check it out with "
printf("Image saved to '%s' (flags '%s'), check it out with "
"an image viewer\n", file_path, quality_str);
return;
@ -286,7 +286,7 @@ main(void)
evas_object_move(d.noise_img, (WIDTH * 5) / 8, HEIGHT / 8);
evas_object_resize(d.noise_img, WIDTH / 4, HEIGHT / 4);
evas_object_show(d.noise_img);
fprintf(stdout, "Creating noise image with size %d, %d\n",
printf("Creating noise image with size %d, %d\n",
WIDTH / 4, HEIGHT / 4);
d.text_obj = evas_object_textblock_add(d.evas);

View File

@ -89,7 +89,7 @@ _on_keydown(void *data EINA_UNUSED,
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
file_path, quality_str);
else
fprintf(stdout, "Image saved to '%s' (flags '%s'), check it out with "
printf("Image saved to '%s' (flags '%s'), check it out with "
"an image viewer\n", file_path, quality_str);
return;
@ -100,7 +100,7 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Coord w, h;
evas_object_image_size_get(d.img, &w, &h);
fprintf(stdout, "Image has size set to: w=%d, h=%d\n", w, h);
printf("Image has size set to: w=%d, h=%d\n", w, h);
return;
}
@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
if (key_val >= 0 && key_val <= 7)
{
evas_object_image_orient_set(d.img, key_val);
fprintf(stdout, "Set %i and got %i\n", key_val,
printf("Set %i and got %i\n", key_val,
evas_object_image_orient_get(d.img));
return;
@ -152,7 +152,7 @@ main(void)
}
else
{
fprintf(stdout,
printf(
"loaded image '%s' with succes! error string is \"%s\"\n",
img_path, evas_load_error_str(err));

View File

@ -90,7 +90,7 @@ _on_keydown(void *data EINA_UNUSED,
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
file_path, quality_str);
else
fprintf(stdout, "Image saved to '%s' (flags '%s'), check it out with "
printf("Image saved to '%s' (flags '%s'), check it out with "
"an image viewer\n", file_path, quality_str);
return;
@ -101,7 +101,7 @@ _on_keydown(void *data EINA_UNUSED,
Evas_Coord w, h;
evas_object_image_size_get(d.img, &w, &h);
fprintf(stdout, "Image has size set to: w=%d, h=%d\n", w, h);
printf("Image has size set to: w=%d, h=%d\n", w, h);
return;
}
@ -170,7 +170,7 @@ main(void)
}
else
{
fprintf(stdout,
printf(
"loaded image '%s' with succes! error string is \"%s\"\n",
img_path, evas_load_error_str(err));

View File

@ -36,7 +36,7 @@ _canvas_focus_in_cb(void *data EINA_UNUSED, const Efl_Event *event)
seat = efl_input_device_get(ev);
focused = efl_input_focus_object_get(ev);
fprintf(stdout, "Object %s was focused by seat %s\n",
printf("Object %s was focused by seat %s\n",
evas_object_name_get(focused),
efl_input_device_name_get(seat));
}
@ -50,7 +50,7 @@ _hold_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Hold %s at object %s from seat %s\n",
printf("Hold %s at object %s from seat %s\n",
efl_input_hold_get(ev) ? "on" : "off",
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
@ -65,7 +65,7 @@ _focus_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_get(ev);
fprintf(stdout, "Focus %s at object %s from seat %s\n",
printf("Focus %s at object %s from seat %s\n",
event->desc == EFL_EVENT_FOCUS_IN ? "in" : "out",
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
@ -80,7 +80,7 @@ _pointer_in_out_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Pointer %s at object %s from seat %s\n",
printf("Pointer %s at object %s from seat %s\n",
event->desc == EFL_EVENT_POINTER_IN ? "in" : "out",
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
@ -111,7 +111,7 @@ _pointer_down_cb(void *data EINA_UNUSED, const Efl_Event *event)
efl_canvas_object_seat_focus_add(event->object, seat);
}
fprintf(stdout, "%s at object %s from seat %s\n", buf,
printf("%s at object %s from seat %s\n", buf,
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
}
@ -125,7 +125,7 @@ _pointer_up_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Pointer button %i up at object %s from seat %s\n",
printf("Pointer button %i up at object %s from seat %s\n",
efl_input_pointer_button_get(ev),
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
@ -140,7 +140,7 @@ _pointer_move_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Pointer moved to %1.f,%1.f at object %s from seat %s\n",
printf("Pointer moved to %1.f,%1.f at object %s from seat %s\n",
efl_input_pointer_value_get(ev, EFL_INPUT_VALUE_X),
efl_input_pointer_value_get(ev, EFL_INPUT_VALUE_Y),
evas_object_name_get(event->object),
@ -156,7 +156,7 @@ _pointer_wheel_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Wheel: '%i,%i' on object %s from seat %s\n",
printf("Wheel: '%i,%i' on object %s from seat %s\n",
efl_input_pointer_wheel_direction_get(ev),
efl_input_pointer_wheel_delta_get(ev),
evas_object_name_get(event->object),
@ -174,13 +174,13 @@ _key_down_cb(void *data EINA_UNUSED, const Efl_Event *event)
mods = evas_key_modifier_get(evas_object_evas_get(event->object));
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Key down: '%s' on object %s from seat %s\n",
printf("Key down: '%s' on object %s from seat %s\n",
efl_input_key_name_get(ev),
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
if (evas_seat_key_modifier_is_set(mods, "Control", seat))
fprintf(stdout, "Ctrl is pressed by seat %s\n",
printf("Ctrl is pressed by seat %s\n",
efl_input_device_name_get(seat));
}
@ -193,7 +193,7 @@ _key_up_cb(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
seat = efl_input_device_seat_get(efl_input_device_get(ev));
fprintf(stdout, "Key up: '%s' on object %s from seat %s\n",
printf("Key up: '%s' on object %s from seat %s\n",
efl_input_key_name_get(ev),
evas_object_name_get(event->object),
efl_input_device_name_get(seat));
@ -207,7 +207,7 @@ _dev_added_or_removed(void *data EINA_UNUSED, const Efl_Event *event)
if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
return;
fprintf(stdout, "The seat '%s' - description: '%s' was '%s'\n",
printf("The seat '%s' - description: '%s' was '%s'\n",
efl_input_device_name_get(dev),
efl_input_device_description_get(dev),
event->desc == EFL_CANVAS_EVENT_DEVICE_ADDED ? "added" : "removed");
@ -280,7 +280,7 @@ main(void)
EINA_LIST_FOREACH(devices, l, dev)
{
if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
fprintf(stdout, "The seat '%s' - description: '%s' was 'added'\n",
printf("The seat '%s' - description: '%s' was 'added'\n",
efl_input_device_name_get(dev),
efl_input_device_description_get(dev));
}

View File

@ -72,7 +72,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, "%s", commands);
printf("%s", commands);
return;
}
@ -90,7 +90,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_color_argb_premul(alpha, &r, &g, &b);
efl_gfx_color_set(d.clipper, r, g, b, alpha);
fprintf(stdout, "Changing clipper's opacity: %d%%\n",
printf("Changing clipper's opacity: %d%%\n",
(int)((alpha / 255.0) * 100));
return;
}
@ -100,19 +100,19 @@ _on_keydown(void *data EINA_UNUSED,
{
int alpha, r, g, b;
fprintf(stdout, "Changing clipper's color to");
printf("Changing clipper's color to");
efl_gfx_color_get(d.clipper, &r, &g, &b, &alpha);
evas_color_argb_unpremul(alpha, &r, &g, &b);
if (g > 0)
{
fprintf(stdout, "red\n");
printf("red\n");
g = b = 0;
}
else
{
fprintf(stdout, "white\n");
printf("white\n");
g = b = 255;
}
@ -123,19 +123,19 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */
{
fprintf(stdout, "Toggling clipping ");
printf("Toggling clipping ");
Evas_Object *clip = NULL;
clip = efl_canvas_object_clip_get(d.img);
if (clip == d.clipper)
{
efl_canvas_object_clip_set(d.img, NULL);
fprintf(stdout, "off\n");
printf("off\n");
}
else
{
efl_canvas_object_clip_set(d.img, d.clipper);
fprintf(stdout, "on\n");
printf("on\n");
}
return;
}
@ -147,7 +147,7 @@ _on_keydown(void *data EINA_UNUSED,
* if you pass parameter to "set" by value. */
visibility = efl_gfx_visible_get(d.clipper);
efl_gfx_visible_set(d.clipper, !visibility);
fprintf(stdout, "Clipper is now %s\n", visibility ? "hidden" : "visible");
printf("Clipper is now %s\n", visibility ? "hidden" : "visible");
return;
}
}
@ -209,7 +209,7 @@ main(void)
efl_gfx_position_set(d.img, 0, 0);
efl_gfx_size_set(d.img, WIDTH, HEIGHT);
efl_gfx_visible_set(d.img, EINA_TRUE);
fprintf(stdout, "Image object added, class name is: %s\n",
printf("Image object added, class name is: %s\n",
efl_class_name_get(d.img));
}
@ -241,7 +241,7 @@ main(void)
efl_canvas_object_clip_set(d.img, d.clipper);
fprintf(stdout, "%s", commands);
printf("%s", commands);
ecore_main_loop_begin();

View File

@ -58,7 +58,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, "commands are:\n"
printf("commands are:\n"
"\to - change clipper's opacity\n"
"\tr - toggle clipper's color between red and white\n"
"\tc - toggle clipper's clipping function\n"
@ -80,7 +80,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_color_argb_premul(alpha, &r, &g, &b);
evas_object_color_set(d.clipper, r, g, b, alpha);
fprintf(stdout, "Changing clipper's opacity: %d%%\n",
printf("Changing clipper's opacity: %d%%\n",
(int)((alpha / 255.0) * 100));
return;
}
@ -90,19 +90,19 @@ _on_keydown(void *data EINA_UNUSED,
{
int alpha, r, g, b;
fprintf(stdout, "Changing clipper's color to");
printf("Changing clipper's color to");
evas_object_color_get(d.clipper, &r, &g, &b, &alpha);
evas_color_argb_unpremul(alpha, &r, &g, &b);
if (g > 0)
{
fprintf(stdout, "red\n");
printf("red\n");
g = b = 0;
}
else
{
fprintf(stdout, "white\n");
printf("white\n");
g = b = 255;
}
@ -113,34 +113,34 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */
{
fprintf(stdout, "Toggling clipping ");
printf("Toggling clipping ");
if (evas_object_clip_get(d.img) == d.clipper)
{
evas_object_clip_unset(d.img);
fprintf(stdout, "off\n");
printf("off\n");
}
else
{
evas_object_clip_set(d.img, d.clipper);
fprintf(stdout, "on\n");
printf("on\n");
}
return;
}
if (strcmp(ev->key, "v") == 0) /* toggle clipper's visibility */
{
fprintf(stdout, "Clipper is now ");
printf("Clipper is now ");
if (evas_object_visible_get(d.clipper))
{
evas_object_hide(d.clipper);
fprintf(stdout, "hidden\n");
printf("hidden\n");
}
else
{
evas_object_show(d.clipper);
fprintf(stdout, "visible\n");
printf("visible\n");
}
return;
}
@ -190,7 +190,7 @@ main(void)
evas_object_resize(d.img, WIDTH, HEIGHT);
evas_object_show(d.img);
fprintf(stdout, "Image object added, type is: %s\n",
printf("Image object added, type is: %s\n",
evas_object_type_get(d.img));
}

View File

@ -499,7 +499,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, commands);
printf(commands);
return;
}
@ -519,7 +519,7 @@ _on_keydown(void *data EINA_UNUSED,
memset(d.rects, 0, sizeof(d.rects));
fprintf(stdout, "Deleting all members of the smart object.\n");
printf("Deleting all members of the smart object.\n");
return;
}
@ -535,9 +535,9 @@ _on_keydown(void *data EINA_UNUSED,
prev = evas_smart_example_set_left(d.smt, rect);
d.rects[0] = rect;
fprintf(stdout, "Setting smart object's left spot with a new"
printf("Setting smart object's left spot with a new"
" rectangle.\n");
fprintf(stdout, "Checking its new smart object parent: %s\n",
printf("Checking its new smart object parent: %s\n",
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
"Failure!");
if (prev)
@ -545,7 +545,7 @@ _on_keydown(void *data EINA_UNUSED,
int r, g, b;
evas_object_color_get(prev, &r, &g, &b, NULL);
fprintf(stdout, "Deleting previous left child,"
printf("Deleting previous left child,"
" which had colors (%d, %d, %d)\n", r, g, b);
evas_object_del(prev);
}
@ -564,9 +564,9 @@ _on_keydown(void *data EINA_UNUSED,
prev = evas_smart_example_set_right(d.smt, rect);
d.rects[1] = rect;
fprintf(stdout, "Setting smart object's right spot with a new"
printf("Setting smart object's right spot with a new"
" rectangle.\n");
fprintf(stdout, "Checking its new smart object parent: %s\n",
printf("Checking its new smart object parent: %s\n",
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
"Failure!");
if (prev)
@ -574,7 +574,7 @@ _on_keydown(void *data EINA_UNUSED,
int r, g, b;
evas_object_color_get(prev, &r, &g, &b, NULL);
fprintf(stdout, "Deleting previous right child,"
printf("Deleting previous right child,"
" which had colors (%d, %d, %d)\n", r, g, b);
evas_object_del(prev);
}
@ -666,7 +666,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
fprintf(stdout, "Number of child members on our example smart"
printf("Number of child members on our example smart"
" object changed to %llu\n", (unsigned long long)(uintptr_t)event_info);
}
@ -716,11 +716,11 @@ main(void)
evas_object_show(d.smt);
ret = evas_object_smart_type_check(d.smt, _evas_smart_example_type);
fprintf(stdout, "Adding smart object of type \"%s\" to the canvas: %s.\n",
printf("Adding smart object of type \"%s\" to the canvas: %s.\n",
_evas_smart_example_type, ret ? "success" : "failure");
d.clipper = evas_object_smart_clipped_clipper_get(d.smt);
fprintf(stdout, "Checking if clipped smart object's clipper is a "
printf("Checking if clipped smart object's clipper is a "
"\"static\" one: %s\n", evas_object_static_clip_get(
d.clipper) ? "yes" : "no");
@ -733,7 +733,7 @@ main(void)
for (; *descriptions; descriptions++)
{
fprintf(stdout, "We've found a smart callback on the smart object!"
printf("We've found a smart callback on the smart object!"
"\n\tname: %s\n\ttype: %s\n", (*descriptions)->name,
(*descriptions)->type);
@ -759,19 +759,19 @@ main(void)
{
char *data;
fprintf(stdout, "We've found a smart interface on the smart object!"
printf("We've found a smart interface on the smart object!"
"\n\tname: %s\n", iface->base.name);
fprintf(stdout, "Setting its interface data...\n");
printf("Setting its interface data...\n");
data = evas_object_smart_interface_data_get
(d.smt, (Evas_Smart_Interface *)iface);
memcpy(data, iface1_data, sizeof(iface1_data));
fprintf(stdout, "Calling an interface's function...\n");
printf("Calling an interface's function...\n");
iface->example_func(d.smt);
}
fprintf(stdout, commands);
printf(commands);
ecore_main_loop_begin();
ecore_evas_free(d.ee);

View File

@ -471,7 +471,7 @@ _on_keydown(void *data EINA_UNUSED,
memset(d.rects, 0, sizeof(d.rects));
fprintf(stdout, "Deleting all members of the smart object.\n");
printf("Deleting all members of the smart object.\n");
return;
}
@ -487,9 +487,9 @@ _on_keydown(void *data EINA_UNUSED,
prev = evas_smart_example_set_left(d.smt, rect);
d.rects[0] = rect;
fprintf(stdout, "Setting smart object's left spot with a new"
printf("Setting smart object's left spot with a new"
" rectangle.\n");
fprintf(stdout, "Checking its new smart object parent: %s\n",
printf("Checking its new smart object parent: %s\n",
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
"Failure!");
if (prev)
@ -497,7 +497,7 @@ _on_keydown(void *data EINA_UNUSED,
int r, g, b;
evas_object_color_get(prev, &r, &g, &b, NULL);
fprintf(stdout, "Deleting previous left child,"
printf("Deleting previous left child,"
" which had colors (%d, %d, %d)\n", r, g, b);
evas_object_del(prev);
}
@ -516,9 +516,9 @@ _on_keydown(void *data EINA_UNUSED,
prev = evas_smart_example_set_right(d.smt, rect);
d.rects[1] = rect;
fprintf(stdout, "Setting smart object's right spot with a new"
printf("Setting smart object's right spot with a new"
" rectangle.\n");
fprintf(stdout, "Checking its new smart object parent: %s\n",
printf("Checking its new smart object parent: %s\n",
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
"Failure!");
if (prev)
@ -526,7 +526,7 @@ _on_keydown(void *data EINA_UNUSED,
int r, g, b;
evas_object_color_get(prev, &r, &g, &b, NULL);
fprintf(stdout, "Deleting previous right child,"
printf("Deleting previous right child,"
" which had colors (%d, %d, %d)\n", r, g, b);
evas_object_del(prev);
}
@ -638,7 +638,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
fprintf(stdout, "Number of child members on our example smart"
printf("Number of child members on our example smart"
" object changed to %llu\n", (unsigned long long)(uintptr_t)event_info);
}
@ -679,11 +679,11 @@ main(void)
evas_object_show(d.smt);
ret = evas_object_smart_type_check(d.smt, _evas_smart_example_type);
fprintf(stdout, "Adding smart object of type \"%s\" to the canvas: %s.\n",
printf("Adding smart object of type \"%s\" to the canvas: %s.\n",
_evas_smart_example_type, ret ? "success" : "failure");
d.clipper = evas_object_smart_clipped_clipper_get(d.smt);
fprintf(stdout, "Checking if clipped smart object's clipper is a "
printf("Checking if clipped smart object's clipper is a "
"\"static\" one: %s\n", evas_object_static_clip_get(
d.clipper) ? "yes" : "no");
@ -696,7 +696,7 @@ main(void)
for (; *descriptions; descriptions++)
{
fprintf(stdout, "We've found a smart callback on the smart object!"
printf("We've found a smart callback on the smart object!"
"\n\tname: %s\n\ttype: %s\n", (*descriptions)->name,
(*descriptions)->type);

View File

@ -66,7 +66,7 @@ _on_mouse_down(void *data EINA_UNUSED,
Evas_Object *o,
void *einfo EINA_UNUSED)
{
fprintf(stdout, "Mouse down on rectangle %s!\n", _name_get(o));
printf("Mouse down on rectangle %s!\n", _name_get(o));
}
/* here just to keep our example's window size and background image's
@ -93,7 +93,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, commands);
printf(commands);
return;
}
@ -103,24 +103,24 @@ _on_keydown(void *data EINA_UNUSED,
{
Evas_Object *rect;
fprintf(stdout, "Order of stacking, from top to bottom, is: ");
printf("Order of stacking, from top to bottom, is: ");
rect = evas_object_top_get(evas);
fprintf(stdout, "%s", _name_get(rect));
printf("%s", _name_get(rect));
rect = evas_object_below_get(rect);
while (rect)
{
fprintf(stdout, ", %s", _name_get(rect));
printf(", %s", _name_get(rect));
rect = evas_object_below_get(rect);
}
fprintf(stdout, ".\n");
printf(".\n");
fprintf(stdout, "Current target rectangle is %s\n",
printf("Current target rectangle is %s\n",
_name_get(d.rects[d.cur_rect]));
fprintf(stdout, "Background rectangle's layer is %d\n",
printf("Background rectangle's layer is %d\n",
evas_object_layer_get(d.bg));
return;
@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED,
d.cur_layer = (d.cur_layer + 1) % 3;
evas_object_layer_set(d.bg, d.layers[d.cur_layer]);
fprintf(stdout, "Changing background rectangle's layer to %d\n",
printf("Changing background rectangle's layer to %d\n",
d.layers[d.cur_layer]);
return;
}
@ -140,7 +140,7 @@ _on_keydown(void *data EINA_UNUSED,
{
d.cur_rect = (d.cur_rect + 1) % 3;
fprintf(stdout, "Changing target rectangle to the %s one\n",
printf("Changing target rectangle to the %s one\n",
_name_get(d.rects[d.cur_rect]));
return;
}
@ -151,11 +151,11 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_raise(d.rects[d.cur_rect]);
fprintf(stdout, "%s rectangle was re-stacked to the top if its layer\n",
printf("%s rectangle was re-stacked to the top if its layer\n",
name);
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
fprintf(stdout, "Below of %s rect is %s\n", name,
printf("Below of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
return;
}
@ -166,12 +166,12 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_lower(d.rects[d.cur_rect]);
fprintf(stdout,
printf(
"%s rectangle was re-stacked to the bottom if its layer\n",
name);
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
fprintf(stdout, "Below of %s rect is %s\n", name,
printf("Below of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
return;
}
@ -182,7 +182,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_pass_events_set(d.rects[d.cur_rect], !pass);
fprintf(stdout, "%s rectangle is now set to%s pass (ignore) events\n",
printf("%s rectangle is now set to%s pass (ignore) events\n",
name, pass ? " NOT" : "");
return;
@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_repeat_events_set(d.rects[d.cur_rect], !repeat);
fprintf(stdout, "%s rectangle is now set to%s repeat events\n",
printf("%s rectangle is now set to%s repeat events\n",
name, repeat ? " NOT" : "");
return;
@ -210,14 +210,14 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_stack_above(d.rects[d.cur_rect], neighbour);
fprintf(stdout, "%s rectangle was re-stacked one level above\n", name);
printf("%s rectangle was re-stacked one level above\n", name);
neighbour = evas_object_above_get(d.rects[d.cur_rect]);
fprintf(stdout, "Above of %s rect is %s\n", name,
printf("Above of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
fprintf(stdout, "Below of %s rect is %s\n", name,
printf("Below of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
return;
}
@ -232,15 +232,15 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_stack_below(d.rects[d.cur_rect], neighbour);
fprintf(stdout, "%s rectangle was re-stacked one level below\n", name);
printf("%s rectangle was re-stacked one level below\n", name);
neighbour = evas_object_above_get(d.rects[d.cur_rect]);
fprintf(stdout, "Above of %s rect is %s\n", name,
printf("Above of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
fprintf(stdout, "Below of %s rect is %s\n", name,
printf("Below of %s rect is %s\n", name,
neighbour ? _name_get(neighbour) : "no object");
return;
}
@ -322,7 +322,7 @@ main(void)
evas_object_event_callback_add(
d.rects[0], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL);
fprintf(stdout, commands);
printf(commands);
ecore_main_loop_begin();
ecore_evas_shutdown();

View File

@ -125,7 +125,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, commands);
printf(commands);
return;
}
@ -134,7 +134,7 @@ _on_keydown(void *data EINA_UNUSED,
(d.t_data.obs_ptr)++;
POINTER_CYCLE(d.t_data.obs_ptr, d.t_data.obs);
fprintf(stdout, "Now controlling obstacle: %p\n", *d.t_data.obs_ptr);
printf("Now controlling obstacle: %p\n", *d.t_data.obs_ptr);
return;
}
@ -146,7 +146,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_hide(obj);
else
evas_object_show(obj);
fprintf(stdout, "Show/hide toggle for obstacle %p\n",
printf("Show/hide toggle for obstacle %p\n",
*d.t_data.obs_ptr);
evas_object_textblock_obstacles_update(d.text);
@ -164,7 +164,7 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_textblock_obstacles_update(d.text);
fprintf(stdout, "Changing obstacle size to: %d,%d\n", *d.t_data.obs_size_ptr, *d.t_data.obs_size_ptr);
printf("Changing obstacle size to: %d,%d\n", *d.t_data.obs_size_ptr, *d.t_data.obs_size_ptr);
return;
}
@ -177,12 +177,12 @@ _on_keydown(void *data EINA_UNUSED,
evas_object_move(*d.t_data.obs_ptr, x, y);
evas_object_textblock_obstacles_update(d.text);
fprintf(stdout, "Changing obstacles position\n");
printf("Changing obstacles position\n");
evas_object_move(*d.t_data.obs_ptr, x, y);
evas_object_geometry_get(d.t_data.obs[0], &rx, &ry, NULL, NULL);
evas_object_geometry_get(d.t_data.obs[1], &gx, &gy, NULL, NULL);
fprintf(stdout, "Obstacle #1 (red) : [%d,%d]\n", rx, ry);
fprintf(stdout, "Obstacle #2 (green): [%d,%d]\n", gx, gy);
printf("Obstacle #1 (red) : [%d,%d]\n", rx, ry);
printf("Obstacle #2 (green): [%d,%d]\n", gx, gy);
return;
}
@ -190,7 +190,7 @@ _on_keydown(void *data EINA_UNUSED,
{
(d.t_data.wrap_ptr)++;
POINTER_CYCLE(d.t_data.wrap_ptr, d.t_data.wrap);
fprintf(stdout, "Changing wrap mode to: %s\n", *d.t_data.wrap_ptr);
printf("Changing wrap mode to: %s\n", *d.t_data.wrap_ptr);
_style_set(*d.t_data.wrap_ptr);
evas_object_textblock_obstacles_update(d.text);
@ -293,7 +293,7 @@ main(void)
evas_object_show(d.t_data.obs[0]);
evas_object_show(d.t_data.obs[1]);
fprintf(stdout, commands);
printf(commands);
ecore_main_loop_begin();
evas_textblock_style_free(d.st);

View File

@ -47,7 +47,7 @@ _on_keydown(void *data EINA_UNUSED,
if (strcmp(ev->key, "h") == 0) /* print help */
{
fprintf(stdout, "%s", commands);
printf("%s", commands);
return;
}
@ -55,7 +55,7 @@ _on_keydown(void *data EINA_UNUSED,
{
ecore_evas_alpha_set(d.ee, EINA_TRUE);
fprintf(stdout, "turn on alpha\n");
printf("turn on alpha\n");
return;
}
@ -63,7 +63,7 @@ _on_keydown(void *data EINA_UNUSED,
{
ecore_evas_alpha_set(d.ee, EINA_FALSE);
fprintf(stdout, "turn off alpha\n");
printf("turn off alpha\n");
return;
}
}