aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-06 09:34:53 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-06 09:34:53 +0000
commit2f828589bbe4cd0eba0ecd31a07442053d020cf7 (patch)
tree970f3ab98085e5529549a8bf8de5ddc6a49c67c5
parent1231a2e4532a0c6cfad3c21a1383db5e0cd8c012 (diff)
downloadenlightenment-2f828589bbe4cd0eba0ecd31a07442053d020cf7.tar.gz
enlightenment-2f828589bbe4cd0eba0ecd31a07442053d020cf7.tar.xz
enlightenment-2f828589bbe4cd0eba0ecd31a07442053d020cf7.zip
added e_widget_on_disable_hook_set
SVN revision: 83670
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_widget.c11
-rw-r--r--src/bin/e_widget.h1
4 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dec2f3fb6..32453b0ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2013-02-06 Mike Blumenkrantz
* added api to automatically disable widgets when checkboxes are checked or unchecked
+ * added e_widget_on_disable_hook_set
2013-02-05 Mike Blumenkrantz
diff --git a/NEWS b/NEWS
index e28920834..4f5157b39 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ Additions:
* E_Config_DD structs are now tracked and retrievable through e_config_descriptor_find
* add e_border_pointer_warp_to_center_now()
* e_widget_check_widget_disable_on_*
+ * e_widget_on_disable_hook_set
Config:
* Added option for disabling icons in menus
* Added option for disabling pointer warping when performing directional focus changes using winlist
diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c
index 178a4aec3..e67530afb 100644
--- a/src/bin/e_widget.c
+++ b/src/bin/e_widget.c
@@ -19,6 +19,8 @@ struct _E_Smart_Data
void *on_focus_data;
void (*on_change_func)(void *data, Evas_Object *obj);
void *on_change_data;
+ void (*on_disable_func)(void *data, Evas_Object *obj);
+ void *on_disable_data;
void *data;
unsigned char can_focus : 1;
unsigned char child_can_focus : 1;
@@ -95,6 +97,14 @@ e_widget_on_change_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Obje
}
EAPI void
+e_widget_on_disable_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Object *obj), void *data)
+{
+ API_ENTRY return;
+ sd->on_disable_func = func;
+ sd->on_disable_data = data;
+}
+
+EAPI void
e_widget_data_set(Evas_Object *obj, void *data)
{
API_ENTRY return;
@@ -453,6 +463,7 @@ e_widget_disabled_set(Evas_Object *obj, int disabled)
e_widget_focus_jump(parent, 1);
}
if (sd->disable_func) sd->disable_func(obj);
+ if (sd->on_disable_func) sd->on_disable_func(sd->on_disable_data, obj);
}
EAPI int
diff --git a/src/bin/e_widget.h b/src/bin/e_widget.h
index 0e443f039..0a8a2d332 100644
--- a/src/bin/e_widget.h
+++ b/src/bin/e_widget.h
@@ -8,6 +8,7 @@ EAPI void e_widget_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj
EAPI void e_widget_focus_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
EAPI void e_widget_activate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
EAPI void e_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
+EAPI void e_widget_on_disable_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
EAPI void e_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
EAPI void e_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
EAPI void e_widget_data_set(Evas_Object *obj, void *data);