summaryrefslogtreecommitdiff
path: root/src/examples/elementary/gengrid_example.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2017-05-08 15:14:27 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-05-08 15:14:29 -0700
commit77e19c71947365fd56ebfff11c288e7911649569 (patch)
treed6bb6fce5ad61d9434744aa1b0f0c40a7fd17cad /src/examples/elementary/gengrid_example.c
parent94509a3d86b470a54bac9a5974ea5a92847dd061 (diff)
examples: use printf instead of fprintf(stdout, ...)
Summary: Applies same change as e8355c93 for evas, to the remaining examples. This uses the shell command-line: src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 \ | uniq | xargs sed -i "s/fprintf(stdout/printf(/" Note that use of the "fprintf(stdout" construct can generate warnings when -Wformat-security is enabled, if the fprintf statement has no format arguments, so in addition to the stylistic simplification this also helps quell those spurious warnings. Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4836 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/examples/elementary/gengrid_example.c')
-rw-r--r--src/examples/elementary/gengrid_example.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/examples/elementary/gengrid_example.c b/src/examples/elementary/gengrid_example.c
index 410b6daef7..9c786b8d91 100644
--- a/src/examples/elementary/gengrid_example.c
+++ b/src/examples/elementary/gengrid_example.c
@@ -57,7 +57,7 @@ _always_select_change(void *data,
57 else 57 else
58 elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT); 58 elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT);
59 59
60 fprintf(stdout, "\"Always select\" mode for gengrid items is now %s\n", 60 printf("\"Always select\" mode for gengrid items is now %s\n",
61 always ? "on" : "off"); 61 always ? "on" : "off");
62} 62}
63 63
@@ -72,7 +72,7 @@ _bouncing_change(void *data,
72 72
73 elm_scroller_bounce_set(grid, bounce, bounce); 73 elm_scroller_bounce_set(grid, bounce, bounce);
74 74
75 fprintf(stdout, "Bouncing effect for gengrid is now %s\n", 75 printf("Bouncing effect for gengrid is now %s\n",
76 bounce ? "on" : "off"); 76 bounce ? "on" : "off");
77} 77}
78 78
@@ -87,7 +87,7 @@ _multi_change(void *data,
87 87
88 elm_gengrid_multi_select_set(grid, multi); 88 elm_gengrid_multi_select_set(grid, multi);
89 89
90 fprintf(stdout, "Multi-selection for gengrid is now %s\n", 90 printf("Multi-selection for gengrid is now %s\n",
91 multi ? "on" : "off"); 91 multi ? "on" : "off");
92 92
93 elm_object_disabled_set(before_bt, multi); 93 elm_object_disabled_set(before_bt, multi);
@@ -116,7 +116,7 @@ _no_sel_change(void *data,
116 else 116 else
117 elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT); 117 elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT);
118 118
119 fprintf(stdout, "Selection for gengrid items is now %s\n", 119 printf("Selection for gengrid items is now %s\n",
120 no_sel ? "disabled" : "enabled"); 120 no_sel ? "disabled" : "enabled");
121} 121}
122 122
@@ -131,7 +131,7 @@ _grid_sel(void *data,
131 131
132 elm_gengrid_item_pos_get(event_info, &x, &y); 132 elm_gengrid_item_pos_get(event_info, &x, &y);
133 133
134 fprintf(stdout, "Item [%p], with data [%p], path %s, at position (%d, %d)," 134 printf("Item [%p], with data [%p], path %s, at position (%d, %d),"
135 " has been selected\n", event_info, data, it->path, x, y); 135 " has been selected\n", event_info, data, it->path, x, y);
136} 136}
137 137
@@ -216,7 +216,7 @@ _clear_cb(void *data,
216{ 216{
217 elm_gengrid_clear(data); 217 elm_gengrid_clear(data);
218 218
219 fprintf(stdout, "Clearing the grid!\n"); 219 printf("Clearing the grid!\n");
220} 220}
221 221
222/* bring in 1st item */ 222/* bring in 1st item */
@@ -277,7 +277,7 @@ _double_click(void *data EINA_UNUSED,
277 Evas_Object *obj EINA_UNUSED, 277 Evas_Object *obj EINA_UNUSED,
278 void *event_info) 278 void *event_info)
279{ 279{
280 fprintf(stdout, "Double click on item with handle %p\n", event_info); 280 printf("Double click on item with handle %p\n", event_info);
281} 281}
282 282
283/* item long press callback */ 283/* item long press callback */
@@ -286,7 +286,7 @@ _long_pressed(void *data EINA_UNUSED,
286 Evas_Object *obj EINA_UNUSED, 286 Evas_Object *obj EINA_UNUSED,
287 void *event_info) 287 void *event_info)
288{ 288{
289 fprintf(stdout, "Long press on item with handle %p\n", event_info); 289 printf("Long press on item with handle %p\n", event_info);
290} 290}
291 291
292/* label fetching callback */ 292/* label fetching callback */
@@ -364,7 +364,7 @@ _grid_scroll_stopped_cb(void *data EINA_UNUSED,
364{ 364{
365 int h_pagenumber = 0, v_pagenumber = 0; 365 int h_pagenumber = 0, v_pagenumber = 0;
366 elm_scroller_current_page_get(obj, &h_pagenumber, &v_pagenumber); 366 elm_scroller_current_page_get(obj, &h_pagenumber, &v_pagenumber);
367 fprintf(stdout, "Grid current horiz page is %d, vert page is %d\n", 367 printf("Grid current horiz page is %d, vert page is %d\n",
368 h_pagenumber, v_pagenumber); 368 h_pagenumber, v_pagenumber);
369} 369}
370 370
@@ -379,7 +379,7 @@ _h_align_change_cb(void *data,
379 379
380 elm_gengrid_align_get(data, NULL, &v_align); 380 elm_gengrid_align_get(data, NULL, &v_align);
381 381
382 fprintf(stdout, "Setting horizontal alignment to %f\n", val); 382 printf("Setting horizontal alignment to %f\n", val);
383 elm_gengrid_align_set(data, val, v_align); 383 elm_gengrid_align_set(data, val, v_align);
384} 384}
385 385
@@ -393,7 +393,7 @@ _v_align_change_cb(void *data,
393 393
394 elm_gengrid_align_get(data, &h_align, NULL); 394 elm_gengrid_align_get(data, &h_align, NULL);
395 395
396 fprintf(stdout, "Setting vertical alignment to %f\n", val); 396 printf("Setting vertical alignment to %f\n", val);
397 elm_gengrid_align_set(data, h_align, val); 397 elm_gengrid_align_set(data, h_align, val);
398} 398}
399 399
@@ -407,7 +407,7 @@ _page_change_cb(void *data,
407 407
408 elm_scroller_page_relative_set(data, val, val); 408 elm_scroller_page_relative_set(data, val, val);
409 409
410 fprintf(stdout, "Setting grid page's relative size to %f\n", val); 410 printf("Setting grid page's relative size to %f\n", val);
411} 411}
412 412
413EAPI_MAIN int 413EAPI_MAIN int