summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2014-03-27 08:56:37 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-03-27 08:56:37 +0900
commitf8d46bfca2a9285b45ec76062cd85b69dc86a7db (patch)
treeed34458cadb42bc8d943cf4ea732af8463bac0bd
parentbc860d5cb14ef792251324de54041efcb75538cd (diff)
key binding: define Elm_Action function as having a return type of Eina_Bool
Summary: This patch makes func of Elm_Action struct return a Eina_Bool value. The function had a return type of void, so could not check if the function succeeds or fails. Test Plan: None Reviewers: Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D666
-rw-r--r--src/lib/elm_button.c6
-rw-r--r--src/lib/elm_config.c5
-rw-r--r--src/lib/elm_panel.c6
-rw-r--r--src/lib/elm_widget.h2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c
index 6a0120836..b5c5f8055 100644
--- a/src/lib/elm_button.c
+++ b/src/lib/elm_button.c
@@ -41,7 +41,7 @@ static const Elm_Layout_Part_Alias_Description _text_aliases[] =
41 {NULL, NULL} 41 {NULL, NULL}
42}; 42};
43 43
44static void _key_action_activate(Evas_Object *obj, const char *params); 44static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
45 45
46static const Elm_Action key_actions[] = { 46static const Elm_Action key_actions[] = {
47 {"activate", _key_action_activate}, 47 {"activate", _key_action_activate},
@@ -156,10 +156,12 @@ _elm_button_elm_container_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED,
156 return EINA_TRUE; 156 return EINA_TRUE;
157} 157}
158 158
159static void _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) 159static Eina_Bool
160_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
160{ 161{
161 elm_layout_signal_emit(obj, "elm,anim,activate", "elm"); 162 elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
162 _activate(obj); 163 _activate(obj);
164 return EINA_TRUE;
163} 165}
164 166
165EOLIAN static Eina_Bool 167EOLIAN static Eina_Bool
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 6eed719a3..c8d605277 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -2167,10 +2167,7 @@ _elm_config_key_binding_call(Evas_Object *obj,
2167 while (actions[i].name) 2167 while (actions[i].name)
2168 { 2168 {
2169 if (!strcmp(binding->action, actions[i].name)) 2169 if (!strcmp(binding->action, actions[i].name))
2170 { 2170 return actions[i].func(obj, binding->params);
2171 actions[i].func(obj, binding->params);
2172 return EINA_TRUE;
2173 }
2174 i++; 2171 i++;
2175 } 2172 }
2176 break; 2173 break;
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index 8e9194fe5..c9fb2c846 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -20,7 +20,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
20 {NULL, NULL} 20 {NULL, NULL}
21}; 21};
22 22
23void _key_action_toggle(Evas_Object *obj, const char *params); 23static Eina_Bool _key_action_toggle(Evas_Object *obj, const char *params);
24 24
25static const Elm_Action key_actions[] = { 25static const Elm_Action key_actions[] = {
26 {"toggle", _key_action_toggle}, 26 {"toggle", _key_action_toggle},
@@ -237,9 +237,11 @@ _panel_toggle(void *data EINA_UNUSED,
237 edje_object_message_signal_process(wd->resize_obj); 237 edje_object_message_signal_process(wd->resize_obj);
238} 238}
239 239
240void _key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED) 240static Eina_Bool
241_key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED)
241{ 242{
242 _panel_toggle(NULL, obj, NULL, NULL); 243 _panel_toggle(NULL, obj, NULL, NULL);
244 return EINA_TRUE;
243} 245}
244 246
245EOLIAN static Eina_Bool 247EOLIAN static Eina_Bool
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index da8c4324f..6f2b80e93 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -508,7 +508,7 @@ struct _Elm_Access_Info
508struct _Elm_Action 508struct _Elm_Action
509{ 509{
510 const char *name; 510 const char *name;
511 void (*func)(Evas_Object *obj, const char *params); 511 Eina_Bool (*func)(Evas_Object *obj, const char *params);
512}; 512};
513 513
514void _elm_access_shutdown(); 514void _elm_access_shutdown();