From 5aee8fadf4b2864e413d7d5d54839fe76af7969c Mon Sep 17 00:00:00 2001 From: seoz Date: Wed, 28 Mar 2012 08:42:20 +0000 Subject: [PATCH] elm examples: I removed __UNUSED__ and config header inclusion. This code is an example for other developers so we don't need that extra macros. But how can I ignore this warning while building elementary? git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69698 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/examples/actionslider_example_01.c | 15 ++--- src/examples/anchorblock_example_01.c | 17 ++---- src/examples/bg_example_01.c | 9 +-- src/examples/bg_example_02.c | 9 +-- src/examples/bg_example_03.c | 15 ++--- src/examples/box_example_02.c | 13 ++--- src/examples/bubble_example_01.c | 9 +-- src/examples/button_example_00.c | 9 +-- src/examples/button_example_01.c | 13 ++--- src/examples/calendar_example_01.c | 7 +-- src/examples/calendar_example_02.c | 7 +-- src/examples/calendar_example_03.c | 7 +-- src/examples/calendar_example_04.c | 7 +-- src/examples/calendar_example_05.c | 9 +-- src/examples/calendar_example_06.c | 9 +-- src/examples/check_example_01.c | 9 +-- src/examples/clock_example.c | 13 ++--- src/examples/colorselector_example_01.c | 13 ++--- src/examples/conformant_example_01.c | 7 +-- src/examples/conformant_example_02.c | 7 +-- src/examples/ctxpopup_example_01.c | 13 ++--- src/examples/datetime_example.c | 13 ++--- src/examples/dayselector_example.c | 15 ++--- src/examples/diskselector_example_01.c | 13 ++--- src/examples/diskselector_example_02.c | 43 ++++++-------- src/examples/efl_thread_1.c | 9 +-- src/examples/efl_thread_2.c | 9 +-- src/examples/efl_thread_3.c | 9 +-- src/examples/efl_thread_4.c | 11 +--- src/examples/efl_thread_5.c | 17 ++---- src/examples/efl_thread_6.c | 13 ++--- src/examples/efl_thread_win32_1.c | 5 -- src/examples/efl_thread_win32_2.c | 5 -- src/examples/efl_thread_win32_3.c | 5 -- src/examples/efl_thread_win32_4.c | 5 -- src/examples/entry_example.c | 35 +++++------ src/examples/fileselector_button_example.c | 33 +++++------ src/examples/fileselector_entry_example.c | 35 +++++------ src/examples/fileselector_example.c | 43 ++++++-------- src/examples/flip_example_01.c | 9 +-- src/examples/flipselector_example.c | 37 +++++------- src/examples/frame_example_01.c | 7 +-- src/examples/general_funcs_example.c | 43 ++++++-------- src/examples/gengrid_example.c | 93 ++++++++++++++---------------- src/examples/genlist_example_01.c | 11 +--- src/examples/genlist_example_02.c | 17 ++---- src/examples/genlist_example_03.c | 11 +--- src/examples/genlist_example_04.c | 41 ++++++------- src/examples/genlist_example_05.c | 35 +++++------ src/examples/glview_example_01.c | 5 -- src/examples/hover_example_01.c | 11 +--- src/examples/hoversel_example_01.c | 15 ++--- src/examples/icon_example_01.c | 9 +-- src/examples/image_example_01.c | 9 +-- src/examples/index_example_01.c | 41 ++++++------- src/examples/index_example_02.c | 27 ++++----- src/examples/inwin_example.c | 15 ++--- src/examples/label_example_01.c | 7 +-- src/examples/layout_example_01.c | 15 ++--- src/examples/layout_example_02.c | 9 +-- src/examples/layout_example_03.c | 13 ++--- src/examples/list_example_01.c | 13 ++--- src/examples/list_example_02.c | 13 ++--- src/examples/list_example_03.c | 49 +++++++--------- src/examples/map_example_01.c | 17 ++---- src/examples/map_example_02.c | 19 +++--- src/examples/map_example_03.c | 23 +++----- src/examples/mapbuf_example.c | 19 +++--- src/examples/menu_example_01.c | 11 +--- src/examples/notify_example_01.c | 9 +-- src/examples/panel_example_01.c | 7 +-- src/examples/panes_example.c | 21 +++---- src/examples/photocam_example_01.c | 15 ++--- src/examples/popup_example_01.c | 15 ++--- src/examples/popup_example_02.c | 13 ++--- src/examples/popup_example_03.c | 15 ++--- src/examples/progressbar_example.c | 29 ++++------ src/examples/radio_example_01.c | 9 +-- src/examples/scroller_example_01.c | 7 +-- src/examples/segment_control_example.c | 13 ++--- src/examples/separator_example_01.c | 7 +-- src/examples/slider_example.c | 17 ++---- src/examples/slideshow_example.c | 69 ++++++++++------------ src/examples/spinner_example.c | 17 ++---- src/examples/table_example_01.c | 7 +-- src/examples/table_example_02.c | 7 +-- src/examples/theme_example_01.c | 11 +--- src/examples/theme_example_02.c | 9 +-- src/examples/thumb_example_01.c | 15 ++--- src/examples/toolbar_example_01.c | 19 +++--- src/examples/toolbar_example_02.c | 15 ++--- src/examples/toolbar_example_03.c | 13 ++--- src/examples/transit_example_01.c | 9 +-- src/examples/transit_example_02.c | 7 +-- src/examples/transit_example_03.c | 17 ++---- src/examples/transit_example_04.c | 11 +--- src/examples/web_example.c | 49 +++++++--------- src/examples/win_example.c | 44 ++++++-------- 98 files changed, 592 insertions(+), 1083 deletions(-) diff --git a/src/examples/actionslider_example_01.c b/src/examples/actionslider_example_01.c index 2a0fbb9..e4d9355 100644 --- a/src/examples/actionslider_example_01.c +++ b/src/examples/actionslider_example_01.c @@ -2,20 +2,15 @@ //gcc -g `pkg-config --cflags --libs elementary` actionslider_example_01.c -o actionslider_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif -static void _pos_selected_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info) +static void _pos_selected_cb(void *data, Evas_Object *obj, void *event_info) { printf("Selection: %s\n", (char *)event_info); printf("Label selected: %s\n", elm_actionslider_selected_label_get(obj)); } static void -_position_change_magnetic_cb(void *data __UNUSED__, Evas_Object * obj, void *event_info) +_position_change_magnetic_cb(void *data, Evas_Object * obj, void *event_info) { if (!strcmp((char *)event_info, "left")) elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_LEFT); @@ -24,7 +19,7 @@ _position_change_magnetic_cb(void *data __UNUSED__, Evas_Object * obj, void *eve } static void -_magnet_enable_disable_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info) +_magnet_enable_disable_cb(void *data, Evas_Object *obj, void *event_info) { if (!strcmp((char *)event_info, "left")) elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_CENTER); @@ -33,13 +28,13 @@ _magnet_enable_disable_cb(void *data __UNUSED__, Evas_Object *obj, void *event_i } static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *as; diff --git a/src/examples/anchorblock_example_01.c b/src/examples/anchorblock_example_01.c index a5b3c73..33761c5 100644 --- a/src/examples/anchorblock_example_01.c +++ b/src/examples/anchorblock_example_01.c @@ -2,17 +2,12 @@ * gcc -o anchorblock_example_01 anchorblock_example_01.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _anchorblock_clicked_cb(void *data, Evas_Object *obj, void *ev); static void _anchorview_clicked_cb(void *data, Evas_Object *obj, void *ev); EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *box, *o, *frame; const char *anchortext = @@ -89,26 +84,26 @@ ELM_MAIN() static void _anchor_buttons_create(Evas_Object *ao, Elm_Entry_Anchorblock_Info *info, Evas_Smart_Cb btn_end_cb); static void -_btn_anchorblock_end_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_btn_anchorblock_end_cb(void *data, Evas_Object *obj, void *event_info) { elm_anchorblock_hover_end((Evas_Object *)data); } static void -_anchorblock_clicked_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info) +_anchorblock_clicked_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Entry_Anchorblock_Info *info = event_info; _anchor_buttons_create(obj, info, _btn_anchorblock_end_cb); } static void -_btn_anchorview_end_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_btn_anchorview_end_cb(void *data, Evas_Object *obj, void *event_info) { elm_anchorview_hover_end((Evas_Object *)data); } static void -_anchorview_clicked_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info) +_anchorview_clicked_cb(void *data, Evas_Object *obj, void *event_info) { /* should be an Elm_Entry_Anchorview_Info, but since both of them are * the same, it simplifies code in this example to use one only */ @@ -117,7 +112,7 @@ _anchorview_clicked_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info } static void -_btn_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) { const char *lbl = elm_object_text_get(obj); printf("%s: %s\n", lbl, (char *)data); diff --git a/src/examples/bg_example_01.c b/src/examples/bg_example_01.c index 6ce6258..307f11a 100644 --- a/src/examples/bg_example_01.c +++ b/src/examples/bg_example_01.c @@ -2,21 +2,16 @@ //gcc -o bg_example_01 bg_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; diff --git a/src/examples/bg_example_02.c b/src/examples/bg_example_02.c index 29f32a0..9ebc73c 100644 --- a/src/examples/bg_example_02.c +++ b/src/examples/bg_example_02.c @@ -3,21 +3,16 @@ //where directory is the a path where images/plant_01.jpg can be found. #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; char buf[PATH_MAX]; diff --git a/src/examples/bg_example_03.c b/src/examples/bg_example_03.c index 033b56a..fa70a03 100644 --- a/src/examples/bg_example_03.c +++ b/src/examples/bg_example_03.c @@ -3,21 +3,16 @@ //where directory is the a path where images/plant_01.jpg can be found. #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); } static void -_cb_radio_changed(void *data, Evas_Object *obj, void *event __UNUSED__) +_cb_radio_changed(void *data, Evas_Object *obj, void *event) { Evas_Object *o_bg = data; @@ -25,7 +20,7 @@ _cb_radio_changed(void *data, Evas_Object *obj, void *event __UNUSED__) } static void -_cb_overlay_changed(void *data, Evas_Object *obj, void *event __UNUSED__) +_cb_overlay_changed(void *data, Evas_Object *obj, void *event) { Evas_Object *o_bg = data; @@ -45,7 +40,7 @@ _cb_overlay_changed(void *data, Evas_Object *obj, void *event __UNUSED__) } static void -_cb_color_changed(void *data, Evas_Object *obj, void *event __UNUSED__) +_cb_color_changed(void *data, Evas_Object *obj, void *event) { Evas_Object *o_bg = data; double val = 0.0; @@ -62,7 +57,7 @@ _cb_color_changed(void *data, Evas_Object *obj, void *event __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; Evas_Object *box, *hbox, *o_bg; diff --git a/src/examples/box_example_02.c b/src/examples/box_example_02.c index 7b1a5a3..777616f 100644 --- a/src/examples/box_example_02.c +++ b/src/examples/box_example_02.c @@ -2,11 +2,6 @@ //gcc -g `pkg-config --cflags --libs elementary` box_example_02.c -o box_example_02 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct { @@ -16,7 +11,7 @@ typedef struct } Transitions_Data; static void -_add_cb(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_add_cb(void *data, Evas_Object *obj, void *ev) { Evas_Object *btn; Eina_List *children; @@ -36,14 +31,14 @@ _add_cb(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_clear_cb(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_clear_cb(void *data, Evas_Object *obj, void *ev) { Transitions_Data *tdata = data; elm_box_clear(tdata->box); } static void -_unpack_cb(void *data, Evas_Object *obj, void *ev __UNUSED__) +_unpack_cb(void *data, Evas_Object *obj, void *ev) { Transitions_Data *tdata = data; elm_box_unpack(tdata->box, obj); @@ -72,7 +67,7 @@ _test_box_transition_change(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *bigbox, *bx, *bt; static Transitions_Data tdata = { diff --git a/src/examples/bubble_example_01.c b/src/examples/bubble_example_01.c index 47546bd..c3e2cff 100644 --- a/src/examples/bubble_example_01.c +++ b/src/examples/bubble_example_01.c @@ -2,14 +2,9 @@ //gcc -o bubble_example_01 bubble_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif void -_bla(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_bla(void *data, Evas_Object *obj, void *event_info) { static unsigned char corner = 0; ++corner; @@ -21,7 +16,7 @@ _bla(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bubble, *label, *icon; diff --git a/src/examples/button_example_00.c b/src/examples/button_example_00.c index e35b80f..d9f37b1 100644 --- a/src/examples/button_example_00.c +++ b/src/examples/button_example_00.c @@ -2,20 +2,15 @@ * gcc -o button_example_00 button_example_00.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -#include "elementary_config.h" -#else -#define __UNUSED__ -#endif static void -on_click(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_click(void *data, Evas_Object *obj, void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win = NULL; Evas_Object *bg = NULL; diff --git a/src/examples/button_example_01.c b/src/examples/button_example_01.c index 8b051c3..4005662 100644 --- a/src/examples/button_example_01.c +++ b/src/examples/button_example_01.c @@ -2,11 +2,6 @@ * gcc -o button_example_01 button_example_01.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct { @@ -21,7 +16,7 @@ typedef struct } App_Data; static void -_btn_cursors_release_cb(void *data, Evas_Object *btn __UNUSED__, void *ev __UNUSED__) +_btn_cursors_release_cb(void *data, Evas_Object *btn, void *ev) { App_Data *app = data; elm_object_part_content_set(app->mid, "icon", app->icon_still); @@ -29,7 +24,7 @@ _btn_cursors_release_cb(void *data, Evas_Object *btn __UNUSED__, void *ev __UNUS } static void -_btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev __UNUSED__) +_btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev) { App_Data *app = data; double ax, ay; @@ -73,7 +68,7 @@ _btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev __UNUSED__) } static void -_btn_options_cb(void *data, Evas_Object *btn, void *ev __UNUSED__) +_btn_options_cb(void *data, Evas_Object *btn, void *ev) { char *ptr; double t; @@ -101,7 +96,7 @@ _btn_options_cb(void *data, Evas_Object *btn, void *ev __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *box2, *btn, *icon; static App_Data data; diff --git a/src/examples/calendar_example_01.c b/src/examples/calendar_example_01.c index 7be949d..f00cfc4 100644 --- a/src/examples/calendar_example_01.c +++ b/src/examples/calendar_example_01.c @@ -10,14 +10,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cal; diff --git a/src/examples/calendar_example_02.c b/src/examples/calendar_example_02.c index 56a5d0d..8978451 100644 --- a/src/examples/calendar_example_02.c +++ b/src/examples/calendar_example_02.c @@ -11,11 +11,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static char * _format_month_year(struct tm *format_time) @@ -27,7 +22,7 @@ _format_month_year(struct tm *format_time) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cal; const char *weekdays[] = diff --git a/src/examples/calendar_example_03.c b/src/examples/calendar_example_03.c index a54c892..2e86be5 100644 --- a/src/examples/calendar_example_03.c +++ b/src/examples/calendar_example_03.c @@ -11,14 +11,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cal; diff --git a/src/examples/calendar_example_04.c b/src/examples/calendar_example_04.c index ed90a5d..ff170ba 100644 --- a/src/examples/calendar_example_04.c +++ b/src/examples/calendar_example_04.c @@ -11,16 +11,11 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define SECS_DAY 86400 EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *cal, *cal2; struct tm selected_time; diff --git a/src/examples/calendar_example_05.c b/src/examples/calendar_example_05.c index 5b45b3d..6f752b1 100644 --- a/src/examples/calendar_example_05.c +++ b/src/examples/calendar_example_05.c @@ -10,14 +10,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_print_cal_info_cb(void *data, Evas_Object *obj, void *event_info) { int year_min, year_max; Eina_Bool sel_enabled; @@ -42,7 +37,7 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cal; diff --git a/src/examples/calendar_example_06.c b/src/examples/calendar_example_06.c index 60b13f8..192aed3 100644 --- a/src/examples/calendar_example_06.c +++ b/src/examples/calendar_example_06.c @@ -9,16 +9,11 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define SECS_DAY 86400 static void -_btn_clear_cb(void *data, Evas_Object *btn __UNUSED__, void *ev __UNUSED__) +_btn_clear_cb(void *data, Evas_Object *btn, void *ev) { Evas_Object *cal = data; elm_calendar_marks_clear(cal); @@ -26,7 +21,7 @@ _btn_clear_cb(void *data, Evas_Object *btn __UNUSED__, void *ev __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bt, *bx, *cal; Elm_Calendar_Mark *mark; diff --git a/src/examples/check_example_01.c b/src/examples/check_example_01.c index a0d99c5..d8ae334 100644 --- a/src/examples/check_example_01.c +++ b/src/examples/check_example_01.c @@ -2,16 +2,11 @@ //gcc -o check_example_01 check_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _print(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cb, *cb2, *icon; Eina_Bool value; @@ -58,7 +53,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_print(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_print(void *data, Evas_Object *obj, void *event_info) { printf("check %smarked\n", *((Eina_Bool*)data) ? "" : "un"); } diff --git a/src/examples/clock_example.c b/src/examples/clock_example.c index b511b5e..9da5762 100644 --- a/src/examples/clock_example.c +++ b/src/examples/clock_example.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *ck; unsigned int digedit; diff --git a/src/examples/colorselector_example_01.c b/src/examples/colorselector_example_01.c index 43a6be4..28905c0 100644 --- a/src/examples/colorselector_example_01.c +++ b/src/examples/colorselector_example_01.c @@ -2,18 +2,13 @@ //gcc -g `pkg-config --cflags --libs elementary` colorselector_example_01.c -o colorselector_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _change_color(void *data, Evas_Object *obj, void *event_info); static void _colorpalette_clicked_cb(void *data, Evas_Object *obj, void *event_info); static void _colorpalette_longpressed_cb(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *cs, *rect, *bx, *fr; @@ -74,7 +69,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_change_color(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_change_color(void *data, Evas_Object *obj, void *event_info) { int r, g, b, a; elm_colorselector_color_get(obj, &r, &g, &b, &a); @@ -82,7 +77,7 @@ _change_color(void *data, Evas_Object *obj, void *event_info __UNUSED__) } static void -_colorpalette_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_colorpalette_clicked_cb(void *data, Evas_Object *obj, void *event_info) { int r = 0, g = 0, b = 0 ,a = 0; Elm_Object_Item *color_it = (Elm_Object_Item *) event_info; @@ -91,7 +86,7 @@ _colorpalette_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_in } static void -_colorpalette_longpressed_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_colorpalette_longpressed_cb(void *data, Evas_Object *obj, void *event_info) { int r = 0,g = 0,b = 0 ,a = 0; Elm_Object_Item *color_it = (Elm_Object_Item *) event_info; diff --git a/src/examples/conformant_example_01.c b/src/examples/conformant_example_01.c index 4bbef18..426bea4 100644 --- a/src/examples/conformant_example_01.c +++ b/src/examples/conformant_example_01.c @@ -10,14 +10,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *btn, *bx, *en; diff --git a/src/examples/conformant_example_02.c b/src/examples/conformant_example_02.c index a2ec8a3..bea9ec2 100644 --- a/src/examples/conformant_example_02.c +++ b/src/examples/conformant_example_02.c @@ -10,14 +10,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *conform, *btn, *bx, *en; diff --git a/src/examples/ctxpopup_example_01.c b/src/examples/ctxpopup_example_01.c index 2a82db5..763d71d 100644 --- a/src/examples/ctxpopup_example_01.c +++ b/src/examples/ctxpopup_example_01.c @@ -2,14 +2,9 @@ //gcc -o ctxpopup_example_01 ctxpopup_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_ctxpopup_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ctxpopup_item_cb(void *data, Evas_Object *obj, void *event_info) { printf("ctxpopup item selected: %s\n", elm_object_item_text_get(event_info)); } @@ -23,7 +18,7 @@ Elm_Object_Item *item_new(Evas_Object *ctxpopup, const char * label, const char } static void -_list_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_list_item_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *ctxpopup; Elm_Object_Item *it; @@ -49,7 +44,7 @@ _list_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in } static void -_list_item_cb2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_list_item_cb2(void *data, Evas_Object *obj, void *event_info) { Evas_Object *ctxpopup; Elm_Object_Item *it; @@ -75,7 +70,7 @@ _list_item_cb2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *list; diff --git a/src/examples/datetime_example.c b/src/examples/datetime_example.c index cbb011e..63d502f 100644 --- a/src/examples/datetime_example.c +++ b/src/examples/datetime_example.c @@ -2,22 +2,17 @@ //gcc -g `pkg-config --cflags --libs elementary` datetime_example.c -o datetime_example #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *bx, *datetime; diff --git a/src/examples/dayselector_example.c b/src/examples/dayselector_example.c index 265f9a6..cd08ad5 100644 --- a/src/examples/dayselector_example.c +++ b/src/examples/dayselector_example.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } /* Callback function when a day is clicked. */ -static void _changed_cb(void* data __UNUSED__, Evas_Object* obj, void* event_info) +static void _changed_cb(void* data, Evas_Object* obj, void* event_info) { char buf[256]; Elm_Dayselector_Day day; @@ -51,7 +46,7 @@ static void _changed_cb(void* data __UNUSED__, Evas_Object* obj, void* event_inf /* End of clicked callback */ EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *dayselector; diff --git a/src/examples/diskselector_example_01.c b/src/examples/diskselector_example_01.c index d506e35..5c06d23 100644 --- a/src/examples/diskselector_example_01.c +++ b/src/examples/diskselector_example_01.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *ds; unsigned int i; diff --git a/src/examples/diskselector_example_02.c b/src/examples/diskselector_example_02.c index 0638d23..6bd7db4 100644 --- a/src/examples/diskselector_example_02.c +++ b/src/examples/diskselector_example_02.c @@ -10,24 +10,19 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static int counter = 3; static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *ds_it; Evas_Object *ds = data; @@ -39,7 +34,7 @@ _add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_ic_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *ds_it; Evas_Object *ic, *ds = data; @@ -54,14 +49,14 @@ _add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_sel_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *ds_it = event_info; printf("Selected label: %s\n", elm_object_item_text_get(ds_it)); } static void -_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_func_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *ds_it; Evas_Object *ds = data; @@ -73,7 +68,7 @@ _add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_sel_data_cb(void *data, Evas_Object *obj, void *event_info) { char *content = data; Elm_Object_Item *ds_it = event_info; @@ -82,13 +77,13 @@ _sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) } static void -_free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_free_data(void *data, Evas_Object *obj, void *event_info) { free(data); } static void -_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_data_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *ds_it; Evas_Object *ds = data; @@ -106,7 +101,7 @@ _add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_del_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_ds_it; Evas_Object *ds = data; @@ -116,7 +111,7 @@ _del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_unselect_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_ds_it; Evas_Object *ds = data; @@ -126,7 +121,7 @@ _unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_print_cb(void *data, Evas_Object *obj, void *event_info) { const Eina_List *l, *items; Elm_Object_Item *ds_it; @@ -138,14 +133,14 @@ _print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_clear_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *ds = data; elm_diskselector_clear(ds); } static void -_select_first_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_first_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *first_ds_it; Evas_Object *ds = data; @@ -156,7 +151,7 @@ _select_first_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU } static void -_select_last_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_last_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *last_ds_it; Evas_Object *ds = data; @@ -167,7 +162,7 @@ _select_last_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_next_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_ds_it, *next_ds_it; Evas_Object *ds = data; @@ -181,7 +176,7 @@ _select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_prev_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_ds_it, *prev_ds_it; Evas_Object *ds = data; @@ -195,7 +190,7 @@ _select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *hbx, *ds, *bt; diff --git a/src/examples/efl_thread_1.c b/src/examples/efl_thread_1.c index bc91ca8..0f18539 100644 --- a/src/examples/efl_thread_1.c +++ b/src/examples/efl_thread_1.c @@ -2,11 +2,6 @@ //gcc -o efl_thread_1 efl_thread_1.c -g `pkg-config --cflags --libs elementary` #include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; @@ -16,7 +11,7 @@ static pthread_t thread_id; // BEGIN - code running in my custom pthread instance // static void * -my_thread_run(void *arg __UNUSED__) +my_thread_run(void *arg) { double t = 0.0; @@ -51,7 +46,7 @@ my_thread_new(void) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; diff --git a/src/examples/efl_thread_2.c b/src/examples/efl_thread_2.c index 377c43d..ceedc75 100644 --- a/src/examples/efl_thread_2.c +++ b/src/examples/efl_thread_2.c @@ -2,11 +2,6 @@ //gcc -o efl_thread_2 efl_thread_2.c -g `pkg-config --cflags --libs elementary` #include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; @@ -23,7 +18,7 @@ static pthread_t thread_id; // BEGIN - code running in my custom pthread instance // static void * -my_thread_run(void *arg __UNUSED__) +my_thread_run(void *arg) { double t = 0.0; @@ -67,7 +62,7 @@ my_thread_mainloop_code(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; diff --git a/src/examples/efl_thread_3.c b/src/examples/efl_thread_3.c index 2b1d025..cbc2c67 100644 --- a/src/examples/efl_thread_3.c +++ b/src/examples/efl_thread_3.c @@ -2,11 +2,6 @@ //gcc -o efl_thread_3 efl_thread_3.c -g `pkg-config --cflags --libs elementary` #include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; @@ -23,7 +18,7 @@ static pthread_t thread_id; // BEGIN - code running in my custom pthread instance // static void * -my_thread_run(void *arg __UNUSED__) +my_thread_run(void *arg) { double t = 0.0; @@ -69,7 +64,7 @@ my_thread_mainloop_code(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; diff --git a/src/examples/efl_thread_4.c b/src/examples/efl_thread_4.c index 517b805..2f565aa 100644 --- a/src/examples/efl_thread_4.c +++ b/src/examples/efl_thread_4.c @@ -2,11 +2,6 @@ //gcc -o efl_thread_4 efl_thread_4.c -g `pkg-config --cflags --libs elementary` #include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; @@ -25,7 +20,7 @@ static int th_exit = 0; // BEGIN - code running in my custom pthread instance // static void * -my_thread_run(void *arg __UNUSED__) +my_thread_run(void *arg) { double t = 0.0; @@ -81,7 +76,7 @@ my_thread_mainloop_code(void *data) // just test cancelling the thread static void -down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +down(void *data, Evas *e, Evas_Object *obj, void *event_info) { pthread_mutex_lock(&th_lock); th_exit = 1; @@ -89,7 +84,7 @@ down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, voi } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; diff --git a/src/examples/efl_thread_5.c b/src/examples/efl_thread_5.c index 7132eda..4e53dd0 100644 --- a/src/examples/efl_thread_5.c +++ b/src/examples/efl_thread_5.c @@ -1,11 +1,6 @@ //Compile with: //gcc -o efl_thread_5 efl_thread_5.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Ecore_Thread *thr = NULL; @@ -20,7 +15,7 @@ struct info // BEGIN - code running in my custom thread instance // static void -th_do(void *data __UNUSED__, Ecore_Thread *th) +th_do(void *data, Ecore_Thread *th) { double t = 0.0; @@ -49,7 +44,7 @@ th_do(void *data __UNUSED__, Ecore_Thread *th) // END - code running in my custom thread instance static void // when mainloop gets feedback from worker -th_feedback(void *data __UNUSED__, Ecore_Thread *th __UNUSED__, void *msg) +th_feedback(void *data, Ecore_Thread *th, void *msg) { struct info *inf = msg; evas_object_move(rect, inf->x - 50, inf->y - 50); @@ -57,19 +52,19 @@ th_feedback(void *data __UNUSED__, Ecore_Thread *th __UNUSED__, void *msg) } // BONUS (optional): called after th_do returns and has NOT been cancelled -static void th_end(void *data __UNUSED__, Ecore_Thread *th __UNUSED__) { printf("thread ended\n"); } +static void th_end(void *data, Ecore_Thread *th) { printf("thread ended\n"); } // BONUS (optional): called in mainloop AFTER thread has finished cancelling -static void th_cancel(void *data __UNUSED__, Ecore_Thread *th __UNUSED__) { printf("thread cancelled\n"); } +static void th_cancel(void *data, Ecore_Thread *th) { printf("thread cancelled\n"); } // just test cancelling the thread worker static void -down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +down(void *data, Evas *e, Evas_Object *obj, void *event_info) { ecore_thread_cancel(thr); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; diff --git a/src/examples/efl_thread_6.c b/src/examples/efl_thread_6.c index df42cd9..df355d6 100644 --- a/src/examples/efl_thread_6.c +++ b/src/examples/efl_thread_6.c @@ -1,11 +1,6 @@ //Compile with: //gcc -o efl_thread_6 efl_thread_6.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; @@ -67,7 +62,7 @@ mandel(int *pix, int w, int h) } static void -th_do(void *data, Ecore_Thread *th __UNUSED__) +th_do(void *data, Ecore_Thread *th) { struct info *inf = data; // CANNOT TOUCH inf->obj here! just inf->pix which is 256x256 @ 32bpp @@ -78,7 +73,7 @@ th_do(void *data, Ecore_Thread *th __UNUSED__) // END - code running in my custom thread instance static void // thread job finished - collect results and put in img obj -th_end(void *data, Ecore_Thread *th __UNUSED__) +th_end(void *data, Ecore_Thread *th) { struct info *inf = data; @@ -90,7 +85,7 @@ th_end(void *data, Ecore_Thread *th __UNUSED__) } static void // if the thread is cancelled - free pix, keep obj tho -th_cancel(void *data, Ecore_Thread *th __UNUSED__) +th_cancel(void *data, Ecore_Thread *th) { struct info *inf = data; @@ -123,7 +118,7 @@ anim(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *o, *bg; int i; diff --git a/src/examples/efl_thread_win32_1.c b/src/examples/efl_thread_win32_1.c index c670810..1a1d579 100644 --- a/src/examples/efl_thread_win32_1.c +++ b/src/examples/efl_thread_win32_1.c @@ -3,11 +3,6 @@ #include #define WIN32_LEAN_AND_MEAN #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; diff --git a/src/examples/efl_thread_win32_2.c b/src/examples/efl_thread_win32_2.c index cbc2796..d1cad15 100644 --- a/src/examples/efl_thread_win32_2.c +++ b/src/examples/efl_thread_win32_2.c @@ -3,11 +3,6 @@ #include #define WIN32_LEAN_AND_MEAN #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; diff --git a/src/examples/efl_thread_win32_3.c b/src/examples/efl_thread_win32_3.c index 9b898ac..e80be8c 100644 --- a/src/examples/efl_thread_win32_3.c +++ b/src/examples/efl_thread_win32_3.c @@ -3,11 +3,6 @@ #include #define WIN32_LEAN_AND_MEAN #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; diff --git a/src/examples/efl_thread_win32_4.c b/src/examples/efl_thread_win32_4.c index 538ba71..957c1c1 100644 --- a/src/examples/efl_thread_win32_4.c +++ b/src/examples/efl_thread_win32_4.c @@ -3,11 +3,6 @@ #include #define WIN32_LEAN_AND_MEAN #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *win = NULL; static Evas_Object *rect = NULL; diff --git a/src/examples/entry_example.c b/src/examples/entry_example.c index 1bc55ce..b28b76c 100644 --- a/src/examples/entry_example.c +++ b/src/examples/entry_example.c @@ -2,11 +2,6 @@ * gcc -o entry_example entry_example.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -#endif typedef struct { @@ -38,7 +33,7 @@ _edit_buffer_insert(Evas_Object *e, const char *text) } static void -_it_sel_cb(void *data, Evas_Object *obj __UNUSED__, void *event) +_it_sel_cb(void *data, Evas_Object *obj, void *event) { App_Inwin_Data *aid = data; Elm_Object_Item *gg_it = event; @@ -49,7 +44,7 @@ _it_sel_cb(void *data, Evas_Object *obj __UNUSED__, void *event) } static char * -_emo_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__) +_emo_label_get(void *data, Evas_Object *obj, const char *part) { return strdup(data); } @@ -67,7 +62,7 @@ _emo_content_get(void *data, Evas_Object *obj, const char *part) } static void -_emo_del(void *data, Evas_Object *obj __UNUSED__) +_emo_del(void *data, Evas_Object *obj) { free(data); } @@ -112,7 +107,7 @@ _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid) } static void -_btn_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_insert_cb(void *data, Evas_Object *obj, void *event) { App_Inwin_Data *aid = data; const char *size[] = { @@ -135,7 +130,7 @@ _btn_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) } static void -_width_changed_cb(void *data, Evas_Object *obj, void *event __UNUSED__) +_width_changed_cb(void *data, Evas_Object *obj, void *event) { App_Inwin_Data *aid = data; @@ -143,7 +138,7 @@ _width_changed_cb(void *data, Evas_Object *obj, void *event __UNUSED__) } static void -_height_changed_cb(void *data, Evas_Object *obj, void *event __UNUSED__) +_height_changed_cb(void *data, Evas_Object *obj, void *event) { App_Inwin_Data *aid = data; @@ -293,7 +288,7 @@ _page_settings_add(Evas_Object *parent, App_Inwin_Data *aid) } static void -_insert_cancel_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_insert_cancel_cb(void *data, Evas_Object *obj, void *event) { App_Inwin_Data *aid = data; @@ -301,13 +296,13 @@ _insert_cancel_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED_ } static void -_inwin_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_inwin_del_cb(void *data, Evas *e, Evas_Object *obj, void *event) { free(data); } static void -_image_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_image_insert_cb(void *data, Evas_Object *obj, void *event) { App_Data *ad = data; App_Inwin_Data *aid; @@ -373,7 +368,7 @@ _image_insert_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__ } static void -_format_change_cb(void *data, Evas_Object *obj, void *event __UNUSED__) +_format_change_cb(void *data, Evas_Object *obj, void *event) { App_Data *ad = data; char fmt_open[5], fmt_close[6]; @@ -434,7 +429,7 @@ all_done: } static void -_autosave_change_cb(void *data, Evas_Object *obj, void *event __UNUSED__) +_autosave_change_cb(void *data, Evas_Object *obj, void *event) { App_Data *ad = data; Eina_Bool state = elm_check_state_get(obj); @@ -444,7 +439,7 @@ _autosave_change_cb(void *data, Evas_Object *obj, void *event __UNUSED__) } static void -_edit_dblclick_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_edit_dblclick_cb(void *data, Evas_Object *obj, void *event) { int current_cursor; @@ -479,7 +474,7 @@ _edit_dblclick_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED_ } static void -_edit_tplclick_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_edit_tplclick_cb(void *data, Evas_Object *obj, void *event) { elm_entry_cursor_line_begin_set(obj); elm_entry_cursor_selection_begin(obj); @@ -488,14 +483,14 @@ _edit_tplclick_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED_ } static void -_win_del_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_win_del_cb(void *data, Evas_Object *obj, void *event) { evas_object_del(obj); elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *tb, *en, *o, *icon; App_Data app; diff --git a/src/examples/fileselector_button_example.c b/src/examples/fileselector_button_example.c index 9cac807..a844c48 100644 --- a/src/examples/fileselector_button_example.c +++ b/src/examples/fileselector_button_example.c @@ -10,23 +10,18 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void /* hook on the sole smart callback */ _file_chosen(void *data, - Evas_Object *obj __UNUSED__, + Evas_Object *obj, void *event_info) { Evas_Object *entry = data; @@ -43,8 +38,8 @@ _file_chosen(void *data, /* toggle inwin mode */ static void _inwin_mode_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_bt = data; Eina_Bool old_val = elm_fileselector_button_inwin_mode_get(fs_bt); @@ -55,8 +50,8 @@ _inwin_mode_toggle(void *data, static void _current_sel_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_bt = data; Eina_Bool old_val = elm_fileselector_button_is_save_get(fs_bt); @@ -68,8 +63,8 @@ _current_sel_toggle(void *data, static void _folder_only_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_bt = data; Eina_Bool old_val = elm_fileselector_button_folder_only_get(fs_bt); @@ -80,8 +75,8 @@ _folder_only_toggle(void *data, static void _expandable_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_bt = data; Eina_Bool old_val = elm_fileselector_button_expandable_get(fs_bt); @@ -91,8 +86,8 @@ _expandable_toggle(void *data, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *vbox, *hbox, *ic, *ck, *fs_bt, *en, *lb, *sep; diff --git a/src/examples/fileselector_entry_example.c b/src/examples/fileselector_entry_example.c index 97d2cbc..5c987d0 100644 --- a/src/examples/fileselector_entry_example.c +++ b/src/examples/fileselector_entry_example.c @@ -10,24 +10,19 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } /* hook on the file,chosen smart callback */ static void -_file_chosen(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_file_chosen(void *data, + Evas_Object *obj, void *event_info) { const char *file = event_info; @@ -41,8 +36,8 @@ _file_chosen(void *data __UNUSED__, /* toggle inwin mode */ static void _inwin_mode_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_entry = data; Eina_Bool old_val = elm_fileselector_entry_inwin_mode_get(fs_entry); @@ -53,8 +48,8 @@ _inwin_mode_toggle(void *data, static void _current_sel_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_entry = data; Eina_Bool old_val = elm_fileselector_entry_is_save_get(fs_entry); @@ -66,8 +61,8 @@ _current_sel_toggle(void *data, static void _folder_only_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_entry = data; Eina_Bool old_val = elm_fileselector_entry_folder_only_get(fs_entry); @@ -78,8 +73,8 @@ _folder_only_toggle(void *data, static void _expandable_toggle(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs_entry = data; Eina_Bool old_val = elm_fileselector_entry_expandable_get(fs_entry); @@ -89,8 +84,8 @@ _expandable_toggle(void *data, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *vbox, *hbox, *ic, *ck, *fs_entry, *sep; diff --git a/src/examples/fileselector_example.c b/src/examples/fileselector_example.c index 297ee77..9e5b06d 100644 --- a/src/examples/fileselector_example.c +++ b/src/examples/fileselector_example.c @@ -10,24 +10,19 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } /* 'done' cb */ static void -_fs_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_fs_done(void *data, + Evas_Object *obj, void *event_info) { const char *selected = event_info; @@ -42,8 +37,8 @@ _fs_done(void *data __UNUSED__, /* 'selected' cb */ static void -_fs_selected(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_fs_selected(void *data, + Evas_Object *obj, void *event_info) { const char *selected = event_info; @@ -54,8 +49,8 @@ _fs_selected(void *data __UNUSED__, static void _is_save_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs = data; Eina_Bool old_val = elm_fileselector_is_save_get(fs); @@ -68,8 +63,8 @@ _is_save_clicked(void *data, static void _folder_only_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs = data; Eina_Bool old_val = elm_fileselector_folder_only_get(fs); @@ -82,8 +77,8 @@ _folder_only_clicked(void *data, static void _expandable_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs = data; Eina_Bool old_val = elm_fileselector_expandable_get(fs); @@ -96,8 +91,8 @@ _expandable_clicked(void *data, static void _sel_get_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs = data; printf("Current selection is: %s\n", elm_fileselector_selected_get(fs)); @@ -105,8 +100,8 @@ _sel_get_clicked(void *data, static void _path_get_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *fs = data; printf("Current selection's directory path is: %s\n", @@ -114,8 +109,8 @@ _path_get_clicked(void *data, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *fs, *bg, *vbox, *buttons_bx, *bt, *sep, *bx; diff --git a/src/examples/flip_example_01.c b/src/examples/flip_example_01.c index f205e23..41a0ef6 100644 --- a/src/examples/flip_example_01.c +++ b/src/examples/flip_example_01.c @@ -2,16 +2,11 @@ //gcc -o flip_example_01 flip_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _change_interaction(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *rect, *rect2, *flip, *radio, *radio2, *radio3; @@ -89,7 +84,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_change_interaction(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_change_interaction(void *data, Evas_Object *obj, void *event_info) { elm_flip_interaction_set(data, elm_radio_state_value_get(obj)); elm_flip_go(data, ELM_FLIP_ROTATE_XZ_CENTER_AXIS); diff --git a/src/examples/flipselector_example.c b/src/examples/flipselector_example.c index 504116b..a24e4c9 100644 --- a/src/examples/flipselector_example.c +++ b/src/examples/flipselector_example.c @@ -10,11 +10,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static const char *commands = \ "commands are:\n" @@ -26,17 +21,17 @@ static const char *commands = \ "\th - print help\n"; static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } void /* unselect the item shown in the flip selector */ _unsel_cb(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Elm_Object_Item *it; Evas_Object *fp = data; @@ -47,8 +42,8 @@ _unsel_cb(void *data, void /* delete the item shown in the flip selector */ _del_cb(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Elm_Object_Item *it; Evas_Object *fp = data; @@ -58,25 +53,25 @@ _del_cb(void *data, } void /* underflow callback */ -_underflow_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_underflow_cb(void *data, + Evas_Object *obj, + void *event_info) { fprintf(stdout, "Underflow!\n"); } void /* overflow callback */ -_overflow_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_overflow_cb(void *data, + Evas_Object *obj, + void *event_info) { fprintf(stdout, "Overflow!\n"); } static void _on_keydown(void *data, - Evas_Object *object __UNUSED__, - Evas_Object *src __UNUSED__, + Evas_Object *object, + Evas_Object *src, Evas_Callback_Type type, void *event_info) { @@ -147,7 +142,7 @@ _on_keydown(void *data, } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { unsigned int i; Evas_Object *win, *bg, *bx, *fp, *bt; diff --git a/src/examples/frame_example_01.c b/src/examples/frame_example_01.c index ee0a40c..ed862b9 100644 --- a/src/examples/frame_example_01.c +++ b/src/examples/frame_example_01.c @@ -2,14 +2,9 @@ //gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; Evas_Object *f1, *r1, *f2, *r2, *f3, *r3, *f4, *r4; diff --git a/src/examples/general_funcs_example.c b/src/examples/general_funcs_example.c index 225b8e0..9738809 100644 --- a/src/examples/general_funcs_example.c +++ b/src/examples/general_funcs_example.c @@ -4,14 +4,9 @@ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_BIN_DIR "/usr/bin" -# define PACKAGE_LIB_DIR "/usr/lib" -# define PACKAGE_DATA_DIR "/usr/share/elementary" -#endif +#define PACKAGE_BIN_DIR "/usr/bin" +#define PACKAGE_LIB_DIR "/usr/lib" +#define PACKAGE_DATA_DIR "/usr/share/elementary" #define WIDTH 300 #define HEIGHT 300 @@ -26,51 +21,51 @@ struct test_data struct test_data d = {NULL, EINA_TRUE, EINA_TRUE}; static void -_btn_enabled_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event __UNUSED__) +_btn_enabled_cb(void *data, + Evas_Object *obj, + void *event) { elm_object_disabled_set(d.btn, !d.btn_enabled); } static void /* focus callback */ -_btn_focus_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event __UNUSED__) +_btn_focus_cb(void *data, + Evas_Object *obj, + void *event) { elm_object_focus_set(d.btn, EINA_TRUE); } static void /* unfocus callback */ -_btn_unfocus_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event __UNUSED__) +_btn_unfocus_cb(void *data, + Evas_Object *obj, + void *event) { elm_object_focus_set(d.btn, EINA_FALSE); } static void /* focus allow callback */ -_btn_focus_allow_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event __UNUSED__) +_btn_focus_allow_cb(void *data, + Evas_Object *obj, + void *event) { elm_object_focus_allow_set(d.btn, d.btn_gets_focus); } static void /* scaling callback */ -_btn_scale_cb(void *data __UNUSED__, +_btn_scale_cb(void *data, Evas_Object *obj, - void *event __UNUSED__) + void *event) { elm_object_scale_set(d.btn, elm_slider_value_get(obj)); } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { int h; Evas_Object *win, *bg, *box, *frame, *check, *b, *slider; diff --git a/src/examples/gengrid_example.c b/src/examples/gengrid_example.c index b85378b..7315d4c 100644 --- a/src/examples/gengrid_example.c +++ b/src/examples/gengrid_example.c @@ -10,12 +10,7 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" typedef struct _Example_Item { @@ -39,9 +34,9 @@ static Elm_Gengrid_Item_Class *gic = NULL; static Evas_Object *before_bt, *after_bt; static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } @@ -50,7 +45,7 @@ _on_done(void *data __UNUSED__, static void _horizontal_grid(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; @@ -61,7 +56,7 @@ _horizontal_grid(void *data, static void _always_select_change(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; Eina_Bool always = elm_check_state_get(obj); @@ -79,7 +74,7 @@ _always_select_change(void *data, static void _bouncing_change(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; Eina_Bool bounce = elm_check_state_get(obj); @@ -94,7 +89,7 @@ _bouncing_change(void *data, static void _multi_change(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; Eina_Bool multi = elm_check_state_get(obj); @@ -120,7 +115,7 @@ _multi_change(void *data, static void _no_sel_change(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; Eina_Bool no_sel = elm_check_state_get(obj); @@ -137,7 +132,7 @@ _no_sel_change(void *data, /* item selection callback */ static void _grid_sel(void *data, - Evas_Object *obj __UNUSED__, + Evas_Object *obj, void *event_info) { unsigned int x, y; @@ -164,8 +159,8 @@ _item_new(void) /* "insert before" callback */ static void _before_bt_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Example_Item *it; Evas_Object *grid = data; @@ -182,8 +177,8 @@ _before_bt_clicked(void *data, /* "insert after" callback */ static void _after_bt_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Example_Item *it; Evas_Object *grid = data; @@ -200,8 +195,8 @@ _after_bt_clicked(void *data, /* prepend an item */ static void _prepend_bt_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Example_Item *it; Evas_Object *grid = data; @@ -213,8 +208,8 @@ _prepend_bt_clicked(void *data, /* append an item */ static void _append_bt_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Evas_Object *grid = data; Example_Item *it = _item_new(); @@ -225,8 +220,8 @@ _append_bt_clicked(void *data, /* delete items */ static void _clear_cb(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_gengrid_clear(data); @@ -236,8 +231,8 @@ _clear_cb(void *data, /* bring in 1st item */ static void _bring_1st_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data); @@ -249,8 +244,8 @@ _bring_1st_clicked(void *data, /* show last item */ static void _show_last_clicked(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data); @@ -262,8 +257,8 @@ _show_last_clicked(void *data, /* disable selected item */ static void _toggle_disabled_cb(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data); @@ -277,7 +272,7 @@ _toggle_disabled_cb(void *data, static void _size_changed(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { Evas_Object *grid = data; int size = elm_spinner_value_get(obj); @@ -287,8 +282,8 @@ _size_changed(void *data, /* item double click callback */ static void -_double_click(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_double_click(void *data, + Evas_Object *obj, void *event_info) { fprintf(stdout, "Double click on item with handle %p\n", event_info); @@ -296,8 +291,8 @@ _double_click(void *data __UNUSED__, /* item long press callback */ static void -_long_pressed(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_long_pressed(void *data, + Evas_Object *obj, void *event_info) { fprintf(stdout, "Long press on item with handle %p\n", event_info); @@ -307,8 +302,8 @@ _long_pressed(void *data __UNUSED__, /* label fetching callback */ static char * _grid_label_get(void *data, - Evas_Object *obj __UNUSED__, - const char *part __UNUSED__) + Evas_Object *obj, + const char *part) { const Example_Item *it = data; char buf[256]; @@ -353,9 +348,9 @@ _grid_content_get(void *data, /* state fetching callback */ static Eina_Bool -_grid_state_get(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - const char *part __UNUSED__) +_grid_state_get(void *data, + Evas_Object *obj, + const char *part) { return EINA_FALSE; } @@ -363,7 +358,7 @@ _grid_state_get(void *data __UNUSED__, /* deletion callback */ static void _grid_del(void *data, - Evas_Object *obj __UNUSED__) + Evas_Object *obj) { Example_Item *it = data; @@ -373,9 +368,9 @@ _grid_del(void *data, /* scrolling animation stopped callback */ static void -_grid_scroll_stopped_cb(void *data __UNUSED__, +_grid_scroll_stopped_cb(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { int h_pagenumber = 0, v_pagenumber = 0; elm_gengrid_current_page_get(obj, &h_pagenumber, &v_pagenumber); @@ -387,7 +382,7 @@ _grid_scroll_stopped_cb(void *data __UNUSED__, static void _h_align_change_cb(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { double v_align; double val = elm_slider_value_get(obj); @@ -401,7 +396,7 @@ _h_align_change_cb(void *data, static void _v_align_change_cb(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { double h_align; double val = elm_slider_value_get(obj); @@ -416,7 +411,7 @@ _v_align_change_cb(void *data, static void _page_change_cb(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { double val = elm_slider_value_get(obj); @@ -426,8 +421,8 @@ _page_change_cb(void *data, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *grid, *bx, *hbx_1, *hbx_2, *hbx_3, *bt, *ck, *sl, *sp; diff --git a/src/examples/genlist_example_01.c b/src/examples/genlist_example_01.c index 3ee6a8d..d28858d 100644 --- a/src/examples/genlist_example_01.c +++ b/src/examples/genlist_example_01.c @@ -2,18 +2,13 @@ //gcc -g `pkg-config --cflags --libs elementary` genlist_example_01.c -o genlist_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define N_ITEMS 30 static Elm_Genlist_Item_Class *_itc = NULL; static char * -_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__) +_item_label_get(void *data, Evas_Object *obj, const char *part) { char buf[256]; snprintf(buf, sizeof(buf), "Item # %i", (int)(long)data); @@ -21,7 +16,7 @@ _item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUS } static Evas_Object * -_item_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_item_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -40,7 +35,7 @@ _item_sel_cb(void *data, Evas_Object *obj, void *event_info) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; Evas_Object *list; diff --git a/src/examples/genlist_example_02.c b/src/examples/genlist_example_02.c index 6323c6e..019c236 100644 --- a/src/examples/genlist_example_02.c +++ b/src/examples/genlist_example_02.c @@ -1,20 +1,15 @@ //Compile with: //gcc -g `pkg-config --cflags --libs elementary` genlist_example_02.c -o genlist_example_02 -#include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif +#include #define N_ITEMS 300 static Elm_Genlist_Item_Class *_itc = NULL; static char * -_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__) +_item_label_get(void *data, Evas_Object *obj, const char *part) { time_t t = (time_t)ecore_time_unix_get(); char buf[256]; @@ -32,7 +27,7 @@ _item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUS } static Evas_Object * -_item_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_item_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -51,7 +46,7 @@ _item_sel_cb(void *data, Evas_Object *obj, void *event_info) } static void -_show_status_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_show_status_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Evas_Coord x, y, w, h, mx, my; @@ -82,14 +77,14 @@ _show_status_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED } static void -_realize_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_realize_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; elm_genlist_realized_items_update(list); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *box, *hbox; Evas_Object *list, *btn; diff --git a/src/examples/genlist_example_03.c b/src/examples/genlist_example_03.c index 755c900..4b2a28a 100644 --- a/src/examples/genlist_example_03.c +++ b/src/examples/genlist_example_03.c @@ -2,18 +2,13 @@ //gcc -g `pkg-config --cflags --libs elementary` genlist_example_03.c -o genlist_example_03 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define N_ITEMS 30 static Elm_Genlist_Item_Class *_itc = NULL; static char * -_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) +_item_label_get(void *data, Evas_Object *obj, const char *part) { time_t t = (time_t)ecore_time_unix_get(); char buf[256]; @@ -33,7 +28,7 @@ _item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) } static Evas_Object * -_item_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_item_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -79,7 +74,7 @@ _genlist_fill(Evas_Object *list) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *box; Evas_Object *list; diff --git a/src/examples/genlist_example_04.c b/src/examples/genlist_example_04.c index 785e7f4..c9b5d1a 100644 --- a/src/examples/genlist_example_04.c +++ b/src/examples/genlist_example_04.c @@ -2,11 +2,6 @@ //gcc -g `pkg-config --cflags --libs elementary` genlist_example_04.c -o genlist_example_04 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define N_ITEMS 300 @@ -15,7 +10,7 @@ static Elm_Genlist_Item_Class *_itc_group = NULL; static int nitems = 0; static char * -_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) +_item_label_get(void *data, Evas_Object *obj, const char *part) { time_t t = (time_t)ecore_time_unix_get(); char buf[256]; @@ -35,7 +30,7 @@ _item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) } static Evas_Object * -_item_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_item_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -54,7 +49,7 @@ _item_sel_cb(void *data, Evas_Object *obj, void *event_info) } static char * -_group_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__) +_group_label_get(void *data, Evas_Object *obj, const char *part) { char buf[256]; int i = (int)(long)data; @@ -65,7 +60,7 @@ _group_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNU } static Evas_Object * -_group_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part __UNUSED__) +_group_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -77,7 +72,7 @@ _group_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part __U } static void -_append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_append_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; @@ -89,7 +84,7 @@ _append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_prepend_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_prepend_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; @@ -101,7 +96,7 @@ _prepend_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_insert_before_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_insert_before_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -116,7 +111,7 @@ _insert_before_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUS } static void -_insert_after_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_insert_after_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -131,7 +126,7 @@ _insert_after_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSE } static void -_next_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_next_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -144,7 +139,7 @@ _next_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_prev_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_prev_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -157,7 +152,7 @@ _prev_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_bring_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_bring_in_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -166,7 +161,7 @@ _bring_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_show_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -175,7 +170,7 @@ _show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_middle_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_middle_in_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -184,7 +179,7 @@ _middle_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__ } static void -_middle_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_middle_show_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -193,7 +188,7 @@ _middle_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED } static void -_top_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_top_in_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -202,7 +197,7 @@ _top_in_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_top_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_top_show_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = data; if (!glit) return; @@ -211,7 +206,7 @@ _top_show_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_realize_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_realize_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -237,7 +232,7 @@ _button_add(Evas_Object *list, Evas_Object *box, const char *label, Evas_Smart_C } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *box, *fbox; Evas_Object *list; diff --git a/src/examples/genlist_example_05.c b/src/examples/genlist_example_05.c index 850c1c1..58dcf62 100644 --- a/src/examples/genlist_example_05.c +++ b/src/examples/genlist_example_05.c @@ -2,11 +2,6 @@ //gcc -g `pkg-config --cflags --libs elementary` genlist_example_05.c -o genlist_example_05 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define N_ITEMS 6 @@ -23,7 +18,7 @@ static Elm_Genlist_Item_Class *_itfav = NULL; static int nitems = 0; static char * -_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) +_item_label_get(void *data, Evas_Object *obj, const char *part) { char buf[256]; Node_Data *d = data; @@ -35,7 +30,7 @@ _item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) } static Evas_Object * -_item_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_item_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -54,7 +49,7 @@ _item_sel_cb(void *data, Evas_Object *obj, void *event_info) } static char * -_parent_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__) +_parent_label_get(void *data, Evas_Object *obj, const char *part) { char buf[256]; Node_Data *d = data; @@ -66,7 +61,7 @@ _parent_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UN } static Evas_Object * -_parent_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part __UNUSED__) +_parent_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -78,7 +73,7 @@ _parent_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part __ } static char * -_favorite_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) +_favorite_label_get(void *data, Evas_Object *obj, const char *part) { char buf[256]; Node_Data *d = data; @@ -90,7 +85,7 @@ _favorite_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part) } static Evas_Object * -_favorite_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) +_favorite_content_get(void *data, Evas_Object *obj, const char *part) { Evas_Object *ic = elm_icon_add(obj); @@ -102,7 +97,7 @@ _favorite_content_get(void *data __UNUSED__, Evas_Object *obj, const char *part) } static void -_append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_append_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit, *parent = NULL; @@ -132,7 +127,7 @@ _append_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_favorite_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_favorite_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -155,7 +150,7 @@ _favorite_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_add_child_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_add_child_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -215,7 +210,7 @@ _clear_list(Node_Data *d) } static void -_del_item_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_del_item_cb(void *data, Evas_Object *o, void *event_info) { Evas_Object *list = data; Elm_Object_Item *glit = elm_genlist_selected_item_get(list); @@ -238,7 +233,7 @@ _del_item_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) } static void -_expand_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) +_expand_request_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = event_info; printf("expand request on item: %p\n", event_info); @@ -246,7 +241,7 @@ _expand_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event } static void -_contract_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) +_contract_request_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = event_info; printf("contract request on item: %p\n", event_info); @@ -254,7 +249,7 @@ _contract_request_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *eve } static void -_expanded_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) +_expanded_cb(void *data, Evas_Object *o, void *event_info) { Eina_List *l; Elm_Object_Item *glit = event_info; @@ -285,7 +280,7 @@ _expanded_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) } static void -_contracted_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) +_contracted_cb(void *data, Evas_Object *o, void *event_info) { Elm_Object_Item *glit = event_info; elm_genlist_item_subitems_clear(glit); @@ -308,7 +303,7 @@ _button_add(Evas_Object *list, Evas_Object *box, const char *label, Evas_Smart_C } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *box, *fbox; Evas_Object *list; diff --git a/src/examples/glview_example_01.c b/src/examples/glview_example_01.c index e196393..9fccdd8 100644 --- a/src/examples/glview_example_01.c +++ b/src/examples/glview_example_01.c @@ -11,11 +11,6 @@ #include #include #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct _GLData GLData; diff --git a/src/examples/hover_example_01.c b/src/examples/hover_example_01.c index 536ecd0..e426200 100644 --- a/src/examples/hover_example_01.c +++ b/src/examples/hover_example_01.c @@ -2,26 +2,21 @@ //gcc -o hover_example_01 hover_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_show_hover(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_show_hover(void *data, Evas_Object *obj, void *event_info) { evas_object_show(data); } static void -_hide_hover(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_hide_hover(void *data, Evas_Object *obj, void *event_info) { evas_object_hide(data); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bt, *bt2, *rect, *rect2, *rect3, *hover; diff --git a/src/examples/hoversel_example_01.c b/src/examples/hoversel_example_01.c index 14614ce..540e79d 100644 --- a/src/examples/hoversel_example_01.c +++ b/src/examples/hoversel_example_01.c @@ -2,11 +2,6 @@ //gcc -o hoversel_example_01 hoversel_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _print_items(void *data, Evas_Object *obj, void *event_info); static void _rm_items(void *data, Evas_Object *obj, void *event_info); @@ -15,7 +10,7 @@ static void _free(void *data, Evas_Object *obj, void *event_info); static void _add_item(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *rect, *hoversel; Elm_Object_Item *hoversel_it; @@ -63,7 +58,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_print_items(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_print_items(void *data, Evas_Object *obj, void *event_info) { const Eina_List *items = elm_hoversel_items_get(obj); const Eina_List *l; @@ -74,7 +69,7 @@ _print_items(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED_ } static void -_rm_items(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_rm_items(void *data, Evas_Object *obj, void *event_info) { if(!elm_hoversel_expanded_get(obj)) elm_hoversel_clear(obj); @@ -88,7 +83,7 @@ _sel(void *data, Evas_Object *obj, void *event_info) } static void -_add_item(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_add_item(void *data, Evas_Object *obj, void *event_info) { static int num = 0; char *str = malloc(sizeof(char) * 10); @@ -102,7 +97,7 @@ _add_item(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) } static void -_free(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_free(void *data, Evas_Object *obj, void *event_info) { free(data); } diff --git a/src/examples/icon_example_01.c b/src/examples/icon_example_01.c index 5566ebe..13902f1 100644 --- a/src/examples/icon_example_01.c +++ b/src/examples/icon_example_01.c @@ -2,15 +2,10 @@ //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "." -#endif +#define PACKAGE_DATA_DIR "." EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *icon; const char *path, *group, *name; diff --git a/src/examples/image_example_01.c b/src/examples/image_example_01.c index da52bf0..a6a3cde 100644 --- a/src/examples/image_example_01.c +++ b/src/examples/image_example_01.c @@ -2,15 +2,10 @@ //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "." -#endif +#define PACKAGE_DATA_DIR "." int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *image; char buf[PATH_MAX]; diff --git a/src/examples/index_example_01.c b/src/examples/index_example_01.c index dca66d7..6faafdc 100644 --- a/src/examples/index_example_01.c +++ b/src/examples/index_example_01.c @@ -10,11 +10,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif struct example_data { @@ -30,7 +25,7 @@ static const char *dict[] = \ static void _index_item_del(void *data, - Evas_Object *obj __UNUSED__, + Evas_Object *obj, void *event_info) { fprintf(stdout, "Deleting associated list node (%s). Comparing index " @@ -45,9 +40,9 @@ _index_item_del(void *data, /* delete an index item */ static void -_item_del(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_item_del(void *data, + Evas_Object *obj, + void *event_info) { Elm_Object_Item *iit; Elm_Object_Item *lit = elm_index_selected_item_get(d.index, 0); @@ -64,17 +59,17 @@ _item_del(void *data __UNUSED__, } static void -_item_del_all(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_item_del_all(void *data, + Evas_Object *obj, + void *event_info) { elm_index_item_clear(d.index); } static void -_active_set(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_active_set(void *data, + Evas_Object *obj, + void *event_info) { elm_index_autohide_disabled_set(d.index, !elm_index_autohide_disabled_get(d.index)); @@ -83,15 +78,15 @@ _active_set(void *data __UNUSED__, /* "delay,changed" hook */ static void -_index_changed(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_index_changed(void *data, + Evas_Object *obj, void *event_info) { elm_list_item_bring_in(event_info); } static void -_index_selected(void *data __UNUSED__, +_index_selected(void *data, Evas_Object *obj, void *event_info) { @@ -104,16 +99,16 @@ _index_selected(void *data __UNUSED__, } static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *hbox, *vbox, *bt, *sep; Elm_Object_Item *lit; diff --git a/src/examples/index_example_02.c b/src/examples/index_example_02.c index b9d9d7b..1dec070 100644 --- a/src/examples/index_example_02.c +++ b/src/examples/index_example_02.c @@ -10,12 +10,7 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" static const char *items[] = \ { @@ -30,32 +25,32 @@ static const char *items[] = \ }; static void -_index_changed(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, +_index_changed(void *data, + Evas_Object *obj, void *event_info) { elm_gengrid_item_bring_in(event_info, ELM_GENGRID_ITEM_SCROLLTO_IN); } static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static char * _grid_label_get(void *data, - Evas_Object *obj __UNUSED__, - const char *part __UNUSED__) + Evas_Object *obj, + const char *part) { int idx = (int)data; return strdup(items[idx]); } Evas_Object * -_grid_content_get(void *data __UNUSED__, +_grid_content_get(void *data, Evas_Object *obj, const char *part) { @@ -93,8 +88,8 @@ _index_icmp(const void *data1, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *grid, *idx; Elm_Object_Item *gg_it; diff --git a/src/examples/inwin_example.c b/src/examples/inwin_example.c index 1bd78dc..df7f679 100644 --- a/src/examples/inwin_example.c +++ b/src/examples/inwin_example.c @@ -2,11 +2,6 @@ * gcc -o inwin_example inwin_example.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static Evas_Object *inwin = NULL; static const char *styles[] = { @@ -17,7 +12,7 @@ static const char *styles[] = { static int current_style = 0; static void -_inwin_hide(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_inwin_hide(void *data, Evas_Object *obj, void *event) { if (inwin) { @@ -29,7 +24,7 @@ _inwin_hide(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) } static void -_inwin_destroy(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_inwin_destroy(void *data, Evas_Object *obj, void *event) { if (inwin) { @@ -42,7 +37,7 @@ _inwin_destroy(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) } static void -_btn_click_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_btn_click_cb(void *data, Evas_Object *obj, void *event) { Evas_Object *o, *parent; @@ -90,7 +85,7 @@ _btn_click_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) } static void -_win_del_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_win_del_cb(void *data, Evas_Object *obj, void *event) { if (inwin) { @@ -114,7 +109,7 @@ _screenshot_hack_cb(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *o; diff --git a/src/examples/label_example_01.c b/src/examples/label_example_01.c index c8a4e4a..343f40e 100644 --- a/src/examples/label_example_01.c +++ b/src/examples/label_example_01.c @@ -2,14 +2,9 @@ //gcc -o label_example_01 label_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *label, *label2, *label3, *label4, *label5, *label6; diff --git a/src/examples/layout_example_01.c b/src/examples/layout_example_01.c index 4b959e2..8165d56 100644 --- a/src/examples/layout_example_01.c +++ b/src/examples/layout_example_01.c @@ -2,12 +2,7 @@ //gcc -g `pkg-config --cflags --libs elementary` layout_example_01.c -o layout_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "." -#endif +#define PACKAGE_DATA_DIR "." #define TABLE "example/table" #define BOX "example/box" @@ -17,7 +12,7 @@ static int _box_buttons = 0; static void -_tbl_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) +_tbl_btn_cb(void *data, Evas_Object *btn, void *event_info) { Evas_Object *layout = data; @@ -26,7 +21,7 @@ _tbl_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) } static void -_box_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) +_box_btn_cb(void *data, Evas_Object *btn, void *event_info) { Evas_Object *layout = data; Evas_Object *item; @@ -45,7 +40,7 @@ _box_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) } static void -_swallow_btn_cb(void *data, Evas_Object *btn __UNUSED__, void *event_info __UNUSED__) +_swallow_btn_cb(void *data, Evas_Object *btn, void *event_info) { Evas_Object *layout = data; Evas_Object *item; @@ -57,7 +52,7 @@ _swallow_btn_cb(void *data, Evas_Object *btn __UNUSED__, void *event_info __UNUS } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *icon, *icon2, *bt, *bt2, *layout; Evas_Object *clk; diff --git a/src/examples/layout_example_02.c b/src/examples/layout_example_02.c index c9cd405..937f12c 100644 --- a/src/examples/layout_example_02.c +++ b/src/examples/layout_example_02.c @@ -2,11 +2,6 @@ //gcc -g `pkg-config --cflags --libs elementary` layout_example_02.c -o layout_example_02 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif #define TABLE "example/table" #define BOX "example/box" @@ -20,7 +15,7 @@ struct _App { }; static void -_signal_cb(void *data, Evas_Object *o, const char *emission, const char *source __UNUSED__) +_signal_cb(void *data, Evas_Object *o, const char *emission, const char *source) { struct _App *app = data; Evas_Object *icon = elm_object_part_content_get(o, "elm.swallow.content"); @@ -41,7 +36,7 @@ _signal_cb(void *data, Evas_Object *o, const char *emission, const char *source } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *layout, *icon; struct _App app; diff --git a/src/examples/layout_example_03.c b/src/examples/layout_example_03.c index be70c98..9bed346 100644 --- a/src/examples/layout_example_03.c +++ b/src/examples/layout_example_03.c @@ -2,12 +2,7 @@ //gcc -g `pkg-config --cflags --libs elementary` layout_example_03.c -o layout_example_03 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "." -#endif +#define PACKAGE_DATA_DIR "." #define TITLE "example/title" #define SWALLOW "example/custom" @@ -15,7 +10,7 @@ static Eina_Bool _btn_large = EINA_FALSE; static void -_swallow_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) +_swallow_btn_cb(void *data, Evas_Object *btn, void *event_info) { Evas_Object *layout = data; @@ -34,7 +29,7 @@ _swallow_btn_cb(void *data, Evas_Object *btn, void *event_info __UNUSED__) } static void -_size_changed_cb(void *data __UNUSED__, Evas_Object *layout, const char *emission __UNUSED__, const char *source __UNUSED__) +_size_changed_cb(void *data, Evas_Object *layout, const char *emission, const char *source) { Evas_Object *edje; Evas_Coord w, h; @@ -46,7 +41,7 @@ _size_changed_cb(void *data __UNUSED__, Evas_Object *layout, const char *emissio } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *btn, *layout; diff --git a/src/examples/list_example_01.c b/src/examples/list_example_01.c index f495c95..a500398 100644 --- a/src/examples/list_example_01.c +++ b/src/examples/list_example_01.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *li; unsigned int i; diff --git a/src/examples/list_example_02.c b/src/examples/list_example_02.c index 9c557ea..eb834cc 100644 --- a/src/examples/list_example_02.c +++ b/src/examples/list_example_02.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *li; unsigned int i; diff --git a/src/examples/list_example_03.c b/src/examples/list_example_03.c index 725aff1..0099a91 100644 --- a/src/examples/list_example_03.c +++ b/src/examples/list_example_03.c @@ -10,24 +10,19 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static int counter = 3; static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_prepend_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_prepend_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it; Evas_Object *li = data; @@ -40,7 +35,7 @@ _prepend_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__ } static void -_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it; Evas_Object *li = data; @@ -53,7 +48,7 @@ _add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_ic_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it; Evas_Object *ic, *li = data; @@ -70,14 +65,14 @@ _add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_sel_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it = event_info; printf("Selected label: %s\n", elm_object_item_text_get(list_it)); } static void -_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_func_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it; Evas_Object *li = data; @@ -90,7 +85,7 @@ _add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_sel_data_cb(void *data, Evas_Object *obj, void *event_info) { char *content = data; Elm_Object_Item *list_it = event_info; @@ -99,13 +94,13 @@ _sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) } static void -_free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_free_data(void *data, Evas_Object *obj, void *event_info) { free(data); } static void -_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_data_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *list_it; Evas_Object *li = data; @@ -123,7 +118,7 @@ _add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_del_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item; Evas_Object *li = data; @@ -133,7 +128,7 @@ _del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_unselect_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item; Evas_Object *li = data; @@ -143,7 +138,7 @@ _unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_print_cb(void *data, Evas_Object *obj, void *event_info) { const Eina_List *l, *items; Elm_Object_Item *list_it; @@ -155,14 +150,14 @@ _print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_clear_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *li = data; elm_list_clear(li); } static void -_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_next_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item, *next_item; Evas_Object *li = data; @@ -176,7 +171,7 @@ _select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_insert_after_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item, *list_it; Evas_Object *li = data; @@ -193,7 +188,7 @@ _insert_after_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU } static void -_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_select_prev_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item, *prev_item; Evas_Object *li = data; @@ -207,7 +202,7 @@ _select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_insert_before_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item, *list_it; Evas_Object *li = data; @@ -224,7 +219,7 @@ _insert_before_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN } static void -_set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_set_separator_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item; Evas_Object *li = data; @@ -235,7 +230,7 @@ _set_separator_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN } static void -_disable_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_disable_cb(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *selected_item; Evas_Object *li = data; @@ -246,7 +241,7 @@ _disable_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__ } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *hbx, *li, *bt; diff --git a/src/examples/map_example_01.c b/src/examples/map_example_01.c index f76f125..ba60dd8 100644 --- a/src/examples/map_example_01.c +++ b/src/examples/map_example_01.c @@ -10,14 +10,9 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_in(void *data, Evas_Object *obj, void *ev) { int zoom; elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); @@ -26,7 +21,7 @@ _bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_out(void *data, Evas_Object *obj, void *ev) { int zoom; elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); @@ -35,19 +30,19 @@ _bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) { elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT); } static void -_bt_zoom_fill(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) { elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL); } static void -_on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_on_done(void *data, Evas_Object *obj, void *event_info) { elm_exit(); } @@ -66,7 +61,7 @@ _nasty_hack(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *map, *box, *bt; diff --git a/src/examples/map_example_02.c b/src/examples/map_example_02.c index e6120f1..808f729 100644 --- a/src/examples/map_example_02.c +++ b/src/examples/map_example_02.c @@ -10,11 +10,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct _Overlay_Data { @@ -90,7 +85,7 @@ _box_get(Evas_Object *obj, Overlay_Data *data) } static void -_overlay_cb(void *data __UNUSED__, Evas_Object *map, void *ev) +_overlay_cb(void *data, Evas_Object *map, void *ev) { printf("Overlay clicked\n"); Elm_Map_Overlay *overlay = ev; @@ -106,7 +101,7 @@ _overlay_cb(void *data __UNUSED__, Evas_Object *map, void *ev) } static void -_bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_in(void *data, Evas_Object *obj, void *ev) { Evas_Object *map = data; int zoom; @@ -117,7 +112,7 @@ _bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_out(void *data, Evas_Object *obj, void *ev) { Evas_Object *map = data; int zoom; @@ -128,21 +123,21 @@ _bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) { Evas_Object *map = data; elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_AUTO_FIT); } static void -_bt_zoom_fill(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) { Evas_Object *map = data; elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_AUTO_FILL); } static void -_on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_on_done(void *data, Evas_Object *obj, void *event_info) { elm_exit(); } @@ -161,7 +156,7 @@ _nasty_hack(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *map, *box, *bt; Eina_List *ovls = NULL; diff --git a/src/examples/map_example_03.c b/src/examples/map_example_03.c index b1f5f8b..4e5ad3d 100644 --- a/src/examples/map_example_03.c +++ b/src/examples/map_example_03.c @@ -10,11 +10,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct _Example_Data { @@ -28,7 +23,7 @@ typedef struct _Example_Data static Example_Data example_data; static void -_route_loaded(void *data, Evas_Object *obj, void *ev __UNUSED__) +_route_loaded(void *data, Evas_Object *obj, void *ev) { Example_Data *exam_data = data; @@ -37,7 +32,7 @@ _route_loaded(void *data, Evas_Object *obj, void *ev __UNUSED__) } static void -_name_loaded(void *data, Evas_Object *obj, void *ev __UNUSED__) +_name_loaded(void *data, Evas_Object *obj, void *ev) { Example_Data *exam_data = data; Evas_Object *map = obj; @@ -56,7 +51,7 @@ _name_loaded(void *data, Evas_Object *obj, void *ev __UNUSED__) } static void -_bt_route(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_route(void *data, Evas_Object *obj, void *ev) { Example_Data *exam_data = data; Evas_Object *map; @@ -72,7 +67,7 @@ _bt_route(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_in(void *data, Evas_Object *obj, void *ev) { int zoom; elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); @@ -81,7 +76,7 @@ _bt_zoom_in(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_bt_zoom_out(void *data, Evas_Object *obj, void *ev) { int zoom; elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); @@ -90,19 +85,19 @@ _bt_zoom_out(void *data, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) } static void -_bt_zoom_fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) { elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT); } static void -_bt_zoom_fill(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) { elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL); } static void -_on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_on_done(void *data, Evas_Object *obj, void *event_info) { elm_exit(); } @@ -121,7 +116,7 @@ _nasty_hack(void *data) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *map, *box, *bt, *entry; diff --git a/src/examples/mapbuf_example.c b/src/examples/mapbuf_example.c index ce00cac..f462017 100644 --- a/src/examples/mapbuf_example.c +++ b/src/examples/mapbuf_example.c @@ -9,43 +9,38 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_enabled_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_enabled_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *mb = data; elm_mapbuf_enabled_set(mb, elm_check_state_get(obj)); } static void -_alpha_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_alpha_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *mb = data; elm_mapbuf_alpha_set(mb, elm_check_state_get(obj)); } static void -_smooth_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_smooth_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *mb = data; elm_mapbuf_smooth_set(mb, elm_check_state_get(obj)); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *hbx, *tg, *ck, *mb, *tb, *ic; unsigned int i, j; diff --git a/src/examples/menu_example_01.c b/src/examples/menu_example_01.c index f3a75f3..22703f4 100644 --- a/src/examples/menu_example_01.c +++ b/src/examples/menu_example_01.c @@ -2,14 +2,9 @@ //gcc -g `pkg-config --cflags --libs elementary` menu_example_01.c -o menu_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_del_it(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_del_it(void *data, Evas_Object *obj, void *event_info) { const Eina_List *l; Elm_Object_Item *menu_it = elm_menu_first_item_get(data); @@ -19,7 +14,7 @@ _del_it(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_show(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_show(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Event_Mouse_Down *ev = event_info; elm_menu_move(data, ev->canvas.x, ev->canvas.y); @@ -27,7 +22,7 @@ _show(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *menu, *button, *rect; Elm_Object_Item *menu_it, *menu_it1; diff --git a/src/examples/notify_example_01.c b/src/examples/notify_example_01.c index 87ab6ed..28456f8 100644 --- a/src/examples/notify_example_01.c +++ b/src/examples/notify_example_01.c @@ -2,16 +2,11 @@ //gcc -o notify_example_01 notify_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _hide(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *notify, *content; @@ -78,7 +73,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_hide(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_hide(void *data, Evas_Object *obj, void *event_info) { evas_object_hide(obj); } diff --git a/src/examples/panel_example_01.c b/src/examples/panel_example_01.c index cfe6b40..2017407 100644 --- a/src/examples/panel_example_01.c +++ b/src/examples/panel_example_01.c @@ -2,14 +2,9 @@ //gcc -g `pkg-config --cflags --libs elementary` panel_example_01.c -o panel_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *panel, *content; diff --git a/src/examples/panes_example.c b/src/examples/panes_example.c index e5ee156..4d7533e 100644 --- a/src/examples/panes_example.c +++ b/src/examples/panes_example.c @@ -10,16 +10,11 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } @@ -27,25 +22,25 @@ _on_done(void *data __UNUSED__, static double size = 0.0; static void -_press(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_press(void *data, Evas_Object *obj, void *event_info) { printf("Pressed\n"); } static void -_unpress(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_unpress(void *data, Evas_Object *obj, void *event_info) { printf("Unpressed, size : %f\n", elm_panes_content_left_size_get(obj)); } static void -_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_clicked(void *data, Evas_Object *obj, void *event_info) { printf("Clicked\n"); } static void -_clicked_double(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_clicked_double(void *data, Evas_Object *obj, void *event_info) { if (elm_panes_content_left_size_get(obj) > 0) { @@ -61,7 +56,7 @@ _clicked_double(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUS } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *panes, *panes_h, *bt; diff --git a/src/examples/photocam_example_01.c b/src/examples/photocam_example_01.c index a63fef3..e7ec401 100644 --- a/src/examples/photocam_example_01.c +++ b/src/examples/photocam_example_01.c @@ -3,11 +3,6 @@ //where directory is the path where images/insanely_huge_test_image.jpg can be found. #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _fit(void *data, Evas_Object *obj, void *event_info); static void _unfit(void *data, Evas_Object *obj, void *event_info); @@ -15,7 +10,7 @@ static void _zoom(void *data, Evas_Object *obj, void *event_info); static void _bring_in(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *obj, *photocam; @@ -68,7 +63,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_bring_in(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_bring_in(void *data, Evas_Object *obj, void *event_info) { int w, h; elm_photocam_image_size_get(obj, &w, &h); @@ -76,7 +71,7 @@ _bring_in(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) } static void -_fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_fit(void *data, Evas_Object *obj, void *event_info) { int x, y, w, h; elm_photocam_image_region_get(data, &x, &y, &w, &h); @@ -85,13 +80,13 @@ _fit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) } static void -_unfit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_unfit(void *data, Evas_Object *obj, void *event_info) { elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_MANUAL); } static void -_zoom(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_zoom(void *data, Evas_Object *obj, void *event_info) { double z = elm_slider_value_get(obj) * 8; elm_photocam_zoom_set(data, z); diff --git a/src/examples/popup_example_01.c b/src/examples/popup_example_01.c index 7cdcf67..141317e 100644 --- a/src/examples/popup_example_01.c +++ b/src/examples/popup_example_01.c @@ -2,18 +2,13 @@ //gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" static void _block_clicked(void *data, Evas_Object *obj, void *event_info); static void _timeout(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *popup, *content; @@ -53,14 +48,14 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_block_clicked(void *data __UNUSED__, Evas_Object *obj, - void *event_info __UNUSED__) +_block_clicked(void *data, Evas_Object *obj, + void *event_info) { evas_object_hide(obj); } static void -_timeout(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_timeout(void *data, Evas_Object *obj, void *event_info) { evas_object_hide(obj); } diff --git a/src/examples/popup_example_02.c b/src/examples/popup_example_02.c index 886010f..2a5e030 100644 --- a/src/examples/popup_example_02.c +++ b/src/examples/popup_example_02.c @@ -2,17 +2,12 @@ //gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" static void _response_cb(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *popup, *btn1, *btn2, *btn3, *icon1; char buf[256]; @@ -80,8 +75,8 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_response_cb(void *data, Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_response_cb(void *data, Evas_Object *obj, + void *event_info) { evas_object_del(data); } diff --git a/src/examples/popup_example_03.c b/src/examples/popup_example_03.c index 6bb4198..44741ab 100644 --- a/src/examples/popup_example_03.c +++ b/src/examples/popup_example_03.c @@ -2,18 +2,13 @@ //gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" static void _item_selected_cb(void *data, Evas_Object *obj, void *event_info); static void _response_cb(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *popup, *btn1, *btn2, *icon1; Elm_Object_Item *popup_it1; @@ -90,15 +85,15 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_item_selected_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, +_item_selected_cb(void *data, Evas_Object *obj, void *event_info) { printf("popup item selected: %s\n", elm_object_item_text_get(event_info)); } static void -_response_cb(void *data, Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_response_cb(void *data, Evas_Object *obj, + void *event_info) { evas_object_hide(data); } diff --git a/src/examples/progressbar_example.c b/src/examples/progressbar_example.c index 9791961..9d92312 100644 --- a/src/examples/progressbar_example.c +++ b/src/examples/progressbar_example.c @@ -10,11 +10,6 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif typedef struct Progressbar_Example { @@ -33,7 +28,7 @@ typedef struct Progressbar_Example static Progressbar_Example example_data; static Eina_Bool -_progressbar_example_value_set(void *data __UNUSED__) +_progressbar_example_value_set(void *data) { double progress; @@ -54,9 +49,9 @@ _progressbar_example_value_set(void *data __UNUSED__) } static void -_progressbar_example_start(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_progressbar_example_start(void *data, + Evas_Object *obj, + void *event_info) { elm_progressbar_pulse(example_data.pb2, EINA_TRUE); elm_progressbar_pulse(example_data.pb5, EINA_TRUE); @@ -72,9 +67,9 @@ _progressbar_example_start(void *data __UNUSED__, /* end of show */ static void -_progressbar_example_stop(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_progressbar_example_stop(void *data, + Evas_Object *obj, + void *event_info) { elm_progressbar_pulse(example_data.pb2, EINA_FALSE); elm_progressbar_pulse(example_data.pb5, EINA_FALSE); @@ -88,17 +83,17 @@ _progressbar_example_stop(void *data __UNUSED__, } static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { _progressbar_example_stop(NULL, NULL, NULL); elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2; char buf[PATH_MAX]; diff --git a/src/examples/radio_example_01.c b/src/examples/radio_example_01.c index b030d5d..afeb8ca 100644 --- a/src/examples/radio_example_01.c +++ b/src/examples/radio_example_01.c @@ -2,18 +2,13 @@ //gcc -g `pkg-config --cflags --libs elementary` radio_example_01.c -o radio_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static int val = 1; static void _cb(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *radio, *group, *ic; @@ -89,7 +84,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_MAIN() static void -_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_cb(void *data, Evas_Object *obj, void *event_info) { printf("val is now: %d\n", val); } diff --git a/src/examples/scroller_example_01.c b/src/examples/scroller_example_01.c index 4239f05..1e17a13 100644 --- a/src/examples/scroller_example_01.c +++ b/src/examples/scroller_example_01.c @@ -2,11 +2,6 @@ //gcc -g `pkg-config --cflags --libs elementary` scroller_example_01.c -o scroller_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static const char *text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse bibendum, nibh eget vehicula tempus, libero dui aliquam dui, eget pellentesque nulla est id mi. Sed orci nisl, mattis vitae dignissim scelerisque, imperdiet vel arcu. Integer ut libero id massa commodo dignissim sed at orci. Quisque sollicitudin eleifend malesuada. Donec orci orci, mollis quis euismod vel, tincidunt nec ipsum. Sed ut nulla ligula, ut commodo tellus. Duis non felis in odio fringilla venenatis eget in metus. Mauris molestie ipsum tortor. Suspendisse potenti. Curabitur facilisis ultricies cursus. In euismod viverra risus sit amet pharetra. Sed mauris lorem, volutpat a vehicula quis, interdum nec erat. Suspendisse auctor bibendum fringilla. Curabitur tincidunt sem risus.\
\ @@ -109,7 +104,7 @@ Aliquam diam leo, ultrices a sodales sed, laoreet id purus. Nullam eleifend leo Nam scelerisque nulla ut neque tempor blandit volutpat nisl vehicula. Nam orci enim, luctus ut venenatis et, egestas id nunc. Phasellus risus sem, scelerisque sed vestibulum a, aliquam at sem. Sed venenatis tristique nisi id eleifend. Morbi urna tellus, cursus ac porttitor rhoncus, commodo at mi. Mauris ac magna nisi. Maecenas rutrum lobortis sapien, sed dapibus neque hendrerit a. Aliquam fringilla lectus nec arcu tempor et molestie dui suscipit. Proin et felis velit, vel pellentesque ligula. Donec tempus, mi at mollis porttitor, mauris urna congue elit, at varius nisi elit et est. Quisque eu libero lorem, eget tincidunt velit. Nullam hendrerit metus quis urna adipiscing quis tristique tortor condimentum. Integer iaculis scelerisque sem, vitae consectetur lorem facilisis eu. Phasellus consectetur blandit auctor. Morbi eleifend mollis ipsum, id facilisis leo euismod ut. Nunc id est tellus."; EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *label, *scroller; diff --git a/src/examples/segment_control_example.c b/src/examples/segment_control_example.c index cc5b3ca..926494a 100644 --- a/src/examples/segment_control_example.c +++ b/src/examples/segment_control_example.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *sc, *ic; Elm_Object_Item *seg_it; diff --git a/src/examples/separator_example_01.c b/src/examples/separator_example_01.c index 937838d..df2e1b8 100644 --- a/src/examples/separator_example_01.c +++ b/src/examples/separator_example_01.c @@ -2,14 +2,9 @@ //gcc -g `pkg-config --cflags --libs elementary` separator_example_01.c -o separator_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *rect, *separator; diff --git a/src/examples/slider_example.c b/src/examples/slider_example.c index 934432e..9648bd9 100644 --- a/src/examples/slider_example.c +++ b/src/examples/slider_example.c @@ -10,29 +10,24 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_changed_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_changed_cb(void *data, Evas_Object *obj, void *event_info) { double val = elm_slider_value_get(obj); printf("Changed to %1.2f\n", val); } static void -_delay_changed_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_delay_changed_cb(void *data, Evas_Object *obj, void *event_info) { double val = elm_slider_value_get(obj); printf("Delay changed to %1.2f\n", val); @@ -53,7 +48,7 @@ _indicator_free(char *str) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *sl, *ic; diff --git a/src/examples/slideshow_example.c b/src/examples/slideshow_example.c index a44768e..1f09210 100644 --- a/src/examples/slideshow_example.c +++ b/src/examples/slideshow_example.c @@ -10,17 +10,12 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "../../data" -#endif +#define PACKAGE_DATA_DIR "../../data" static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } @@ -40,9 +35,9 @@ static const char *img9 = PACKAGE_DATA_DIR "/images/mystrale_2.jpg"; static void _notify_show(void *data, - Evas *e __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas *e, + Evas_Object *obj, + void *event_info) { evas_object_show(data); } @@ -50,41 +45,41 @@ _notify_show(void *data, /* jump to next item, cyclically */ static void _next(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_slideshow_next(data); } static void _previous(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_slideshow_previous(data); } static void _first(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_slideshow_item_show(data); } static void _last(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_slideshow_item_show(data); } static void _mouse_in(void *data, - Evas *e __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas *e, + Evas_Object *obj, + void *event_info) { elm_notify_timeout_set(data, 0.0); evas_object_show(data); @@ -92,9 +87,9 @@ _mouse_in(void *data, static void _mouse_out(void *data, - Evas *e __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas *e, + Evas_Object *obj, + void *event_info) { elm_notify_timeout_set(data, 3.0); } @@ -103,7 +98,7 @@ _mouse_out(void *data, static void _transition_select(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { elm_slideshow_transition_set(slideshow, data); elm_object_text_set(obj, data); @@ -112,7 +107,7 @@ _transition_select(void *data, static void _layout_select(void *data, Evas_Object *obj, - void *event_info __UNUSED__) + void *event_info) { elm_slideshow_layout_set(slideshow, data); elm_object_text_set(obj, data); @@ -121,8 +116,8 @@ _layout_select(void *data, /* start the show! */ static void _start(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { elm_slideshow_timeout_set(slideshow, elm_spinner_value_get(data)); @@ -131,9 +126,9 @@ _start(void *data, } static void -_stop(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_stop(void *data, + Evas_Object *obj, + void *event_info) { elm_slideshow_timeout_set(slideshow, 0.0); elm_object_disabled_set(bt_start, EINA_FALSE); @@ -143,8 +138,8 @@ _stop(void *data __UNUSED__, /* slideshow transition time has changed */ static void _spin(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + Evas_Object *obj, + void *event_info) { if (elm_slideshow_timeout_get(slideshow) > 0) elm_slideshow_timeout_set(slideshow, elm_spinner_value_get(data)); @@ -180,8 +175,8 @@ _cmp_func(const void *data1, } EAPI_MAIN int -elm_main(int argc __UNUSED__, - char **argv __UNUSED__) +elm_main(int argc, + char **argv) { Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin; Elm_Object_Item *slide_first, *slide_last, *slide_it; diff --git a/src/examples/spinner_example.c b/src/examples/spinner_example.c index 8990b12..22342a8 100644 --- a/src/examples/spinner_example.c +++ b/src/examples/spinner_example.c @@ -10,34 +10,29 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_changed_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_changed_cb(void *data, Evas_Object *obj, void *event_info) { printf("Value changed to %0.f\n", elm_spinner_value_get(obj)); } static void -_delay_changed_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_delay_changed_cb(void *data, Evas_Object *obj, void *event_info) { printf("Value delay changed to %0.f\n", elm_spinner_value_get(obj)); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *sp; diff --git a/src/examples/table_example_01.c b/src/examples/table_example_01.c index 1e5ae04..ee9892f 100644 --- a/src/examples/table_example_01.c +++ b/src/examples/table_example_01.c @@ -2,14 +2,9 @@ //gcc -g `pkg-config --cflags --libs elementary` table_example_01.c -o table_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *label, *table; diff --git a/src/examples/table_example_02.c b/src/examples/table_example_02.c index 1e28685..cde6888 100644 --- a/src/examples/table_example_02.c +++ b/src/examples/table_example_02.c @@ -2,14 +2,9 @@ //gcc -g `pkg-config --cflags --libs elementary` table_example_02.c -o table_example_02 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *rect, *table; diff --git a/src/examples/theme_example_01.c b/src/examples/theme_example_01.c index 1c1b5b4..e848297 100644 --- a/src/examples/theme_example_01.c +++ b/src/examples/theme_example_01.c @@ -2,14 +2,9 @@ * gcc -o theme_example_01 theme_example_01.c `pkg-config --cflags --libs elementary` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -btn_extension_click_cb(void *data __UNUSED__, Evas_Object *btn, void *ev __UNUSED__) +btn_extension_click_cb(void *data, Evas_Object *btn, void *ev) { const char *lbl = elm_object_text_get(btn); @@ -26,7 +21,7 @@ btn_extension_click_cb(void *data __UNUSED__, Evas_Object *btn, void *ev __UNUSE } static void -btn_style_click_cb(void *data __UNUSED__, Evas_Object *btn, void *ev __UNUSED__) +btn_style_click_cb(void *data, Evas_Object *btn, void *ev) { const char *styles[] = { "chucknorris", @@ -40,7 +35,7 @@ btn_style_click_cb(void *data __UNUSED__, Evas_Object *btn, void *ev __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *btn; diff --git a/src/examples/theme_example_02.c b/src/examples/theme_example_02.c index 244eabd..acab9d7 100644 --- a/src/examples/theme_example_02.c +++ b/src/examples/theme_example_02.c @@ -2,14 +2,9 @@ * gcc -o theme_example_02 theme_example_02.c `pkg-config --cflags --libs elememntaru` */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_btn_clicked_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ev __UNUSED__) +_btn_clicked_cb(void *data, Evas_Object *obj, void *ev) { static int loaded = 1; if (loaded) @@ -20,7 +15,7 @@ _btn_clicked_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ev __U } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *btn; diff --git a/src/examples/thumb_example_01.c b/src/examples/thumb_example_01.c index c111ab8..9061cad 100644 --- a/src/examples/thumb_example_01.c +++ b/src/examples/thumb_example_01.c @@ -2,33 +2,28 @@ //gcc -g `pkg-config --cflags --libs elementary` thumb_example_01.c -o thumb_example_01 #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -# define PACKAGE_DATA_DIR "." -#endif +#define PACKAGE_DATA_DIR "." static void -_generation_started_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_generation_started_cb(void *data, Evas_Object *o, void *event_info) { printf("thumbnail generation started.\n"); } static void -_generation_finished_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_generation_finished_cb(void *data, Evas_Object *o, void *event_info) { printf("thumbnail generation finished.\n"); } static void -_generation_error_cb(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_generation_error_cb(void *data, Evas_Object *o, void *event_info) { printf("thumbnail generation error.\n"); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg; Evas_Object *thumb; diff --git a/src/examples/toolbar_example_01.c b/src/examples/toolbar_example_01.c index 855627f..a55cc23 100644 --- a/src/examples/toolbar_example_01.c +++ b/src/examples/toolbar_example_01.c @@ -10,36 +10,31 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_item_1_pressed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_item_1_pressed(void *data, Evas_Object *obj, void *event_info) { Evas_Object *bt = data; elm_object_text_set(bt, "Print Document"); } static void -_item_2_pressed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_item_2_pressed(void *data, Evas_Object *obj, void *event_info) { Evas_Object *bt = data; elm_object_text_set(bt, "Create new folder"); } static void -_item_3_pressed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_item_3_pressed(void *data, Evas_Object *obj, void *event_info) { /* This function won't be called because we disabled item that call it */ Evas_Object *bt = data; @@ -47,7 +42,7 @@ _item_3_pressed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *tb, *bt; Elm_Object_Item *tb_it; diff --git a/src/examples/toolbar_example_02.c b/src/examples/toolbar_example_02.c index 5e0437b..7f4735c 100644 --- a/src/examples/toolbar_example_02.c +++ b/src/examples/toolbar_example_02.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } static void -_item_pressed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_item_pressed(void *data, Evas_Object *obj, void *event_info) { Elm_Object_Item *tb_it = event_info; elm_toolbar_item_state_set(tb_it, elm_toolbar_item_state_next(tb_it)); @@ -33,7 +28,7 @@ _item_pressed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *tb, *bt; Elm_Object_Item *tb_it; diff --git a/src/examples/toolbar_example_03.c b/src/examples/toolbar_example_03.c index 0314629..5206bd1 100644 --- a/src/examples/toolbar_example_03.c +++ b/src/examples/toolbar_example_03.c @@ -10,22 +10,17 @@ */ #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -_on_done(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) +_on_done(void *data, + Evas_Object *obj, + void *event_info) { elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bx, *tb, *bt, *menu; Elm_Object_Item *tb_it; diff --git a/src/examples/transit_example_01.c b/src/examples/transit_example_01.c index a18b15c..26323c9 100644 --- a/src/examples/transit_example_01.c +++ b/src/examples/transit_example_01.c @@ -2,21 +2,16 @@ //gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bt; Elm_Transit *trans; diff --git a/src/examples/transit_example_02.c b/src/examples/transit_example_02.c index 28695a5..c00e83a 100644 --- a/src/examples/transit_example_02.c +++ b/src/examples/transit_example_02.c @@ -2,14 +2,9 @@ //gcc -o transit_example_02 transit_example_02.c `pkg-config --cflags --libs elementary` #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *bt, *bt2, *bt3, *bt4; Elm_Transit *trans, *trans2, *trans3, *trans4; diff --git a/src/examples/transit_example_03.c b/src/examples/transit_example_03.c index c0671ef..4a3fb36 100644 --- a/src/examples/transit_example_03.c +++ b/src/examples/transit_example_03.c @@ -3,11 +3,6 @@ //where directory is the a path where images/icon_07.png can be found. #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif /* structure to hold context for many callbacks */ struct Context { @@ -83,7 +78,7 @@ static struct { }; static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); @@ -104,7 +99,7 @@ _checkbox_transition_add(Evas_Object *box, const char *label, Eina_Bool *checked } static void -_transit_start(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_transit_start(void *data, Evas_Object *o, void *event_info) { Elm_Transit *trans = NULL; int i; @@ -142,14 +137,14 @@ _transit_start(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED_ /* callback useful just to know whether we can receive events from the * object or not */ static void -_object_clicked(void *data __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_object_clicked(void *data, Evas_Object *o, void *event_info) { printf("object clicked!\n"); } /* update our context with the given value for repeat count */ static void -_cb_repeat_changed(void *data, Evas_Object *obj, void *event __UNUSED__) +_cb_repeat_changed(void *data, Evas_Object *obj, void *event) { int *repeat_cnt = data; @@ -158,7 +153,7 @@ _cb_repeat_changed(void *data, Evas_Object *obj, void *event __UNUSED__) /* update our context with the given tween mode for the transition */ static void -_cb_tween_changed(void *data, Evas_Object *obj, void *event __UNUSED__) +_cb_tween_changed(void *data, Evas_Object *obj, void *event) { Elm_Transit_Tween_Mode *mode = data; double val = 0.0; @@ -175,7 +170,7 @@ _cb_tween_changed(void *data, Evas_Object *obj, void *event __UNUSED__) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *vbox2, *hbox, *btn; Evas_Object *cbox, *dummy, *spinner; diff --git a/src/examples/transit_example_04.c b/src/examples/transit_example_04.c index 9e5dcdf..62af7dc 100644 --- a/src/examples/transit_example_04.c +++ b/src/examples/transit_example_04.c @@ -3,11 +3,6 @@ //where directory is the a path where images/icon_07.png can be found. #include -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ -#endif static void _transit_flip(Elm_Transit *trans) @@ -47,7 +42,7 @@ static struct { }; static void -on_done(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_done(void *data, Evas_Object *obj, void *event_info) { /* quit the mainloop (elm_run) */ elm_exit(); @@ -66,7 +61,7 @@ _checkbox_transition_add(Evas_Object *box, const char *label, Eina_Bool *checked } static void -_transit_start(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_transit_start(void *data, Evas_Object *o, void *event_info) { Elm_Transit *trans = NULL; Eina_List *objs = data, *l; @@ -91,7 +86,7 @@ _transit_start(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED_ } EAPI_MAIN int -elm_main(int argc __UNUSED__, char **argv __UNUSED__) +elm_main(int argc, char **argv) { Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *btn, *dummy; Eina_List *objs = NULL; diff --git a/src/examples/web_example.c b/src/examples/web_example.c index 9d8d640..0158315 100644 --- a/src/examples/web_example.c +++ b/src/examples/web_example.c @@ -7,11 +7,6 @@ #ifdef HAVE_ELEMENTARY_WEB #include #endif -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -#endif typedef struct _Tab_Data Tab_Data; @@ -79,7 +74,7 @@ tab_current_set(Tab_Data *td) } static void -_tab_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_tab_clicked_cb(void *data, Evas_Object *obj, void *event_info) { Tab_Data *td = data; /* the first toolbar_item_append() calls the select callback before the item @@ -90,7 +85,7 @@ _tab_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) } static void -_title_changed_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_title_changed_cb(void *data, Evas_Object *obj, void *event_info) { Tab_Data *td = data; const char *title = event_info; @@ -102,7 +97,7 @@ _title_changed_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) } static void -_uri_changed_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) +_uri_changed_cb(void *data, Evas_Object *obj, void *event_info) { Tab_Data *td = data; const char *uri = event_info; @@ -115,7 +110,7 @@ _uri_changed_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) } static void -_web_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_web_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Tab_Data *td = data; @@ -126,7 +121,7 @@ _web_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void * } static void -_tb_item_del_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_tb_item_del_cb(void *data, Evas_Object *obj, void *event_info) { Tab_Data *td = data; if (!td->app->exiting && !elm_toolbar_selected_item_get(obj)) @@ -216,7 +211,7 @@ tab_uri_set(Tab_Data *td, const char *uri) } static void -_url_activated_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_url_activated_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; Tab_Data *td; @@ -231,7 +226,7 @@ _url_activated_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) } static void -_nav_back_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_nav_back_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; @@ -239,7 +234,7 @@ _nav_back_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_ } static void -_nav_refresh_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_nav_refresh_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; const Evas_Modifier *mods = evas_key_modifier_get(evas_object_evas_get(obj)); @@ -251,7 +246,7 @@ _nav_refresh_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) } static void -_nav_fwd_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_nav_fwd_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; @@ -259,7 +254,7 @@ _nav_fwd_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__ } static void -_close_tab_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_close_tab_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; @@ -269,7 +264,7 @@ _close_tab_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED } static void -_add_tab_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_add_tab_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; tab_add(ad); @@ -277,7 +272,7 @@ _add_tab_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__ } static Evas_Object * -_web_create_window_cb(void *data, Evas_Object *obj __UNUSED__, Eina_Bool js __UNUSED__, const Elm_Web_Window_Features *wf __UNUSED__) +_web_create_window_cb(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *wf) { App_Data *ad = data; Tab_Data *td; @@ -287,20 +282,20 @@ _web_create_window_cb(void *data, Evas_Object *obj __UNUSED__, Eina_Bool js __UN } static void -_win_del_request_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_win_del_request_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; ad->exiting = EINA_TRUE; } static void -_win_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_win_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { free(data); } static void -_search_entry_changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_search_entry_changed_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; const char *text; @@ -314,7 +309,7 @@ _search_entry_changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED } static void -_search_entry_activate_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +_search_entry_activate_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; const char *text; @@ -325,7 +320,7 @@ _search_entry_activate_cb(void *data, Evas_Object *obj, void *event_info __UNUSE } static void -_search_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_search_next_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; const char *text; @@ -336,7 +331,7 @@ _search_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_search_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_search_prev_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; const char *text; @@ -347,14 +342,14 @@ _search_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS } static void -_search_close_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_search_close_cb(void *data, Evas_Object *obj, void *event_info) { App_Data *ad = data; evas_object_del(ad->search_box); } static void -_search_box_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_search_box_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { App_Data *ad = data; ad->search_box = NULL; @@ -362,7 +357,7 @@ _search_box_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, } static void -_win_search_trigger_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_win_search_trigger_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Event_Key_Down *ev = event_info; App_Data *ad = data; @@ -465,7 +460,7 @@ default_content_set(Evas_Object *web) } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *bg, *box, *box2, *btn, *ic, *url, *naviframe, *tabs, *web; Evas *e; diff --git a/src/examples/win_example.c b/src/examples/win_example.c index 48e0952..8f0fa63 100644 --- a/src/examples/win_example.c +++ b/src/examples/win_example.c @@ -1,81 +1,75 @@ /* * gcc -o win_example win_example.c `pkg-config --cflags --libs elementary ecore-x` */ -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#else -# define __UNUSED__ __attribute__((unused)) -# define PACKAGE_DATA_DIR "../../data" -#endif - #ifdef HAVE_ELEMENTARY_X # include #endif #include +#define PACKAGE_DATA_DIR "../../data" static void -_btn_activate_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_activate_cb(void *data, Evas_Object *obj, void *event) { elm_win_activate(data); } static void -_btn_lower_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_lower_cb(void *data, Evas_Object *obj, void *event) { elm_win_lower(data); } static void -_btn_raise_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_raise_cb(void *data, Evas_Object *obj, void *event) { elm_win_raise(data); } static void -_btn_borderless_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_borderless_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_borderless_get(data); elm_win_borderless_set(data, !flag); } static void -_btn_shaped_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_shaped_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_shaped_get(data); elm_win_shaped_set(data, !flag); } static void -_btn_alpha_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_alpha_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_alpha_get(data); elm_win_alpha_set(data, !flag); } static void -_btn_fullscreen_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_fullscreen_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_fullscreen_get(data); elm_win_fullscreen_set(data, !flag); } static void -_btn_maximized_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_maximized_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_maximized_get(data); elm_win_maximized_set(data, !flag); } static void -_btn_iconified_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_iconified_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_iconified_get(data); elm_win_iconified_set(data, !flag); } static void -_btn_rotation_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_rotation_cb(void *data, Evas_Object *obj, void *event) { int angle = elm_win_rotation_get(data); angle = (angle + 90) % 360; @@ -83,7 +77,7 @@ _btn_rotation_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__ } static void -_btn_rotation_resize_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_rotation_resize_cb(void *data, Evas_Object *obj, void *event) { int angle = elm_win_rotation_get(data); angle = (angle + 90) % 360; @@ -91,26 +85,26 @@ _btn_rotation_resize_cb(void *data, Evas_Object *obj __UNUSED__, void *event __U } static void -_btn_sticky_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_btn_sticky_cb(void *data, Evas_Object *obj, void *event) { Eina_Bool flag = elm_win_sticky_get(data); elm_win_sticky_set(data, !flag); } static void -_yes_quit_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_yes_quit_cb(void *data, Evas_Object *obj, void *event) { elm_exit(); } static void -_no_quit_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_no_quit_cb(void *data, Evas_Object *obj, void *event) { evas_object_del(data); } static void -_main_win_del_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__) +_main_win_del_cb(void *data, Evas_Object *obj, void *event) { Evas_Object *msg, *box, *box2, *btn, *lbl, *sep; @@ -160,7 +154,7 @@ _main_win_del_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__ } static void -_force_focus_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_force_focus_cb(void *data, Evas_Object *obj, void *event) { #ifdef HAVE_ELEMENTARY_X Ecore_X_Window xwin = elm_win_xwindow_get(data); @@ -169,14 +163,14 @@ _force_focus_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) } static void -_win_focused_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_win_focused_cb(void *data, Evas_Object *obj, void *event) { const char *name = data; printf("Window focused: %s\n", name); } EAPI_MAIN int -elm_main(int argc __UNUSED__, char *argv[] __UNUSED__) +elm_main(int argc, char *argv[]) { Evas_Object *win, *win2, *bg, *bigbox, *box, *btn, *o; -- 2.7.4