summaryrefslogtreecommitdiff
path: root/src/examples/elementary/gengrid_example.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-04-20 15:33:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-20 17:44:57 +0900
commitbcf3ce84289ad4c91e89d6f5c3c9167af60036f3 (patch)
treed22ab98afccd2f5570aec74fd7957547c2011025 /src/examples/elementary/gengrid_example.c
parenta71b770bbc848bff2231bac1e75bf2a85885aca5 (diff)
examples: Fix most trivial warnings
This fixes all warnings for "make examples" for: -Wunused-parameter -Wshadow -Wformat-security -Wenum-conversion Some remaining warnings include: -Wdeprecated-delcarations
Diffstat (limited to 'src/examples/elementary/gengrid_example.c')
-rw-r--r--src/examples/elementary/gengrid_example.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/examples/elementary/gengrid_example.c b/src/examples/elementary/gengrid_example.c
index a1c6439c3c..410b6daef7 100644
--- a/src/examples/elementary/gengrid_example.c
+++ b/src/examples/elementary/gengrid_example.c
@@ -36,7 +36,7 @@ static Evas_Object *before_bt, *after_bt;
36static void 36static void
37_horizontal_grid(void *data, 37_horizontal_grid(void *data,
38 Evas_Object *obj, 38 Evas_Object *obj,
39 void *event_info) 39 void *event_info EINA_UNUSED)
40{ 40{
41 Evas_Object *grid = data; 41 Evas_Object *grid = data;
42 42
@@ -47,7 +47,7 @@ _horizontal_grid(void *data,
47static void 47static void
48_always_select_change(void *data, 48_always_select_change(void *data,
49 Evas_Object *obj, 49 Evas_Object *obj,
50 void *event_info) 50 void *event_info EINA_UNUSED)
51{ 51{
52 Evas_Object *grid = data; 52 Evas_Object *grid = data;
53 Eina_Bool always = elm_check_state_get(obj); 53 Eina_Bool always = elm_check_state_get(obj);
@@ -65,7 +65,7 @@ _always_select_change(void *data,
65static void 65static void
66_bouncing_change(void *data, 66_bouncing_change(void *data,
67 Evas_Object *obj, 67 Evas_Object *obj,
68 void *event_info) 68 void *event_info EINA_UNUSED)
69{ 69{
70 Evas_Object *grid = data; 70 Evas_Object *grid = data;
71 Eina_Bool bounce = elm_check_state_get(obj); 71 Eina_Bool bounce = elm_check_state_get(obj);
@@ -80,7 +80,7 @@ _bouncing_change(void *data,
80static void 80static void
81_multi_change(void *data, 81_multi_change(void *data,
82 Evas_Object *obj, 82 Evas_Object *obj,
83 void *event_info) 83 void *event_info EINA_UNUSED)
84{ 84{
85 Evas_Object *grid = data; 85 Evas_Object *grid = data;
86 Eina_Bool multi = elm_check_state_get(obj); 86 Eina_Bool multi = elm_check_state_get(obj);
@@ -106,7 +106,7 @@ _multi_change(void *data,
106static void 106static void
107_no_sel_change(void *data, 107_no_sel_change(void *data,
108 Evas_Object *obj, 108 Evas_Object *obj,
109 void *event_info) 109 void *event_info EINA_UNUSED)
110{ 110{
111 Evas_Object *grid = data; 111 Evas_Object *grid = data;
112 Eina_Bool no_sel = elm_check_state_get(obj); 112 Eina_Bool no_sel = elm_check_state_get(obj);
@@ -123,7 +123,7 @@ _no_sel_change(void *data,
123/* item selection callback */ 123/* item selection callback */
124static void 124static void
125_grid_sel(void *data, 125_grid_sel(void *data,
126 Evas_Object *obj, 126 Evas_Object *obj EINA_UNUSED,
127 void *event_info) 127 void *event_info)
128{ 128{
129 unsigned int x, y; 129 unsigned int x, y;
@@ -150,8 +150,8 @@ _item_new(void)
150/* "insert before" callback */ 150/* "insert before" callback */
151static void 151static void
152_before_bt_clicked(void *data, 152_before_bt_clicked(void *data,
153 Evas_Object *obj, 153 Evas_Object *obj EINA_UNUSED,
154 void *event_info) 154 void *event_info EINA_UNUSED)
155{ 155{
156 Example_Item *it; 156 Example_Item *it;
157 Evas_Object *grid = data; 157 Evas_Object *grid = data;
@@ -168,8 +168,8 @@ _before_bt_clicked(void *data,
168/* "insert after" callback */ 168/* "insert after" callback */
169static void 169static void
170_after_bt_clicked(void *data, 170_after_bt_clicked(void *data,
171 Evas_Object *obj, 171 Evas_Object *obj EINA_UNUSED,
172 void *event_info) 172 void *event_info EINA_UNUSED)
173{ 173{
174 Example_Item *it; 174 Example_Item *it;
175 Evas_Object *grid = data; 175 Evas_Object *grid = data;
@@ -186,8 +186,8 @@ _after_bt_clicked(void *data,
186/* prepend an item */ 186/* prepend an item */
187static void 187static void
188_prepend_bt_clicked(void *data, 188_prepend_bt_clicked(void *data,
189 Evas_Object *obj, 189 Evas_Object *obj EINA_UNUSED,
190 void *event_info) 190 void *event_info EINA_UNUSED)
191{ 191{
192 Example_Item *it; 192 Example_Item *it;
193 Evas_Object *grid = data; 193 Evas_Object *grid = data;
@@ -199,8 +199,8 @@ _prepend_bt_clicked(void *data,
199/* append an item */ 199/* append an item */
200static void 200static void
201_append_bt_clicked(void *data, 201_append_bt_clicked(void *data,
202 Evas_Object *obj, 202 Evas_Object *obj EINA_UNUSED,
203 void *event_info) 203 void *event_info EINA_UNUSED)
204{ 204{
205 Evas_Object *grid = data; 205 Evas_Object *grid = data;
206 Example_Item *it = _item_new(); 206 Example_Item *it = _item_new();
@@ -211,8 +211,8 @@ _append_bt_clicked(void *data,
211/* delete items */ 211/* delete items */
212static void 212static void
213_clear_cb(void *data, 213_clear_cb(void *data,
214 Evas_Object *obj, 214 Evas_Object *obj EINA_UNUSED,
215 void *event_info) 215 void *event_info EINA_UNUSED)
216{ 216{
217 elm_gengrid_clear(data); 217 elm_gengrid_clear(data);
218 218
@@ -222,8 +222,8 @@ _clear_cb(void *data,
222/* bring in 1st item */ 222/* bring in 1st item */
223static void 223static void
224_bring_1st_clicked(void *data, 224_bring_1st_clicked(void *data,
225 Evas_Object *obj, 225 Evas_Object *obj EINA_UNUSED,
226 void *event_info) 226 void *event_info EINA_UNUSED)
227{ 227{
228 Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data); 228 Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data);
229 229
@@ -235,8 +235,8 @@ _bring_1st_clicked(void *data,
235/* show last item */ 235/* show last item */
236static void 236static void
237_show_last_clicked(void *data, 237_show_last_clicked(void *data,
238 Evas_Object *obj, 238 Evas_Object *obj EINA_UNUSED,
239 void *event_info) 239 void *event_info EINA_UNUSED)
240{ 240{
241 Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data); 241 Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data);
242 242
@@ -248,8 +248,8 @@ _show_last_clicked(void *data,
248/* disable selected item */ 248/* disable selected item */
249static void 249static void
250_toggle_disabled_cb(void *data, 250_toggle_disabled_cb(void *data,
251 Evas_Object *obj, 251 Evas_Object *obj EINA_UNUSED,
252 void *event_info) 252 void *event_info EINA_UNUSED)
253{ 253{
254 Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data); 254 Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data);
255 255
@@ -263,7 +263,7 @@ _toggle_disabled_cb(void *data,
263static void 263static void
264_size_changed(void *data, 264_size_changed(void *data,
265 Evas_Object *obj, 265 Evas_Object *obj,
266 void *event_info) 266 void *event_info EINA_UNUSED)
267{ 267{
268 Evas_Object *grid = data; 268 Evas_Object *grid = data;
269 int size = elm_spinner_value_get(obj); 269 int size = elm_spinner_value_get(obj);
@@ -273,8 +273,8 @@ _size_changed(void *data,
273 273
274/* item double click callback */ 274/* item double click callback */
275static void 275static void
276_double_click(void *data, 276_double_click(void *data EINA_UNUSED,
277 Evas_Object *obj, 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 fprintf(stdout, "Double click on item with handle %p\n", event_info);
@@ -282,8 +282,8 @@ _double_click(void *data,
282 282
283/* item long press callback */ 283/* item long press callback */
284static void 284static void
285_long_pressed(void *data, 285_long_pressed(void *data EINA_UNUSED,
286 Evas_Object *obj, 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 fprintf(stdout, "Long press on item with handle %p\n", event_info);
@@ -292,8 +292,8 @@ _long_pressed(void *data,
292/* label fetching callback */ 292/* label fetching callback */
293static char * 293static char *
294_grid_label_get(void *data, 294_grid_label_get(void *data,
295 Evas_Object *obj, 295 Evas_Object *obj EINA_UNUSED,
296 const char *part) 296 const char *part EINA_UNUSED)
297{ 297{
298 const Example_Item *it = data; 298 const Example_Item *it = data;
299 char buf[256]; 299 char buf[256];
@@ -338,9 +338,9 @@ _grid_content_get(void *data,
338 338
339/* state fetching callback */ 339/* state fetching callback */
340static Eina_Bool 340static Eina_Bool
341_grid_state_get(void *data, 341_grid_state_get(void *data EINA_UNUSED,
342 Evas_Object *obj, 342 Evas_Object *obj EINA_UNUSED,
343 const char *part) 343 const char *part EINA_UNUSED)
344{ 344{
345 return EINA_FALSE; 345 return EINA_FALSE;
346} 346}
@@ -348,7 +348,7 @@ _grid_state_get(void *data,
348/* deletion callback */ 348/* deletion callback */
349static void 349static void
350_grid_del(void *data, 350_grid_del(void *data,
351 Evas_Object *obj) 351 Evas_Object *obj EINA_UNUSED)
352{ 352{
353 Example_Item *it = data; 353 Example_Item *it = data;
354 354
@@ -358,9 +358,9 @@ _grid_del(void *data,
358 358
359/* scrolling animation stopped callback */ 359/* scrolling animation stopped callback */
360static void 360static void
361_grid_scroll_stopped_cb(void *data, 361_grid_scroll_stopped_cb(void *data EINA_UNUSED,
362 Evas_Object *obj, 362 Evas_Object *obj,
363 void *event_info) 363 void *event_info 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);
@@ -372,7 +372,7 @@ _grid_scroll_stopped_cb(void *data,
372static void 372static void
373_h_align_change_cb(void *data, 373_h_align_change_cb(void *data,
374 Evas_Object *obj, 374 Evas_Object *obj,
375 void *event_info) 375 void *event_info EINA_UNUSED)
376{ 376{
377 double v_align; 377 double v_align;
378 double val = elm_slider_value_get(obj); 378 double val = elm_slider_value_get(obj);
@@ -386,7 +386,7 @@ _h_align_change_cb(void *data,
386static void 386static void
387_v_align_change_cb(void *data, 387_v_align_change_cb(void *data,
388 Evas_Object *obj, 388 Evas_Object *obj,
389 void *event_info) 389 void *event_info EINA_UNUSED)
390{ 390{
391 double h_align; 391 double h_align;
392 double val = elm_slider_value_get(obj); 392 double val = elm_slider_value_get(obj);
@@ -401,7 +401,7 @@ _v_align_change_cb(void *data,
401static void 401static void
402_page_change_cb(void *data, 402_page_change_cb(void *data,
403 Evas_Object *obj, 403 Evas_Object *obj,
404 void *event_info) 404 void *event_info EINA_UNUSED)
405{ 405{
406 double val = elm_slider_value_get(obj); 406 double val = elm_slider_value_get(obj);
407 407
@@ -411,8 +411,8 @@ _page_change_cb(void *data,
411} 411}
412 412
413EAPI_MAIN int 413EAPI_MAIN int
414elm_main(int argc, 414elm_main(int argc EINA_UNUSED,
415 char **argv) 415 char **argv EINA_UNUSED)
416{ 416{
417 Evas_Object *win, *grid, *bx, *hbx_1, *hbx_2, *hbx_3, *bt, *ck, *sl, *sp; 417 Evas_Object *win, *grid, *bx, *hbx_1, *hbx_2, *hbx_3, *bt, *ck, *sl, *sp;
418 Eina_Bool bounce; 418 Eina_Bool bounce;