Exemplo n.º 1
0
static void
_init_radio(Evas_Object *win)
{
   Evas_Object *bg, *radio, *group, *bx, *ic;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   elm_win_autodel_set(win, EINA_TRUE);

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);

   bx = elm_box_add(win);
   elm_box_horizontal_set(bx, EINA_TRUE);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   evas_object_show(bx);

   group = radio = elm_radio_add(win);
   elm_object_text_set(radio, RADIO1);
   elm_radio_state_value_set(radio, 1);
   elm_radio_value_pointer_set(radio, &val);
   ic = elm_icon_add(win);
   elm_icon_standard_set(ic, "home");
   elm_object_part_content_set(radio, "icon", ic);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, RADIO2);
   elm_radio_state_value_set(radio, 2);
   elm_radio_value_pointer_set(radio, &val);
   elm_radio_group_add(radio, group);
   ic = elm_icon_add(win);
   elm_icon_standard_set(ic, "file");
   elm_object_part_content_set(radio, "icon", ic);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, RADIO3);
   elm_radio_state_value_set(radio, 3);
   elm_radio_value_pointer_set(radio, &val);
   elm_radio_group_add(radio, group);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);

   elm_radio_value_set(radio, RADIO2_SEL);
}
/**
 * @brief Negative test case of ug_init elm_radio_state_value_set()
 */
static void utc_UIFW_elm_radio_state_value_set_func_02(void)
{
   Evas_Object *radio = NULL;

   radio = elm_radio_add(main_win);
   elm_radio_state_value_set(NULL, 0);
   tet_result(TET_PASS);
}
/**
 * @brief Negative test case of ug_init elm_radio_label_set()
 */
static void utc_UIFW_elm_radio_label_set_func_02(void)
{
   Evas_Object *radio = NULL;

   radio = elm_radio_add(main_win);
   elm_radio_label_set(NULL, "label");
   tet_result(TET_PASS);
}
/**
 * @brief Positive test case of elm_radio_label_get()
 */
static void utc_UIFW_elm_radio_label_get_func_01(void)
{
   Evas_Object *radio = NULL;
   char *buffer;
   radio = elm_radio_add(main_win);
   radio = elm_radio_add(main_win);
   elm_radio_label_set(radio, "label");
   buffer = elm_radio_label_get(radio);
   if(!buffer)
      {
         tet_infoline("elm_radio_label_get() failed in positive test case");
         tet_result(TET_FAIL);
         return;
      }
   evas_object_show(radio);
   evas_object_del(radio);
   radio = NULL;
   tet_result(TET_PASS);
}
/**
 * @brief Positive test case of elm_radio_state_value_set()
 */
