forked from enlightenment/enlightenment
add function to change valptr on check widget
SVN revision: 75001
This commit is contained in:
parent
7713bd830f
commit
3997046ea2
|
@ -86,6 +86,28 @@ e_widget_check_checked_set(Evas_Object *check, int checked)
|
|||
edje_object_signal_emit(wd->o_check, "e,state,unchecked", "e");
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue