summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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