static void utc_UIFW_elm_radio_state_value_set_func_01(void)
{
   Evas_Object *radio = NULL;

   radio = elm_radio_add(main_win);
   elm_radio_state_value_set(radio, 0);
   evas_object_show(radio);
   evas_object_del(radio);
   radio = NULL;
   tet_result(TET_PASS);
}
Evas_Object *common_utils_create_radio_button(Evas_Object *parent, const int value)
{
	Evas_Object *radio = elm_radio_add(parent);
	elm_radio_state_value_set(radio, value);
//	elm_radio_group_add(radio, radio_main);
	evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND,
		EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);

	return radio;
}
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *rect, *rect2, *flip, *radio, *radio2, *radio3;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("flip", "Flip");
   elm_win_autodel_set(win, EINA_TRUE);

   rect = evas_object_rectangle_add(evas_object_evas_get(win));
   evas_object_resize(rect, 150, 150);
   evas_object_color_set(rect, 0, 0, 255, 255);
   evas_object_show(rect);

   rect2 = evas_object_rectangle_add(evas_object_evas_get(win));
   evas_object_color_set(rect2, 0, 255, 0, 255);
   evas_object_show(rect2);

   flip = elm_flip_add(win);
   elm_object_part_content_set(flip, "front", rect);
   elm_object_part_content_set(flip, "back", rect2);
   evas_object_resize(flip, 150, 150);
   evas_object_move(flip, 10, 10);
   evas_object_show(flip);

   elm_flip_interaction_set(flip, ELM_FLIP_INTERACTION_PAGE);
   elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_UP, EINA_TRUE);
   elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_DOWN, EINA_TRUE);
   elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_LEFT, EINA_TRUE);
   elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_RIGHT, EINA_TRUE);
   elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_UP, 1);
   elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_DOWN, 1);
   elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_LEFT, 1);
   elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_RIGHT, 1);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, "page");
   elm_radio_value_set(radio, ELM_FLIP_INTERACTION_PAGE);
   elm_radio_state_value_set(radio, ELM_FLIP_INTERACTION_PAGE);
   evas_object_resize(radio, 55, 30);
   evas_object_move(radio, 10, 160);
   evas_object_show(radio);
   evas_object_smart_callback_add(radio, "changed", _change_interaction, flip);

   radio2 = elm_radio_add(win);
   elm_object_text_set(radio2, "cube");
   elm_radio_state_value_set(radio2, ELM_FLIP_INTERACTION_CUBE);
   elm_radio_group_add(radio2, radio);
   evas_object_resize(radio2, 55, 30);
   evas_object_move(radio2, 75, 160);
   evas_object_show(radio2);
   evas_object_smart_callback_add(radio2, "changed", _change_interaction, flip);

   radio3 = elm_radio_add(win);
   elm_object_text_set(radio3, "rotate");
   elm_radio_state_value_set(radio3, ELM_FLIP_INTERACTION_ROTATE);
   elm_radio_group_add(radio3, radio);
   evas_object_resize(radio3, 55, 30);
   evas_object_move(radio3, 140, 160);
   evas_object_show(radio3);
   evas_object_smart_callback_add(radio3, "changed", _change_interaction, flip);

   evas_object_resize(win, 200, 200);
   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}
