forked from enlightenment/efl
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:
parent
30cd3f8615
commit
a71b770bbc
|
@ -193,7 +193,7 @@ _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
|
||||||
_recalculate_position();
|
_recalculate_position();
|
||||||
}
|
}
|
||||||
else
|
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
|
static void
|
||||||
_on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event_info)
|
_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;
|
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
|
||||||
if (flag)
|
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));
|
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;
|
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
|
||||||
if (flag)
|
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));
|
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 (!precision) precision = 30;
|
||||||
if (!texture) texture = (char *)image_path;
|
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);
|
row, col, precision, texture);
|
||||||
|
|
||||||
ecore_evas = ecore_evas_new("opengl_x11", 10, 10, WIDTH, HEIGHT, NULL);
|
ecore_evas = ecore_evas_new("opengl_x11", 10, 10, WIDTH, HEIGHT, NULL);
|
||||||
|
|
|
@ -65,12 +65,12 @@ Evas_Canvas3D_Frustum_Mode key = EVAS_CANVAS3D_FRUSTUM_MODE_AABB;
|
||||||
static void
|
static void
|
||||||
_show_help()
|
_show_help()
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Press 'w'/'s' key to move far frustum plane from/to the camera\n");
|
printf("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");
|
printf("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");
|
printf("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");
|
printf("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");
|
printf("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 'z', 'x', 'c', 'Z', 'X' and 'C' keys to change scaling constants of mesh\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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_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);
|
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))
|
else if (!strcmp("2", ev->key))
|
||||||
{
|
{
|
||||||
evas_canvas3d_node_position_set(scene->camera_node, 300.0, 300.0, 300.0);
|
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);
|
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))
|
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);
|
_redraw_bounding_object(data);
|
||||||
frustum = evas_canvas3d_camera_node_visible_get(scene->camera, scene->camera_node, scene->mesh_node_model, key);
|
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
|
static void
|
||||||
|
|
|
@ -130,17 +130,17 @@ _cb_collision(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
static void
|
static void
|
||||||
_show_help()
|
_show_help()
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Press 'w'/'s' key to move up/down object\n");
|
printf("Press 'w'/'s' key to move up/down object\n");
|
||||||
fprintf(stdout, "Press 'a'/'d' key to move left/right object\n");
|
printf("Press 'a'/'d' key to move left/right object\n");
|
||||||
fprintf(stdout, "Press 'q'/'e' key to move near/far object\n");
|
printf("Press 'q'/'e' key to move near/far object\n");
|
||||||
fprintf(stdout, "Cude and model can be moved.\n");
|
printf("Cude and model can be moved.\n");
|
||||||
fprintf(stdout, "Cube detects intersection with model, sphere, cone\n");
|
printf("Cube detects intersection with model, sphere, cone\n");
|
||||||
fprintf(stdout, "Model detects intersection with sphere\n");
|
printf("Model detects intersection with sphere\n");
|
||||||
fprintf(stdout, "Press '1'/'2' key to change kind of node - billboard/normal model\n");
|
printf("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");
|
printf("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");
|
printf("Press '5'/'6' key to enable/disable shadow effect\n");
|
||||||
fprintf(stdout, "Press Up/Down key to change position of camera\n");
|
printf("Press Up/Down key to change position of camera\n");
|
||||||
fprintf(stdout, "Press 'i' key to return initial view of scene\n");
|
printf("Press 'i' key to return initial view of scene\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
|
@ -92,7 +92,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
if (evas_key_modifier_is_set(mods, "Shift") &&
|
if (evas_key_modifier_is_set(mods, "Shift") &&
|
||||||
strcmp(ev->key, "h") == 0) /* print help */
|
strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "commands are:\n"
|
printf("commands are:\n"
|
||||||
"\tc - cycle aspect control on object\n"
|
"\tc - cycle aspect control on object\n"
|
||||||
"\th - change horizontal aspect component\n"
|
"\th - change horizontal aspect component\n"
|
||||||
"\tv - change vertical 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);
|
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",
|
" and vertical compontent %d\n",
|
||||||
_get_aspect_name(aspect), w, h);
|
_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);
|
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));
|
_get_aspect_name(aspect));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -143,7 +143,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_size_hint_aspect_set(d.rect, aspect, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_size_hint_aspect_set(d.rect, aspect, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "%s", commands);
|
printf("%s", commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ list_free:
|
||||||
|
|
||||||
evas_object_box_align_set(d.box, h, v);
|
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);
|
" on the box\n", h, v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ list_free:
|
||||||
|
|
||||||
evas_object_box_padding_set(d.box, h, v);
|
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);
|
" on the box\n", h, v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal");
|
printf("Applying '%s' layout on the box\n", "horizontal");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n", "vertical");
|
printf("Applying '%s' layout on the box\n", "vertical");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ list_free:
|
||||||
d.box, evas_object_box_layout_homogeneous_horizontal, NULL,
|
d.box, evas_object_box_layout_homogeneous_horizontal, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n",
|
printf("Applying '%s' layout on the box\n",
|
||||||
"horizontal homogeneous");
|
"horizontal homogeneous");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n",
|
printf("Applying '%s' layout on the box\n",
|
||||||
"vertical homogeneous");
|
"vertical homogeneous");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ list_free:
|
||||||
d.box, evas_object_box_layout_homogeneous_max_size_horizontal,
|
d.box, evas_object_box_layout_homogeneous_max_size_horizontal,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n",
|
printf("Applying '%s' layout on the box\n",
|
||||||
"horizontal maximum size homogeneous");
|
"horizontal maximum size homogeneous");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ list_free:
|
||||||
d.box, evas_object_box_layout_homogeneous_max_size_vertical,
|
d.box, evas_object_box_layout_homogeneous_max_size_vertical,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n",
|
printf("Applying '%s' layout on the box\n",
|
||||||
"vertical maximum size homogeneous");
|
"vertical maximum size homogeneous");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n", "horizontal flow");
|
printf("Applying '%s' layout on the box\n", "horizontal flow");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n", "vertical flow");
|
printf("Applying '%s' layout on the box\n", "vertical flow");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ list_free:
|
||||||
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);
|
||||||
|
|
||||||
fprintf(stdout, "Applying '%s' layout on the box\n", "stack");
|
printf("Applying '%s' layout on the box\n", "stack");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ list_free:
|
||||||
{
|
{
|
||||||
evas_object_box_layout_set(d.box, _custom_layout, NULL, NULL);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ main(void)
|
||||||
evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE);
|
evas_object_image_border_center_fill_set(d.border, EVAS_BORDER_FILL_NONE);
|
||||||
evas_object_show(d.border);
|
evas_object_show(d.border);
|
||||||
|
|
||||||
fprintf(stdout, "%s", commands);
|
printf("%s", commands);
|
||||||
|
|
||||||
_canvas_resize_cb(d.ee);
|
_canvas_resize_cb(d.ee);
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
|
@ -66,13 +66,13 @@ _object_focus_in_cb(void *data EINA_UNUSED,
|
||||||
Evas *e,
|
Evas *e,
|
||||||
void *event_info)
|
void *event_info)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "An object got focused: %s\n",
|
printf("An object got focused: %s\n",
|
||||||
evas_object_name_get(event_info));
|
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)));
|
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.");
|
"OK!" : "Oops, something is bad.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ _render_flush_cb(void *data EINA_UNUSED,
|
||||||
Evas *e EINA_UNUSED,
|
Evas *e EINA_UNUSED,
|
||||||
void *event_info 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 */
|
/* put some action in the canvas */
|
||||||
|
@ -106,7 +106,7 @@ _resize_cb(void *data EINA_UNUSED)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_thaw_cb(void *data EINA_UNUSED)
|
_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_freeze_get(d.canvas));
|
||||||
evas_event_thaw(d.canvas);
|
evas_event_thaw(d.canvas);
|
||||||
return EINA_FALSE; /* do not re-issue the timer */
|
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,
|
Evas_Object *o EINA_UNUSED,
|
||||||
void *einfo 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
|
static void
|
||||||
|
@ -128,7 +128,7 @@ _on_mouse_out(void *data EINA_UNUSED,
|
||||||
Evas_Object *o EINA_UNUSED,
|
Evas_Object *o EINA_UNUSED,
|
||||||
void *einfo 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 */
|
} /* mouse exits the object's area */
|
||||||
|
|
||||||
/* examine the keys pressed */
|
/* examine the keys pressed */
|
||||||
|
@ -141,8 +141,8 @@ _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->key);
|
printf("We've got key input: %s\n", ev->key);
|
||||||
fprintf(stdout, "It actually came from %s\n", d.focus ?
|
printf("It actually came from %s\n", d.focus ?
|
||||||
"focus" : "key grab");
|
"focus" : "key grab");
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
|
@ -155,13 +155,13 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
if (d.resize_timer != NULL)
|
if (d.resize_timer != NULL)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Stopping animation timer\n");
|
printf("Stopping animation timer\n");
|
||||||
ecore_timer_del(d.resize_timer);
|
ecore_timer_del(d.resize_timer);
|
||||||
d.resize_timer = NULL;
|
d.resize_timer = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Re-issuing animation timer\n");
|
printf("Re-issuing animation timer\n");
|
||||||
d.resize_timer = ecore_timer_add(2, _resize_cb, NULL);
|
d.resize_timer = ecore_timer_add(2, _resize_cb, NULL);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -174,56 +174,56 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
Evas_Modifier_Mask mask =
|
Evas_Modifier_Mask mask =
|
||||||
evas_key_modifier_mask_get(d.canvas, "Control");
|
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");
|
"key grabs" : "focus");
|
||||||
|
|
||||||
if (d.focus)
|
if (d.focus)
|
||||||
{
|
{
|
||||||
evas_object_focus_set(d.bg, EINA_FALSE);
|
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) ?
|
evas_focus_get(d.canvas) ?
|
||||||
"still valid! Something went wrong." : "none.");
|
"still valid! Something went wrong." : "none.");
|
||||||
|
|
||||||
ret = evas_object_key_grab(d.bg, "a", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "a", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "c", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "c", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "d", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "d", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "f", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "f", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "p", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "p", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "o", mask, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "o", mask, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
ret = evas_object_key_grab(d.bg, "h", 0, 0, EINA_TRUE);
|
ret = evas_object_key_grab(d.bg, "h", 0, 0, EINA_TRUE);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Something went wrong with key grabs.\n");
|
printf("Something went wrong with key grabs.\n");
|
||||||
goto c_end;
|
goto c_end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ c_end:
|
||||||
|
|
||||||
if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
|
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,
|
evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
|
||||||
_render_flush_cb, NULL);
|
_render_flush_cb, NULL);
|
||||||
evas_event_callback_del_full(
|
evas_event_callback_del_full(
|
||||||
|
@ -259,7 +259,7 @@ c_end:
|
||||||
|
|
||||||
if (strcmp(ev->key, "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");
|
printf("Freezing input for 3 seconds\n");
|
||||||
evas_event_freeze(evas);
|
evas_event_freeze(evas);
|
||||||
d.freeze_timer = ecore_timer_add(3, _thaw_cb, NULL);
|
d.freeze_timer = ecore_timer_add(3, _thaw_cb, NULL);
|
||||||
return;
|
return;
|
||||||
|
@ -270,7 +270,7 @@ c_end:
|
||||||
{
|
{
|
||||||
Eina_Bool precise = evas_object_precise_is_inside_get(d.img);
|
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");
|
" Enlightenment logo\n", precise ? "off" : "on");
|
||||||
evas_object_precise_is_inside_set(d.img, !precise);
|
evas_object_precise_is_inside_set(d.img, !precise);
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ c_end:
|
||||||
* rectangle to the middle
|
* rectangle to the middle
|
||||||
* of the canvas */
|
* of the canvas */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Toggling obscured rectangle on canvas\n");
|
printf("Toggling obscured rectangle on canvas\n");
|
||||||
if (!d.obscured)
|
if (!d.obscured)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
|
@ -309,7 +309,7 @@ c_end:
|
||||||
|
|
||||||
EINA_LIST_FOREACH(updates, l, rect)
|
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,
|
" rendering update.\n", rect->x, rect->y,
|
||||||
rect->w,
|
rect->w,
|
||||||
rect->h);
|
rect->h);
|
||||||
|
|
|
@ -114,20 +114,20 @@ _print_rect_stats(Evas_Object *rect)
|
||||||
double x, y;
|
double x, y;
|
||||||
|
|
||||||
evas_object_size_hint_align_get(rect, &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);
|
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);
|
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);
|
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);
|
l, r, t, b);
|
||||||
|
|
||||||
evas_object_size_hint_weight_get(rect, &x, &y);
|
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
|
/* 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 */
|
else if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (strcmp(ev->key, "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 */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Top rectangle:\n");
|
printf("Top rectangle:\n");
|
||||||
_print_rect_stats(d.t_rect);
|
_print_rect_stats(d.t_rect);
|
||||||
|
|
||||||
fprintf(stdout, "\nBottom rectangle:\n");
|
printf("\nBottom rectangle:\n");
|
||||||
_print_rect_stats(d.b_rect);
|
_print_rect_stats(d.b_rect);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -189,7 +189,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_object_size_hint_align_set(
|
evas_object_size_hint_align_set(
|
||||||
rect, r_data->align_ptr->x, r_data->align_ptr->y);
|
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);
|
name, r_data->align_ptr->x, r_data->align_ptr->y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_object_size_hint_min_set(
|
evas_object_size_hint_min_set(
|
||||||
rect, r_data->min_ptr->w, r_data->min_ptr->h);
|
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);
|
name, r_data->min_ptr->w, r_data->min_ptr->h);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_object_size_hint_max_set(
|
evas_object_size_hint_max_set(
|
||||||
rect, r_data->max_ptr->w, r_data->max_ptr->h);
|
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);
|
name, r_data->max_ptr->w, r_data->max_ptr->h);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
rect, r_data->padding_ptr->l, r_data->padding_ptr->r,
|
rect, r_data->padding_ptr->l, r_data->padding_ptr->r,
|
||||||
r_data->padding_ptr->t, r_data->padding_ptr->b);
|
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",
|
" to (%d, %d, %d, %d)\n",
|
||||||
name, r_data->padding_ptr->l, r_data->padding_ptr->r,
|
name, r_data->padding_ptr->l, r_data->padding_ptr->r,
|
||||||
r_data->padding_ptr->t, r_data->padding_ptr->b);
|
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(
|
evas_object_size_hint_weight_set(
|
||||||
rect, r_data->weight_ptr->x, r_data->weight_ptr->y);
|
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);
|
name, r_data->weight_ptr->x, r_data->weight_ptr->y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ main(void)
|
||||||
|
|
||||||
_canvas_resize_cb(d.ee);
|
_canvas_resize_cb(d.ee);
|
||||||
|
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
ecore_evas_shutdown();
|
ecore_evas_shutdown();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_smooth_scale_set(d.border, !smooth_scale);
|
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");
|
smooth_scale ? "without" : "with");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -127,7 +127,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_border_set(d.border, l, r, t, b);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_border_scale_set(d.border, scale);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_border_center_fill_set(d.border, fill);
|
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));
|
_border_fill_mode_to_str(fill));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -168,7 +168,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_alpha_set(d.img1, !alpha);
|
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");
|
alpha ? "off" : "on");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -180,7 +180,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_filled_set(d.img1, !filled);
|
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");
|
filled ? "off" : "on");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
x = (x + 20) % (WIDTH / 2);
|
x = (x + 20) % (WIDTH / 2);
|
||||||
evas_object_image_fill_set(d.img1, x, y, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
y = (y + 20) % (HEIGHT / 2);
|
y = (y + 20) % (HEIGHT / 2);
|
||||||
evas_object_image_fill_set(d.img1, x, y, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
else w = (WIDTH / 4);
|
else w = (WIDTH / 4);
|
||||||
evas_object_image_fill_set(d.img1, x, y, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
else h = (HEIGHT / 4);
|
else h = (HEIGHT / 4);
|
||||||
evas_object_image_fill_set(d.img1, x, y, w, h);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_fill_get(d.img1, &x, &y, &w, &h);
|
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);
|
x, y, w, h);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -292,7 +292,7 @@ main(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout,
|
printf(
|
||||||
"loaded image '%s' with succes! error string is \"%s\"\n",
|
"loaded image '%s' with succes! error string is \"%s\"\n",
|
||||||
valid_path, evas_load_error_str(err));
|
valid_path, evas_load_error_str(err));
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ _on_preloaded(void *data EINA_UNUSED,
|
||||||
Evas_Object *obj EINA_UNUSED,
|
Evas_Object *obj EINA_UNUSED,
|
||||||
void *event_info EINA_UNUSED)
|
void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Image has been pre-loaded!\n");
|
printf("Image has been pre-loaded!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -171,7 +171,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
int stride = evas_object_image_stride_get(d.noise_img);
|
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);
|
" for %d pixels\n", stride, stride / 4);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -187,7 +187,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_image_source_set(d.proxy_img, source);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
||||||
file_path, quality_str);
|
file_path, quality_str);
|
||||||
else
|
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);
|
"an image viewer\n", file_path, quality_str);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -286,7 +286,7 @@ main(void)
|
||||||
evas_object_move(d.noise_img, (WIDTH * 5) / 8, HEIGHT / 8);
|
evas_object_move(d.noise_img, (WIDTH * 5) / 8, HEIGHT / 8);
|
||||||
evas_object_resize(d.noise_img, WIDTH / 4, HEIGHT / 4);
|
evas_object_resize(d.noise_img, WIDTH / 4, HEIGHT / 4);
|
||||||
evas_object_show(d.noise_img);
|
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);
|
WIDTH / 4, HEIGHT / 4);
|
||||||
|
|
||||||
d.text_obj = evas_object_textblock_add(d.evas);
|
d.text_obj = evas_object_textblock_add(d.evas);
|
||||||
|
|
|
@ -89,7 +89,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
||||||
file_path, quality_str);
|
file_path, quality_str);
|
||||||
else
|
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);
|
"an image viewer\n", file_path, quality_str);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -100,7 +100,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
|
||||||
evas_object_image_size_get(d.img, &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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
if (key_val >= 0 && key_val <= 7)
|
if (key_val >= 0 && key_val <= 7)
|
||||||
{
|
{
|
||||||
evas_object_image_orient_set(d.img, key_val);
|
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));
|
evas_object_image_orient_get(d.img));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -152,7 +152,7 @@ main(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout,
|
printf(
|
||||||
"loaded image '%s' with succes! error string is \"%s\"\n",
|
"loaded image '%s' with succes! error string is \"%s\"\n",
|
||||||
img_path, evas_load_error_str(err));
|
img_path, evas_load_error_str(err));
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
fprintf(stderr, "Cannot save image to '%s' (flags '%s')\n",
|
||||||
file_path, quality_str);
|
file_path, quality_str);
|
||||||
else
|
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);
|
"an image viewer\n", file_path, quality_str);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -101,7 +101,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
|
||||||
evas_object_image_size_get(d.img, &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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ main(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout,
|
printf(
|
||||||
"loaded image '%s' with succes! error string is \"%s\"\n",
|
"loaded image '%s' with succes! error string is \"%s\"\n",
|
||||||
img_path, evas_load_error_str(err));
|
img_path, evas_load_error_str(err));
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ _canvas_focus_in_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
seat = efl_input_device_get(ev);
|
seat = efl_input_device_get(ev);
|
||||||
focused = efl_input_focus_object_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),
|
evas_object_name_get(focused),
|
||||||
efl_input_device_name_get(seat));
|
efl_input_device_name_get(seat));
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ _hold_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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",
|
efl_input_hold_get(ev) ? "on" : "off",
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
efl_input_device_name_get(seat));
|
||||||
|
@ -65,7 +65,7 @@ _focus_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_get(ev);
|
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",
|
event->desc == EFL_EVENT_FOCUS_IN ? "in" : "out",
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
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;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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",
|
event->desc == EFL_EVENT_POINTER_IN ? "in" : "out",
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
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);
|
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),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
efl_input_device_name_get(seat));
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ _pointer_up_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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),
|
efl_input_pointer_button_get(ev),
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
efl_input_device_name_get(seat));
|
||||||
|
@ -140,7 +140,7 @@ _pointer_move_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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_X),
|
||||||
efl_input_pointer_value_get(ev, EFL_INPUT_VALUE_Y),
|
efl_input_pointer_value_get(ev, EFL_INPUT_VALUE_Y),
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
|
@ -156,7 +156,7 @@ _pointer_wheel_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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_direction_get(ev),
|
||||||
efl_input_pointer_wheel_delta_get(ev),
|
efl_input_pointer_wheel_delta_get(ev),
|
||||||
evas_object_name_get(event->object),
|
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));
|
mods = evas_key_modifier_get(evas_object_evas_get(event->object));
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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),
|
efl_input_key_name_get(ev),
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
efl_input_device_name_get(seat));
|
||||||
|
|
||||||
if (evas_seat_key_modifier_is_set(mods, "Control", 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));
|
efl_input_device_name_get(seat));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ _key_up_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||||
ev = event->info;
|
ev = event->info;
|
||||||
seat = efl_input_device_seat_get(efl_input_device_get(ev));
|
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),
|
efl_input_key_name_get(ev),
|
||||||
evas_object_name_get(event->object),
|
evas_object_name_get(event->object),
|
||||||
efl_input_device_name_get(seat));
|
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)
|
if (efl_input_device_type_get(dev) != EFL_INPUT_DEVICE_CLASS_SEAT)
|
||||||
return;
|
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_name_get(dev),
|
||||||
efl_input_device_description_get(dev),
|
efl_input_device_description_get(dev),
|
||||||
event->desc == EFL_CANVAS_EVENT_DEVICE_ADDED ? "added" : "removed");
|
event->desc == EFL_CANVAS_EVENT_DEVICE_ADDED ? "added" : "removed");
|
||||||
|
@ -280,7 +280,7 @@ main(void)
|
||||||
EINA_LIST_FOREACH(devices, l, dev)
|
EINA_LIST_FOREACH(devices, l, dev)
|
||||||
{
|
{
|
||||||
if (efl_input_device_type_get(dev) == EFL_INPUT_DEVICE_CLASS_SEAT)
|
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_name_get(dev),
|
||||||
efl_input_device_description_get(dev));
|
efl_input_device_description_get(dev));
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "%s", commands);
|
printf("%s", commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_color_argb_premul(alpha, &r, &g, &b);
|
evas_color_argb_premul(alpha, &r, &g, &b);
|
||||||
efl_gfx_color_set(d.clipper, r, g, b, alpha);
|
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));
|
(int)((alpha / 255.0) * 100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -100,19 +100,19 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
int alpha, r, g, b;
|
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);
|
efl_gfx_color_get(d.clipper, &r, &g, &b, &alpha);
|
||||||
evas_color_argb_unpremul(alpha, &r, &g, &b);
|
evas_color_argb_unpremul(alpha, &r, &g, &b);
|
||||||
|
|
||||||
if (g > 0)
|
if (g > 0)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "red\n");
|
printf("red\n");
|
||||||
g = b = 0;
|
g = b = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout, "white\n");
|
printf("white\n");
|
||||||
g = b = 255;
|
g = b = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,19 +123,19 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */
|
if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "Toggling clipping ");
|
printf("Toggling clipping ");
|
||||||
|
|
||||||
Evas_Object *clip = NULL;
|
Evas_Object *clip = NULL;
|
||||||
clip = efl_canvas_object_clip_get(d.img);
|
clip = efl_canvas_object_clip_get(d.img);
|
||||||
if (clip == d.clipper)
|
if (clip == d.clipper)
|
||||||
{
|
{
|
||||||
efl_canvas_object_clip_set(d.img, NULL);
|
efl_canvas_object_clip_set(d.img, NULL);
|
||||||
fprintf(stdout, "off\n");
|
printf("off\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
efl_canvas_object_clip_set(d.img, d.clipper);
|
efl_canvas_object_clip_set(d.img, d.clipper);
|
||||||
fprintf(stdout, "on\n");
|
printf("on\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
* if you pass parameter to "set" by value. */
|
* if you pass parameter to "set" by value. */
|
||||||
visibility = efl_gfx_visible_get(d.clipper);
|
visibility = efl_gfx_visible_get(d.clipper);
|
||||||
efl_gfx_visible_set(d.clipper, !visibility);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ main(void)
|
||||||
efl_gfx_position_set(d.img, 0, 0);
|
efl_gfx_position_set(d.img, 0, 0);
|
||||||
efl_gfx_size_set(d.img, WIDTH, HEIGHT);
|
efl_gfx_size_set(d.img, WIDTH, HEIGHT);
|
||||||
efl_gfx_visible_set(d.img, EINA_TRUE);
|
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));
|
efl_class_name_get(d.img));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ main(void)
|
||||||
|
|
||||||
efl_canvas_object_clip_set(d.img, d.clipper);
|
efl_canvas_object_clip_set(d.img, d.clipper);
|
||||||
|
|
||||||
fprintf(stdout, "%s", commands);
|
printf("%s", commands);
|
||||||
|
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "commands are:\n"
|
printf("commands are:\n"
|
||||||
"\to - change clipper's opacity\n"
|
"\to - change clipper's opacity\n"
|
||||||
"\tr - toggle clipper's color between red and white\n"
|
"\tr - toggle clipper's color between red and white\n"
|
||||||
"\tc - toggle clipper's clipping function\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_color_argb_premul(alpha, &r, &g, &b);
|
||||||
evas_object_color_set(d.clipper, r, g, b, alpha);
|
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));
|
(int)((alpha / 255.0) * 100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -90,19 +90,19 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
int alpha, r, g, b;
|
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_object_color_get(d.clipper, &r, &g, &b, &alpha);
|
||||||
evas_color_argb_unpremul(alpha, &r, &g, &b);
|
evas_color_argb_unpremul(alpha, &r, &g, &b);
|
||||||
|
|
||||||
if (g > 0)
|
if (g > 0)
|
||||||
{
|
{
|
||||||
fprintf(stdout, "red\n");
|
printf("red\n");
|
||||||
g = b = 0;
|
g = b = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stdout, "white\n");
|
printf("white\n");
|
||||||
g = b = 255;
|
g = b = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,34 +113,34 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "c") == 0) /* toggle clipper's clipping function */
|
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)
|
if (evas_object_clip_get(d.img) == d.clipper)
|
||||||
{
|
{
|
||||||
evas_object_clip_unset(d.img);
|
evas_object_clip_unset(d.img);
|
||||||
fprintf(stdout, "off\n");
|
printf("off\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
evas_object_clip_set(d.img, d.clipper);
|
evas_object_clip_set(d.img, d.clipper);
|
||||||
fprintf(stdout, "on\n");
|
printf("on\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(ev->key, "v") == 0) /* toggle clipper's visibility */
|
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))
|
if (evas_object_visible_get(d.clipper))
|
||||||
{
|
{
|
||||||
evas_object_hide(d.clipper);
|
evas_object_hide(d.clipper);
|
||||||
fprintf(stdout, "hidden\n");
|
printf("hidden\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
evas_object_show(d.clipper);
|
evas_object_show(d.clipper);
|
||||||
fprintf(stdout, "visible\n");
|
printf("visible\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ main(void)
|
||||||
evas_object_resize(d.img, WIDTH, HEIGHT);
|
evas_object_resize(d.img, WIDTH, HEIGHT);
|
||||||
evas_object_show(d.img);
|
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));
|
evas_object_type_get(d.img));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -499,7 +499,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
memset(d.rects, 0, sizeof(d.rects));
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -535,9 +535,9 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
prev = evas_smart_example_set_left(d.smt, rect);
|
prev = evas_smart_example_set_left(d.smt, rect);
|
||||||
d.rects[0] = 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");
|
" 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!" :
|
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
|
||||||
"Failure!");
|
"Failure!");
|
||||||
if (prev)
|
if (prev)
|
||||||
|
@ -545,7 +545,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
evas_object_color_get(prev, &r, &g, &b, NULL);
|
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);
|
" which had colors (%d, %d, %d)\n", r, g, b);
|
||||||
evas_object_del(prev);
|
evas_object_del(prev);
|
||||||
}
|
}
|
||||||
|
@ -564,9 +564,9 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
prev = evas_smart_example_set_right(d.smt, rect);
|
prev = evas_smart_example_set_right(d.smt, rect);
|
||||||
d.rects[1] = 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");
|
" 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!" :
|
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
|
||||||
"Failure!");
|
"Failure!");
|
||||||
if (prev)
|
if (prev)
|
||||||
|
@ -574,7 +574,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
evas_object_color_get(prev, &r, &g, &b, NULL);
|
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);
|
" which had colors (%d, %d, %d)\n", r, g, b);
|
||||||
evas_object_del(prev);
|
evas_object_del(prev);
|
||||||
}
|
}
|
||||||
|
@ -666,7 +666,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
|
||||||
Evas_Object *obj EINA_UNUSED,
|
Evas_Object *obj EINA_UNUSED,
|
||||||
void *event_info)
|
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);
|
" object changed to %llu\n", (unsigned long long)(uintptr_t)event_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -716,11 +716,11 @@ main(void)
|
||||||
evas_object_show(d.smt);
|
evas_object_show(d.smt);
|
||||||
|
|
||||||
ret = evas_object_smart_type_check(d.smt, _evas_smart_example_type);
|
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");
|
_evas_smart_example_type, ret ? "success" : "failure");
|
||||||
|
|
||||||
d.clipper = evas_object_smart_clipped_clipper_get(d.smt);
|
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(
|
"\"static\" one: %s\n", evas_object_static_clip_get(
|
||||||
d.clipper) ? "yes" : "no");
|
d.clipper) ? "yes" : "no");
|
||||||
|
|
||||||
|
@ -733,7 +733,7 @@ main(void)
|
||||||
|
|
||||||
for (; *descriptions; descriptions++)
|
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,
|
"\n\tname: %s\n\ttype: %s\n", (*descriptions)->name,
|
||||||
(*descriptions)->type);
|
(*descriptions)->type);
|
||||||
|
|
||||||
|
@ -759,19 +759,19 @@ main(void)
|
||||||
{
|
{
|
||||||
char *data;
|
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);
|
"\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
|
data = evas_object_smart_interface_data_get
|
||||||
(d.smt, (Evas_Smart_Interface *)iface);
|
(d.smt, (Evas_Smart_Interface *)iface);
|
||||||
memcpy(data, iface1_data, sizeof(iface1_data));
|
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);
|
iface->example_func(d.smt);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
ecore_evas_free(d.ee);
|
ecore_evas_free(d.ee);
|
||||||
|
|
|
@ -471,7 +471,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
memset(d.rects, 0, sizeof(d.rects));
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -487,9 +487,9 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
prev = evas_smart_example_set_left(d.smt, rect);
|
prev = evas_smart_example_set_left(d.smt, rect);
|
||||||
d.rects[0] = 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");
|
" 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!" :
|
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
|
||||||
"Failure!");
|
"Failure!");
|
||||||
if (prev)
|
if (prev)
|
||||||
|
@ -497,7 +497,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
evas_object_color_get(prev, &r, &g, &b, NULL);
|
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);
|
" which had colors (%d, %d, %d)\n", r, g, b);
|
||||||
evas_object_del(prev);
|
evas_object_del(prev);
|
||||||
}
|
}
|
||||||
|
@ -516,9 +516,9 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
prev = evas_smart_example_set_right(d.smt, rect);
|
prev = evas_smart_example_set_right(d.smt, rect);
|
||||||
d.rects[1] = 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");
|
" 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!" :
|
evas_object_smart_parent_get(rect) == d.smt ? "OK!" :
|
||||||
"Failure!");
|
"Failure!");
|
||||||
if (prev)
|
if (prev)
|
||||||
|
@ -526,7 +526,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
|
|
||||||
evas_object_color_get(prev, &r, &g, &b, NULL);
|
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);
|
" which had colors (%d, %d, %d)\n", r, g, b);
|
||||||
evas_object_del(prev);
|
evas_object_del(prev);
|
||||||
}
|
}
|
||||||
|
@ -638,7 +638,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
|
||||||
Evas_Object *obj EINA_UNUSED,
|
Evas_Object *obj EINA_UNUSED,
|
||||||
void *event_info)
|
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);
|
" object changed to %llu\n", (unsigned long long)(uintptr_t)event_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,11 +679,11 @@ main(void)
|
||||||
evas_object_show(d.smt);
|
evas_object_show(d.smt);
|
||||||
|
|
||||||
ret = evas_object_smart_type_check(d.smt, _evas_smart_example_type);
|
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");
|
_evas_smart_example_type, ret ? "success" : "failure");
|
||||||
|
|
||||||
d.clipper = evas_object_smart_clipped_clipper_get(d.smt);
|
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(
|
"\"static\" one: %s\n", evas_object_static_clip_get(
|
||||||
d.clipper) ? "yes" : "no");
|
d.clipper) ? "yes" : "no");
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ main(void)
|
||||||
|
|
||||||
for (; *descriptions; descriptions++)
|
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,
|
"\n\tname: %s\n\ttype: %s\n", (*descriptions)->name,
|
||||||
(*descriptions)->type);
|
(*descriptions)->type);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ _on_mouse_down(void *data EINA_UNUSED,
|
||||||
Evas_Object *o,
|
Evas_Object *o,
|
||||||
void *einfo EINA_UNUSED)
|
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
|
/* 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 */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,24 +103,24 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
Evas_Object *rect;
|
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);
|
rect = evas_object_top_get(evas);
|
||||||
fprintf(stdout, "%s", _name_get(rect));
|
printf("%s", _name_get(rect));
|
||||||
|
|
||||||
rect = evas_object_below_get(rect);
|
rect = evas_object_below_get(rect);
|
||||||
while (rect)
|
while (rect)
|
||||||
{
|
{
|
||||||
fprintf(stdout, ", %s", _name_get(rect));
|
printf(", %s", _name_get(rect));
|
||||||
rect = evas_object_below_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]));
|
_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));
|
evas_object_layer_get(d.bg));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -131,7 +131,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
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]);
|
||||||
|
|
||||||
fprintf(stdout, "Changing background rectangle's layer to %d\n",
|
printf("Changing background rectangle's layer to %d\n",
|
||||||
d.layers[d.cur_layer]);
|
d.layers[d.cur_layer]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
d.cur_rect = (d.cur_rect + 1) % 3;
|
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]));
|
_name_get(d.rects[d.cur_rect]));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -151,11 +151,11 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_raise(d.rects[d.cur_rect]);
|
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);
|
name);
|
||||||
|
|
||||||
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
|
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");
|
neighbour ? _name_get(neighbour) : "no object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -166,12 +166,12 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_lower(d.rects[d.cur_rect]);
|
evas_object_lower(d.rects[d.cur_rect]);
|
||||||
|
|
||||||
fprintf(stdout,
|
printf(
|
||||||
"%s rectangle was re-stacked to the bottom if its layer\n",
|
"%s rectangle was re-stacked to the bottom if its layer\n",
|
||||||
name);
|
name);
|
||||||
|
|
||||||
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
|
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");
|
neighbour ? _name_get(neighbour) : "no object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_pass_events_set(d.rects[d.cur_rect], !pass);
|
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" : "");
|
name, pass ? " NOT" : "");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -194,7 +194,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_repeat_events_set(d.rects[d.cur_rect], !repeat);
|
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" : "");
|
name, repeat ? " NOT" : "");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -210,14 +210,14 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_stack_above(d.rects[d.cur_rect], neighbour);
|
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]);
|
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 ? _name_get(neighbour) : "no object");
|
||||||
|
|
||||||
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
|
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");
|
neighbour ? _name_get(neighbour) : "no object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -232,15 +232,15 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_stack_below(d.rects[d.cur_rect], neighbour);
|
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]);
|
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 ? _name_get(neighbour) : "no object");
|
||||||
|
|
||||||
neighbour = evas_object_below_get(d.rects[d.cur_rect]);
|
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");
|
neighbour ? _name_get(neighbour) : "no object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ main(void)
|
||||||
evas_object_event_callback_add(
|
evas_object_event_callback_add(
|
||||||
d.rects[0], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL);
|
d.rects[0], EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, NULL);
|
||||||
|
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
ecore_evas_shutdown();
|
ecore_evas_shutdown();
|
||||||
|
|
|
@ -125,7 +125,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
(d.t_data.obs_ptr)++;
|
(d.t_data.obs_ptr)++;
|
||||||
POINTER_CYCLE(d.t_data.obs_ptr, d.t_data.obs);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_object_hide(obj);
|
evas_object_hide(obj);
|
||||||
else
|
else
|
||||||
evas_object_show(obj);
|
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);
|
*d.t_data.obs_ptr);
|
||||||
evas_object_textblock_obstacles_update(d.text);
|
evas_object_textblock_obstacles_update(d.text);
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
evas_object_textblock_obstacles_update(d.text);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -177,12 +177,12 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
evas_object_move(*d.t_data.obs_ptr, x, y);
|
evas_object_move(*d.t_data.obs_ptr, x, y);
|
||||||
evas_object_textblock_obstacles_update(d.text);
|
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_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[0], &rx, &ry, NULL, NULL);
|
||||||
evas_object_geometry_get(d.t_data.obs[1], &gx, &gy, 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);
|
printf("Obstacle #1 (red) : [%d,%d]\n", rx, ry);
|
||||||
fprintf(stdout, "Obstacle #2 (green): [%d,%d]\n", gx, gy);
|
printf("Obstacle #2 (green): [%d,%d]\n", gx, gy);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
(d.t_data.wrap_ptr)++;
|
(d.t_data.wrap_ptr)++;
|
||||||
POINTER_CYCLE(d.t_data.wrap_ptr, d.t_data.wrap);
|
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);
|
_style_set(*d.t_data.wrap_ptr);
|
||||||
evas_object_textblock_obstacles_update(d.text);
|
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[0]);
|
||||||
evas_object_show(d.t_data.obs[1]);
|
evas_object_show(d.t_data.obs[1]);
|
||||||
|
|
||||||
fprintf(stdout, commands);
|
printf(commands);
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
evas_textblock_style_free(d.st);
|
evas_textblock_style_free(d.st);
|
||||||
|
|
|
@ -47,7 +47,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
|
|
||||||
if (strcmp(ev->key, "h") == 0) /* print help */
|
if (strcmp(ev->key, "h") == 0) /* print help */
|
||||||
{
|
{
|
||||||
fprintf(stdout, "%s", commands);
|
printf("%s", commands);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
ecore_evas_alpha_set(d.ee, EINA_TRUE);
|
ecore_evas_alpha_set(d.ee, EINA_TRUE);
|
||||||
|
|
||||||
fprintf(stdout, "turn on alpha\n");
|
printf("turn on alpha\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ _on_keydown(void *data EINA_UNUSED,
|
||||||
{
|
{
|
||||||
ecore_evas_alpha_set(d.ee, EINA_FALSE);
|
ecore_evas_alpha_set(d.ee, EINA_FALSE);
|
||||||
|
|
||||||
fprintf(stdout, "turn off alpha\n");
|
printf("turn off alpha\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue