forked from enlightenment/efl
parent
34960aa06c
commit
d4033a6dc1
|
@ -3,10 +3,19 @@
|
||||||
# include "elementary_config.h"
|
# include "elementary_config.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef ELM_LIB_QUICKLAUNCH
|
#ifndef ELM_LIB_QUICKLAUNCH
|
||||||
|
static void
|
||||||
|
changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *ck2 = data;
|
||||||
|
printf("ck %p to %i\n", obj, elm_check_state_get(obj));
|
||||||
|
elm_check_state_set(ck2, elm_check_state_get(obj));
|
||||||
|
printf("ck2 %p is now %i\n", ck2, elm_check_state_get(ck2));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *ic, *ck;
|
Evas_Object *win, *bg, *bx, *ic, *ck, *ck0;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
win = elm_win_add(NULL, "checks", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "checks", ELM_WIN_BASIC);
|
||||||
|
@ -36,6 +45,8 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
|
|
||||||
|
ck0 = ck;
|
||||||
|
|
||||||
ic = elm_icon_add(win);
|
ic = elm_icon_add(win);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
|
||||||
|
@ -47,7 +58,9 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
|
|
||||||
|
evas_object_smart_callback_add(ck, "changed", changed_cb, ck0);
|
||||||
|
|
||||||
ck = elm_check_add(win);
|
ck = elm_check_add(win);
|
||||||
elm_object_text_set(ck, "Label Only");
|
elm_object_text_set(ck, "Label Only");
|
||||||
elm_box_pack_end(bx, ck);
|
elm_box_pack_end(bx, ck);
|
||||||
|
|
Loading…
Reference in New Issue