Exemplo n.º 8
0
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bx, *radio, *group, *ic;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("radio", "Radio");
   elm_win_autodel_set(win, EINA_TRUE);

   bx = elm_box_add(win);
   elm_box_horizontal_set(bx, EINA_TRUE);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   evas_object_show(bx);

   group = radio = elm_radio_add(win);
   elm_object_text_set(radio, "Radio 1");
   elm_radio_state_value_set(radio, 1);
   elm_radio_value_pointer_set(radio, &val);
   ic = elm_icon_add(win);
   elm_icon_standard_set(ic, "home");
   elm_object_part_content_set(radio, "icon", ic);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);
   evas_object_smart_callback_add(radio, "changed", _cb, NULL);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, "Radio 2");
   elm_radio_state_value_set(radio, 2);
   elm_radio_value_pointer_set(radio, &val);
   elm_radio_group_add(radio, group);
   ic = elm_icon_add(win);
   elm_icon_standard_set(ic, "file");
   elm_object_part_content_set(radio, "icon", ic);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);
   evas_object_smart_callback_add(radio, "changed", _cb, NULL);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, "Radio 3");
   elm_radio_state_value_set(radio, 3);
   elm_radio_value_pointer_set(radio, &val);
   elm_radio_group_add(radio, group);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);
   evas_object_smart_callback_add(radio, "changed", _cb, NULL);

   radio = elm_radio_add(win);
   elm_object_text_set(radio, "Radio 4");
   elm_radio_state_value_set(radio, 4);
   elm_radio_value_pointer_set(radio, &val);
   elm_radio_group_add(radio, group);
   elm_box_pack_end(bx, radio);
   evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(radio);
   evas_object_smart_callback_add(radio, "changed", _cb, NULL);

   evas_object_show(win);

   elm_run();

   return 0;
}
Exemplo n.º 9
0
int
ewallset_main()
{
	Evas_Object *win, *bg, *bx, *bx2, *bx3, *bt, *ic, *image , *frame, *rd, *rdg,*sl;
	int tw,th;
	char buf[1024];
	
	e->win = elm_win_add(NULL, "Ewallset", ELM_WIN_BASIC);
	elm_win_autodel_set(e->win, 1);
	evas_object_focus_set(e->win, 1);
	evas_object_smart_callback_add(e->win, "delete,request", usr_click_cancel, NULL);
	
	bg = elm_bg_add(e->win);
	elm_win_resize_object_add(e->win, bg);
	evas_object_size_hint_weight_set(bg, 1.0, 1.0);
	evas_object_show(bg);
	
	bx = elm_box_add(e->win);
	evas_object_size_hint_weight_set(bx, 1.0, 1.0);
	elm_win_resize_object_add(e->win,bx);
	evas_object_show(bx);
	
	image = elm_image_add(bx);
	elm_image_file_set(image, e->image_file, NULL);
	evas_object_size_hint_weight_set(image, 1.0, 1.0);
        evas_object_size_hint_align_set(image, -1.0, -1.0);
	elm_image_object_size_get(image,&e->w,&e->h);
	get_correct_size(410,e->w,e->h,&tw,&th,BY_HEIGHT);
	//printf("Res:%dx%d \n",e->w,e->h);
	//_get_correct_size(w,h,&tw,&th);
	evas_object_size_hint_min_set(image, tw, th);
	elm_box_pack_end(bx, image);
	evas_object_show(image);
	
	snprintf(buf, sizeof(buf), "Ewallset - %s", ecore_file_file_get(e->image_file));
	elm_win_title_set(e->win, buf);

	e->quality = 90;
	sl = elm_slider_add(e->win);
	elm_slider_indicator_show_set(sl, EINA_FALSE);
	elm_object_text_set(sl, "Quality");
	elm_slider_unit_format_set(sl, "%1.0f Percent");
	elm_slider_span_size_set(sl, 250);
	elm_slider_min_max_set(sl, 10, 100);
	elm_slider_value_set(sl, e->quality);
	evas_object_smart_callback_add(sl, "delay,changed", slider_change_cb, NULL);
	evas_object_size_hint_align_set(sl, 0.5, 0.5);
	evas_object_size_hint_weight_set(sl, 0.0, 0.0);
	elm_box_pack_end(bx, sl);
	evas_object_show(sl);

	frame = elm_frame_add(e->win);
	elm_object_text_set(frame,"Where to place this Wallpaper");
	elm_object_style_set(frame,"outdent_bottom");
	elm_box_pack_end(bx, frame);
	evas_object_show(frame);
	
	bx3 = elm_box_add(e->win);
	elm_box_horizontal_set(bx3, 1);
	elm_object_content_set(frame,bx3);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, 0);
	elm_object_text_set(rd, "All Desktops");
	evas_object_smart_callback_add(rd, "changed", desk_changed,e->rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	e->rdg = rd;
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, 1);
	elm_radio_group_add(rd, e->rdg);
	elm_object_text_set(rd, "This Desktop");
	evas_object_smart_callback_add(rd, "changed", desk_changed,e->rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, 2);
	elm_radio_group_add(rd, e->rdg);
	elm_object_text_set(rd, "This Screen");
	evas_object_smart_callback_add(rd, "changed", desk_changed,e->rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	ecore_timer_add(0.1,get_config_timer,NULL);
	
	
	frame = elm_frame_add(e->win);
	elm_object_text_set(frame,"Fill and Stretch Options");
	elm_object_style_set(frame,"outdent_top");
	elm_box_pack_end(bx, frame);
	evas_object_show(frame);
	
	bx3 = elm_box_add(e->win);
	elm_box_horizontal_set(bx3, 1);
    elm_box_homogeneous_set(bx3, EINA_TRUE);
	elm_object_content_set(frame,bx3);
	evas_object_show(bx3);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_STRETCH);
	elm_object_text_set(rd, "Stretch");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	rdg = rd;
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_TILE);
	elm_radio_group_add(rd, rdg);
	elm_object_text_set(rd, "Tile");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_CENTER);
	elm_radio_group_add(rd, rdg);
	elm_object_text_set(rd, "Center");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_SCALE_ASPECT_IN);
	elm_radio_group_add(rd, rdg);
	elm_object_text_set(rd, "Within");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_SCALE_ASPECT_OUT);
	elm_radio_group_add(rd, rdg);
	elm_object_text_set(rd, "Fill");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	rd = elm_radio_add(e->win);
	elm_radio_state_value_set(rd, IMPORT_SCALE_ASPECT_IN_TILE);
	elm_radio_group_add(rd, rdg);
	elm_object_text_set(rd, "Tile-In");
	evas_object_smart_callback_add(rd, "changed", selection_changed,rdg);
	elm_box_pack_end(bx3, rd);
	evas_object_show(rd);
	
	elm_radio_value_set(rdg, 0);

	bx2 = elm_box_add(e->win);
	elm_box_horizontal_set(bx2, 1);
	elm_box_homogeneous_set(bx2, EINA_TRUE);
	elm_box_pack_end(bx, bx2);
	evas_object_show(bx2);
	
	ic = elm_icon_add(e->win);
	elm_icon_file_set(ic, "/usr/share/ewallset/data/dialog-ok.png", NULL);
	bt = elm_button_add(bx2);
	elm_object_text_set(bt, "Continue");
	//elm_button_icon_set(bt, ic);
	evas_object_smart_callback_add(bt, "clicked", usr_click_ok, NULL);
	elm_box_pack_end(bx2, bt);
	evas_object_show(bt);
   
	ic = elm_icon_add(e->win);
	elm_icon_file_set(ic, "/usr/share/ewallset/data/dialog-cancel.png", NULL);
	bt = elm_button_add(bx2);
	elm_object_text_set(bt, "Cancel");
	//elm_button_icon_set(bt, ic);
	evas_object_smart_callback_add(bt, "clicked", usr_click_cancel, NULL);
	elm_box_pack_end(bx2, bt);
	evas_object_show(bt);
	evas_object_show(e->win);
	//evas_object_del(e->win);
