EAPI Evas_Object *
elm_separator_add(Evas_Object *parent)
{
   Evas_Object *obj;
   Evas *e;
   Widget_Data *wd;

   ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);

   ELM_SET_WIDTYPE(widtype, "separator");
   wd->horizontal = EINA_FALSE;
   elm_widget_type_set(obj, "separator");
   elm_widget_sub_object_add(parent, obj);
   elm_widget_data_set(obj, wd);
   elm_widget_del_hook_set(obj, _del_hook);
   elm_widget_theme_hook_set(obj, _theme_hook);
   elm_widget_can_focus_set(obj, EINA_FALSE);

   wd->sep = edje_object_add(e);
   _elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default");
   elm_widget_resize_object_set(obj, wd->sep);
   _mirrored_set(obj, elm_widget_mirrored_get(obj));
   _sizing_eval(obj);
   return obj;
}
Example #2
0
Evas_Object *
elm_keypad_add(Evas_Object * parent)
{
	// Evas_Object *obj; Instead I'm using the wd->widget variable
	Evas *e;
	Widget_Data *wd;

	wd = ELM_NEW(Widget_Data);
	e = evas_object_evas_get(parent);
	wd->widget = elm_widget_add(e);
	elm_widget_data_set(wd->widget, wd);
	elm_widget_del_hook_set(wd->widget, _del_hook);

	wd->keypad = edje_object_add(e);
	g_debug("keypad evas object: %d", wd->keypad);
	edje_object_file_set(wd->keypad, KEYPAD_FILE, "keypad");
	edje_object_signal_callback_add(wd->keypad, "*", "input",
					_signal_clicked, wd->widget);
	edje_object_signal_callback_add(wd->keypad, "0", "mouse_up",
					_zero_mouse_up, wd->widget);
	edje_object_signal_callback_add(wd->keypad, "0", "mouse_down",
					_zero_mouse_down, wd->widget);

	edje_object_part_text_set(wd->keypad, "text2_desc", D_("ABC"));
	edje_object_part_text_set(wd->keypad, "text3_desc", D_("DEF"));
	edje_object_part_text_set(wd->keypad, "text4_desc", D_("GHI"));
	edje_object_part_text_set(wd->keypad, "text5_desc", D_("JKL"));
	edje_object_part_text_set(wd->keypad, "text6_desc", D_("MNO"));
	edje_object_part_text_set(wd->keypad, "text7_desc", D_("PQRS"));
	edje_object_part_text_set(wd->keypad, "text8_desc", D_("TUV"));
	edje_object_part_text_set(wd->keypad, "text9_desc", D_("XYZ"));

	elm_widget_resize_object_set(wd->widget, wd->keypad);
	//evas_object_smart_callback_add(wd->widget, "sub-object-del", _sub_del, wd->widget);

	_sizing_eval(wd->widget);
	return wd->widget;
}