aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-28 23:06:14 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-28 23:30:12 +0900
commitd22076681b5b540a3187a82a4a7d0c9e9210bc3b (patch)
treec5721a8318c7db2a5b2eb57b386354527bf88c80 /legacy/elementary
parentEo: fix macros for table (diff)
downloadefl-d22076681b5b540a3187a82a4a7d0c9e9210bc3b.tar.gz
elm: Fixed formatting about smart_event check for code consistency.
- Made it look clearer. - Removed unnecessary local variables. - Keep the code sequence consistent.
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elc_ctxpopup.c10
-rw-r--r--legacy/elementary/src/lib/elc_multibuttonentry.c9
-rw-r--r--legacy/elementary/src/lib/elc_naviframe.c7
-rw-r--r--legacy/elementary/src/lib/elc_player.c10
-rw-r--r--legacy/elementary/src/lib/elc_popup.c7
-rw-r--r--legacy/elementary/src/lib/elm_button.c7
-rw-r--r--legacy/elementary/src/lib/elm_calendar.c12
-rw-r--r--legacy/elementary/src/lib/elm_check.c8
-rw-r--r--legacy/elementary/src/lib/elm_colorselector.c18
-rw-r--r--legacy/elementary/src/lib/elm_diskselector.c12
-rw-r--r--legacy/elementary/src/lib/elm_flipselector.c15
-rw-r--r--legacy/elementary/src/lib/elm_gengrid.c13
-rw-r--r--legacy/elementary/src/lib/elm_genlist.c12
-rw-r--r--legacy/elementary/src/lib/elm_list.c11
-rw-r--r--legacy/elementary/src/lib/elm_map.c9
-rw-r--r--legacy/elementary/src/lib/elm_panel.c8
-rw-r--r--legacy/elementary/src/lib/elm_photocam.c7
-rw-r--r--legacy/elementary/src/lib/elm_radio.c9
-rw-r--r--legacy/elementary/src/lib/elm_scroller.c9
-rwxr-xr-xlegacy/elementary/src/lib/elm_slider.c11
-rw-r--r--legacy/elementary/src/lib/elm_slideshow.c7
-rw-r--r--legacy/elementary/src/lib/elm_spinner.c17
-rw-r--r--legacy/elementary/src/lib/elm_toolbar.c17
-rw-r--r--legacy/elementary/src/lib/elm_video.c12
-rw-r--r--legacy/elementary/src/lib/elm_web.c9
-rw-r--r--legacy/elementary/src/lib/elm_win.c13
26 files changed, 121 insertions, 158 deletions
diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c
index e4d110c90e..ec6debcd78 100644
--- a/legacy/elementary/src/lib/elc_ctxpopup.c
+++ b/legacy/elementary/src/lib/elc_ctxpopup.c
@@ -115,16 +115,14 @@ static void
_elm_ctxpopup_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void)src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- Evas_Event_Key_Down *ev = event_info;
-
Elm_Ctxpopup_Smart_Data *sd = _pd;
+ if (ret) *ret = EINA_FALSE;
+ (void)src;
+
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elc_multibuttonentry.c b/legacy/elementary/src/lib/elc_multibuttonentry.c
index fcb1ac76fe..b4062d7571 100644
--- a/legacy/elementary/src/lib/elc_multibuttonentry.c
+++ b/legacy/elementary/src/lib/elc_multibuttonentry.c
@@ -809,13 +809,14 @@ static void
_elm_multibuttonentry_smart_event(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void)src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- (void)type;
- void *event_info = va_arg(*list, void *);
- (void)event_info;
+ void *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void)src;
+ (void)type;
+ (void)ev;
// ACCESS
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) return;
diff --git a/legacy/elementary/src/lib/elc_naviframe.c b/legacy/elementary/src/lib/elc_naviframe.c
index 3a729068d4..3bd111c9f7 100644
--- a/legacy/elementary/src/lib/elc_naviframe.c
+++ b/legacy/elementary/src/lib/elc_naviframe.c
@@ -1384,17 +1384,18 @@ _elm_naviframe_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
static void
_elm_naviframe_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
- Evas_Object *source = va_arg(*list, Evas_Object *);
+ Evas_Object *src = va_arg(*list, Evas_Object *);
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
Evas_Event_Key_Down *ev = va_arg(*list, Evas_Event_Key_Down *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Naviframe_Item *it;
- (void) source;
if (ret) *ret = EINA_FALSE;
- if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+ (void)src;
+
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
+ if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (strcmp(ev->key, "BackSpace")) return;
eo_do(obj, elm_obj_naviframe_top_item_get((Elm_Object_Item **)&it));
diff --git a/legacy/elementary/src/lib/elc_player.c b/legacy/elementary/src/lib/elc_player.c
index dafc32c082..481b7e5bb6 100644
--- a/legacy/elementary/src/lib/elc_player.c
+++ b/legacy/elementary/src/lib/elc_player.c
@@ -61,16 +61,14 @@ static void
_elm_player_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- Evas_Event_Key_Down *ev = event_info;
-
Elm_Player_Smart_Data *sd = _pd;
+ if (ret) *ret = EINA_FALSE;
+ (void) src;
+
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c
index 85a4c92fcf..f873cff002 100644
--- a/legacy/elementary/src/lib/elc_popup.c
+++ b/legacy/elementary/src/lib/elc_popup.c
@@ -1438,13 +1438,12 @@ static void
_elm_popup_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void)src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
- Evas_Event_Key_Down *ev = event_info;
+ if (ret) *ret = EINA_FALSE;
+ (void)src;
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
diff --git a/legacy/elementary/src/lib/elm_button.c b/legacy/elementary/src/lib/elm_button.c
index ddbe16526d..77dce221c4 100644
--- a/legacy/elementary/src/lib/elm_button.c
+++ b/legacy/elementary/src/lib/elm_button.c
@@ -169,15 +169,14 @@ static void
_elm_button_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Evas_Event_Key_Down *ev = event_info;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
-
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elm_calendar.c b/legacy/elementary/src/lib/elm_calendar.c
index 9555106651..17bd7f0a48 100644
--- a/legacy/elementary/src/lib/elm_calendar.c
+++ b/legacy/elementary/src/lib/elm_calendar.c
@@ -844,18 +844,16 @@ static void
_elm_calendar_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- Evas_Event_Key_Down *ev = event_info;
-
Elm_Calendar_Smart_Data *sd = _pd;
- if (type != EVAS_CALLBACK_KEY_DOWN) return;
+ if (ret) *ret = EINA_FALSE;
+ (void) src;
+
if (elm_widget_disabled_get(obj)) return;
+ if (type != EVAS_CALLBACK_KEY_DOWN) return;
if ((!strcmp(ev->key, "Prior")) ||
((!strcmp(ev->key, "KP_Prior")) && (!ev->string)))
diff --git a/legacy/elementary/src/lib/elm_check.c b/legacy/elementary/src/lib/elm_check.c
index 869c643750..1e9cc3ffcf 100644
--- a/legacy/elementary/src/lib/elm_check.c
+++ b/legacy/elementary/src/lib/elm_check.c
@@ -145,17 +145,15 @@ static void
_elm_check_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- Evas_Event_Key_Down *ev = event_info;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
-
if (type != EVAS_CALLBACK_KEY_DOWN) return;
-
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if ((strcmp(ev->key, "Return")) &&
diff --git a/legacy/elementary/src/lib/elm_colorselector.c b/legacy/elementary/src/lib/elm_colorselector.c
index 7902c038a2..23294dec65 100644
--- a/legacy/elementary/src/lib/elm_colorselector.c
+++ b/legacy/elementary/src/lib/elm_colorselector.c
@@ -1640,24 +1640,22 @@ _palette_box_vertical_item_get(Eina_List* ref_item, enum Palette_Box_Direction d
static void
_elm_colorselector_smart_event(Eo *obj, void *_pd, va_list *list)
{
+ Evas_Object *src = va_arg(*list, Evas_Object *);
+ Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
+ Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Colorselector_Smart_Data *sd = _pd;
Eina_List *cl = NULL;
Elm_Color_Item *item = NULL;
char colorbar_s[128];
- Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
- Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
- Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
+ (void) src;
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- Evas_Event_Key_Down *ev = event_info;
- Elm_Colorselector_Smart_Data *sd = _pd;
-
- if (!sd) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (elm_widget_disabled_get(obj)) return;
+ if (!sd) return;
if (!sd->selected) sd->selected = sd->items;
if ((!strcmp(ev->key, "Left")) ||
diff --git a/legacy/elementary/src/lib/elm_diskselector.c b/legacy/elementary/src/lib/elm_diskselector.c
index 6308d52b9c..cb97d65c4d 100644
--- a/legacy/elementary/src/lib/elm_diskselector.c
+++ b/legacy/elementary/src/lib/elm_diskselector.c
@@ -950,21 +950,19 @@ static void
_elm_diskselector_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
- Evas_Event_Key_Down *ev = event_info;
+ Elm_Diskselector_Smart_Data *sd = _pd;
Elm_Diskselector_Item *it = NULL;
Eina_List *l;
- Elm_Diskselector_Smart_Data *sd = _pd;
+ if (ret) *ret = EINA_FALSE;
+ (void) src;
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (elm_widget_disabled_get(obj)) return;
if (!sd->selected_item)
{
diff --git a/legacy/elementary/src/lib/elm_flipselector.c b/legacy/elementary/src/lib/elm_flipselector.c
index 3728090610..75a7279da1 100644
--- a/legacy/elementary/src/lib/elm_flipselector.c
+++ b/legacy/elementary/src/lib/elm_flipselector.c
@@ -434,23 +434,18 @@ _flip_down(Elm_Flipselector_Smart_Data *sd)
static void
_elm_flipselector_smart_event(Eo *obj, void *_pd, va_list *list)
{
- Evas_Event_Key_Down *ev;
- Eina_Bool is_up = EINA_TRUE;
-
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
-
Elm_Flipselector_Smart_Data *sd = _pd;
+ Eina_Bool is_up = EINA_TRUE;
- if (elm_widget_disabled_get(obj)) return;
+ if (ret) *ret = EINA_FALSE;
+ (void) src;
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
-
- ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if ((!strcmp(ev->key, "Down")) || (!strcmp(ev->key, "KP_Down")))
diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c
index c63e3e14e6..b315bf53ff 100644
--- a/legacy/elementary/src/lib/elm_gengrid.c
+++ b/legacy/elementary/src/lib/elm_gengrid.c
@@ -1688,11 +1688,13 @@ static void
_elm_gengrid_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Gengrid_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
Evas_Coord x = 0;
Evas_Coord y = 0;
@@ -1703,14 +1705,11 @@ _elm_gengrid_smart_event(Eo *obj, void *_pd, va_list *list)
Evas_Coord page_x = 0;
Evas_Coord page_y = 0;
Elm_Object_Item *it = NULL;
- Evas_Event_Key_Down *ev = event_info;
-
- Elm_Gengrid_Smart_Data *sd = _pd;
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- if (!sd->items) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (elm_widget_disabled_get(obj)) return;
+ if (!sd->items) return;
eo_do(obj,
elm_scrollable_interface_content_pos_get(&x, &y),
diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c
index ac3f4decad..ff3c8b09af 100644
--- a/legacy/elementary/src/lib/elm_genlist.c
+++ b/legacy/elementary/src/lib/elm_genlist.c
@@ -2458,11 +2458,13 @@ static void
_elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Genlist_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
Evas_Coord x = 0;
Evas_Coord y = 0;
@@ -2473,15 +2475,13 @@ _elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list)
Evas_Coord page_x = 0;
Evas_Coord page_y = 0;
Elm_Object_Item *it = NULL;
- Evas_Event_Key_Down *ev = event_info;
Evas_Coord pan_max_x = 0, pan_max_y = 0;
- Elm_Genlist_Smart_Data *sd = _pd;
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- if (!sd->items) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (elm_widget_disabled_get(obj)) return;
+ if (!sd->items) return;
eo_do(obj,
elm_scrollable_interface_content_pos_get(&x, &y),
diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c
index 404867a221..7ebab40f41 100644
--- a/legacy/elementary/src/lib/elm_list.c
+++ b/legacy/elementary/src/lib/elm_list.c
@@ -256,11 +256,13 @@ static void
_elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_List_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
Evas_Coord x = 0;
Evas_Coord y = 0;
@@ -271,14 +273,11 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
Evas_Coord page_x = 0;
Evas_Coord page_y = 0;
Elm_List_Item *it = NULL;
- Evas_Event_Key_Down *ev = event_info;
-
- Elm_List_Smart_Data *sd = _pd;
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- if (!sd->items) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+ if (!sd->items) return;
eo_do(obj,
elm_scrollable_interface_content_pos_get(&x, &y),
diff --git a/legacy/elementary/src/lib/elm_map.c b/legacy/elementary/src/lib/elm_map.c
index 9520f97ee4..da2dd3667a 100644
--- a/legacy/elementary/src/lib/elm_map.c
+++ b/legacy/elementary/src/lib/elm_map.c
@@ -3887,19 +3887,18 @@ static void
_elm_map_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Map_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
Evas_Coord vh;
Evas_Coord x, y;
- Evas_Event_Key_Down *ev = event_info;
Evas_Coord step_x, step_y, page_x, page_y;
- Elm_Map_Smart_Data *sd = _pd;
-
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elm_panel.c b/legacy/elementary/src/lib/elm_panel.c
index 153afc0685..4fa06b9dc1 100644
--- a/legacy/elementary/src/lib/elm_panel.c
+++ b/legacy/elementary/src/lib/elm_panel.c
@@ -252,15 +252,15 @@ _elm_panel_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
Evas_Object *src = va_arg(*list, Evas_Object *);
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
- Evas_Event_Key_Down *ev = event_info;
+ if (ret) *ret = EINA_FALSE;
if (elm_widget_disabled_get(obj)) return;
- if ((src != obj) || (type != EVAS_CALLBACK_KEY_DOWN)) return;
+ if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+ if (src != obj) return;
if ((strcmp(ev->key, "Return")) &&
(strcmp(ev->key, "KP_Enter")) &&
diff --git a/legacy/elementary/src/lib/elm_photocam.c b/legacy/elementary/src/lib/elm_photocam.c
index 2bd67f32f5..d50d47093d 100644
--- a/legacy/elementary/src/lib/elm_photocam.c
+++ b/legacy/elementary/src/lib/elm_photocam.c
@@ -967,11 +967,12 @@ static void
_elm_photocam_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
double zoom;
Evas_Coord x = 0;
@@ -982,10 +983,8 @@ _elm_photocam_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
Evas_Coord step_y = 0;
Evas_Coord page_x = 0;
Evas_Coord page_y = 0;
- Evas_Event_Key_Down *ev = event_info;
if (elm_widget_disabled_get(obj)) return;
-
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elm_radio.c b/legacy/elementary/src/lib/elm_radio.c
index f03ebf7514..ad30388d3b 100644
--- a/legacy/elementary/src/lib/elm_radio.c
+++ b/legacy/elementary/src/lib/elm_radio.c
@@ -148,20 +148,17 @@ _elm_radio_smart_content_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
static void
_elm_radio_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
- Evas_Event_Key_Down *ev;
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
-
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- ev = event_info;
-
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if ((strcmp(ev->key, "Return")) &&
diff --git a/legacy/elementary/src/lib/elm_scroller.c b/legacy/elementary/src/lib/elm_scroller.c
index a9fdf207c8..94ac723a8b 100644
--- a/legacy/elementary/src/lib/elm_scroller.c
+++ b/legacy/elementary/src/lib/elm_scroller.c
@@ -51,11 +51,13 @@ static void
_elm_scroller_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Scroller_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
Evas_Coord x = 0;
Evas_Coord y = 0;
@@ -69,9 +71,6 @@ _elm_scroller_smart_event(Eo *obj, void *_pd, va_list *list)
Evas_Coord page_y = 0;
Evas_Coord step_x = 0;
Evas_Coord step_y = 0;
- Evas_Event_Key_Down *ev = event_info;
-
- Elm_Scroller_Smart_Data *sd = _pd;
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
diff --git a/legacy/elementary/src/lib/elm_slider.c b/legacy/elementary/src/lib/elm_slider.c
index 79b09dd4c1..22a81af0d8 100755
--- a/legacy/elementary/src/lib/elm_slider.c
+++ b/legacy/elementary/src/lib/elm_slider.c
@@ -355,17 +355,16 @@ _popup_emit(void *data,
static void
_elm_slider_smart_event(Eo *obj, void *_pd, va_list *list)
{
- Evas_Event_Mouse_Wheel *mev;
- Evas_Event_Key_Down *ev;
-
- Elm_Slider_Smart_Data *sd = _pd;
-
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
void *event_info = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Slider_Smart_Data *sd = _pd;
+ Evas_Event_Mouse_Wheel *mev;
+ Evas_Event_Key_Down *ev;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
diff --git a/legacy/elementary/src/lib/elm_slideshow.c b/legacy/elementary/src/lib/elm_slideshow.c
index cae00949cb..7a354943b3 100644
--- a/legacy/elementary/src/lib/elm_slideshow.c
+++ b/legacy/elementary/src/lib/elm_slideshow.c
@@ -28,15 +28,14 @@ static void
_elm_slideshow_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
- Evas_Event_Key_Down *ev = event_info;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
-
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
diff --git a/legacy/elementary/src/lib/elm_spinner.c b/legacy/elementary/src/lib/elm_spinner.c
index 5040e20fd9..fad85fab11 100644
--- a/legacy/elementary/src/lib/elm_spinner.c
+++ b/legacy/elementary/src/lib/elm_spinner.c
@@ -438,21 +438,21 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
+
Eina_Bool horz = !!strncmp(elm_widget_style_get(obj), "vertical", 8);
if (elm_widget_disabled_get(obj)) return;
+ if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+
if (type == EVAS_CALLBACK_KEY_DOWN)
{
- Evas_Event_Key_Down *ev = event_info;
-
- if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- else if (
- ( (!strcmp(ev->key, "Left") ||
+ if (( (!strcmp(ev->key, "Left") ||
((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
&& horz )
||
@@ -486,9 +486,6 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
}
else if (type == EVAS_CALLBACK_KEY_UP)
{
- Evas_Event_Key_Down *ev = event_info;
-
- if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (!strcmp(ev->key, "Right") ||
((!strcmp(ev->key, "KP_Right")) && (!ev->string)) ||
!strcmp(ev->key, "Up") ||
diff --git a/legacy/elementary/src/lib/elm_toolbar.c b/legacy/elementary/src/lib/elm_toolbar.c
index 1672a4cec1..22528e8981 100644
--- a/legacy/elementary/src/lib/elm_toolbar.c
+++ b/legacy/elementary/src/lib/elm_toolbar.c
@@ -644,26 +644,25 @@ _highlight_next_item_get(Evas_Object *obj, Evas_Object *box, Eina_Bool reverse)
static void
-_elm_toolbar_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+_elm_toolbar_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- (void) type;
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Elm_Toolbar_Smart_Data *sd = _pd;
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
+ (void) type;
+
Elm_Toolbar_Item *it = NULL;
Evas_Coord x, y, w, h;
- ELM_TOOLBAR_DATA_GET(obj, sd);
-
- Evas_Event_Key_Down *ev = event_info;
-
if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
- if (!sd->items) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+ if (!sd->items) return;
if ((!strcmp(ev->key, "Return")) ||
((!strcmp(ev->key, "KP_Enter")) && !ev->string))
diff --git a/legacy/elementary/src/lib/elm_video.c b/legacy/elementary/src/lib/elm_video.c
index 2fd5eb7fd3..cf91aed1ea 100644
--- a/legacy/elementary/src/lib/elm_video.c
+++ b/legacy/elementary/src/lib/elm_video.c
@@ -31,18 +31,17 @@ static void
_elm_video_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
#ifdef HAVE_EMOTION
- Evas_Event_Key_Down *ev = event_info;
-
+ if (elm_widget_disabled_get(obj)) return;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (elm_widget_disabled_get(obj)) return;
if ((!strcmp(ev->key, "Left")) ||
((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
@@ -100,10 +99,9 @@ _elm_video_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
INF("keyname: '%s' not handled", ev->key);
#else
-
(void) obj;
(void) type;
- (void) event_info;
+ (void) ev;
#endif
}
diff --git a/legacy/elementary/src/lib/elm_web.c b/legacy/elementary/src/lib/elm_web.c
index c1cfe62e64..8974c2ed2f 100644
--- a/legacy/elementary/src/lib/elm_web.c
+++ b/legacy/elementary/src/lib/elm_web.c
@@ -185,15 +185,14 @@ static void
_elm_web_smart_event(Eo *obj, void *_pd, va_list *list)
{
Evas_Object *src = va_arg(*list, Evas_Object *);
- (void) src;
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+
if (ret) *ret = EINA_FALSE;
+ (void) src;
#ifdef HAVE_ELEMENTARY_WEB
- Evas_Event_Key_Down *ev = event_info;
-
Elm_Web_Smart_Data *sd = _pd;
if (type != EVAS_CALLBACK_KEY_DOWN) return;
@@ -209,7 +208,7 @@ _elm_web_smart_event(Eo *obj, void *_pd, va_list *list)
(void)obj;
(void)_pd;
(void)type;
- (void)event_info;
+ (void)ev;
#endif
}
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index d1cc852ae4..5bfc452188 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -1152,19 +1152,16 @@ _elm_win_smart_on_focus(Eo *obj, void *_pd, va_list *list)
static void
_elm_win_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
- Evas_Object *source = va_arg(*list, Evas_Object *);
- (void) source;
+ Evas_Object *src = va_arg(*list, Evas_Object *);
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
- if (ret) *ret = EINA_FALSE;
- Evas_Event_Key_Down *ev = event_info;
+ if (ret) *ret = EINA_FALSE;
+ (void) src;
if (elm_widget_disabled_get(obj)) return;
-
- if (type != EVAS_CALLBACK_KEY_DOWN)
- return;
+ if (type != EVAS_CALLBACK_KEY_DOWN) return;
if ((!strcmp(ev->key, "Tab")) ||
(!strcmp(ev->key, "ISO_Left_Tab")))