return 0;
}
Exemplo n.º 10
0
EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *bg;
   Evas_Object *box, *hbox, *o_bg;
   Evas_Object *rd, *rdg;
   char buf[PATH_MAX];

   elm_app_info_set(elm_main, "elementary", "objects/test.edj");
   win = elm_win_add(NULL, "bg-options", ELM_WIN_BASIC);
   elm_win_title_set(win, "Bg Options");
   evas_object_smart_callback_add(win, "delete,request", on_done, NULL);
   elm_win_autodel_set(win, EINA_TRUE);

   bg = elm_bg_add(win);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bg);
   evas_object_show(bg);

   box = elm_box_add(win);
   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, box);
   evas_object_show(box);

   o_bg = elm_bg_add(win);
   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
   elm_bg_file_set(o_bg, buf, NULL);
   evas_object_size_hint_weight_set(o_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(o_bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_box_pack_end(box, o_bg);
   evas_object_show(o_bg);

   hbox = elm_box_add(win);
   elm_box_horizontal_set(hbox, EINA_TRUE);
   evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);

   rd = elm_radio_add(win);
   elm_radio_state_value_set(rd, ELM_BG_OPTION_CENTER);
   elm_object_text_set(rd, "Center");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);
   rdg = rd;

   rd = elm_radio_add(win);
   elm_radio_state_value_set(rd, ELM_BG_OPTION_SCALE);
   elm_radio_group_add(rd, rdg);
   elm_object_text_set(rd, "Scale");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);

   rd = elm_radio_add(win);
   elm_radio_state_value_set(rd, ELM_BG_OPTION_STRETCH);
   elm_radio_group_add(rd, rdg);
   elm_object_text_set(rd, "Stretch");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);

   rd = elm_radio_add(win);
   elm_radio_state_value_set(rd, ELM_BG_OPTION_TILE);
   elm_radio_group_add(rd, rdg);
   elm_object_text_set(rd, "Tile");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);

   elm_radio_value_set(rdg, ELM_BG_OPTION_SCALE);

   rd = elm_check_add(win);
   elm_object_text_set(rd, "Show Overlay");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_overlay_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);

   /* color choices ... this is ghetto, but we don't have a 'colorpicker'
    * widget yet :( */
   rd = elm_spinner_add(win);
   elm_object_style_set(rd, "vertical");
   elm_spinner_min_max_set(rd, 1, 4);
   elm_spinner_label_format_set(rd, "%.0f");
   elm_spinner_editable_set(rd, EINA_FALSE);
   elm_spinner_special_value_add(rd, 1, "White");
   elm_spinner_special_value_add(rd, 2, "Red");
   elm_spinner_special_value_add(rd, 3, "Blue");
   elm_spinner_special_value_add(rd, 4, "Green");
   evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_smart_callback_add(rd, "changed", _cb_color_changed, o_bg);
   elm_box_pack_end(hbox, rd);
   evas_object_show(rd);

   elm_box_pack_end(box, hbox);
   evas_object_show(hbox);

   evas_object_resize(win, 460, 320);
   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}