summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-08 09:20:45 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-08 09:20:45 +0000
commit3997046ea21b0a81c8212d1469e51dcecb0507f5 (patch)
tree6e587c12b99e223369c8e310d02b7da825f053fb /src/bin
parent7713bd830f6b1d2c142facaaf82f000ba3e74f69 (diff)
downloadenlightenment-3997046ea21b0a81c8212d1469e51dcecb0507f5.tar.gz
add function to change valptr on check widget
SVN revision: 75001
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/e_widget_check.c22
-rw-r--r--src/bin/e_widget_check.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/e_widget_check.c b/src/bin/e_widget_check.c
index fbfb9378e6..133cc96768 100644
--- a/src/bin/e_widget_check.c
+++ b/src/bin/e_widget_check.c
@@ -87,6 +87,28 @@ e_widget_check_checked_set(Evas_Object *check, int checked)
}
/**
+ * Sets the value of the check box
+ *
+ * @param check the check box widget
+ * @param val pointer to int where changes are stored
+ */
+EAPI void
+e_widget_check_valptr_set(Evas_Object *check, int *val)
+{
+ E_Widget_Data *wd;
+ int state;
+
+ wd = e_widget_data_get(check);
+ state = wd->valptr ? *wd->valptr : 0;
+ wd->valptr = val;
+ if (state == (wd->valptr && *wd->valptr)) return;
+ if (wd->valptr && *wd->valptr)
+ edje_object_signal_emit(wd->o_check, "e,state,checked", "e");
+ else
+ edje_object_signal_emit(wd->o_check, "e,state,unchecked", "e");
+}
+
+/**
*Get the value of the check box
*
* @param check the check box widget
diff --git a/src/bin/e_widget_check.h b/src/bin/e_widget_check.h
index 82a02fa77e..a4ebf69f7d 100644
--- a/src/bin/e_widget_check.h
+++ b/src/bin/e_widget_check.h
@@ -6,6 +6,7 @@
EAPI Evas_Object *e_widget_check_add(Evas *evas, const char *label, int *val);
EAPI void e_widget_check_checked_set(Evas_Object *check, int checked);
EAPI int e_widget_check_checked_get(Evas_Object *check);
+EAPI void e_widget_check_valptr_set(Evas_Object *check, int *val);
EAPI Evas_Object *e_widget_check_icon_add(Evas *evas, const char *label, const char *icon, int icon_w, int icon_h, int *val);
#endif