Esempio n. 1
0
Evas_Object *
emusic_notify_creat(Em_Smart_Data *em)
{
	Evas_Object *bx, *bt, *notify, *label;

	sd = calloc(1, sizeof(Smart_Data));
	if (!sd) return NULL;

	notify = elm_notify_add(em->edje);
	evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_RIGHT);
	//edje_object_part_swallow(, "box.swallow", em->notify.notify);
	sd->notify = notify;

	bx = elm_box_add(notify);
	elm_notify_content_set(notify, bx);
	elm_box_horizontal_set(bx, 1);
	evas_object_show(bx);

	label = elm_label_add(notify);
	elm_label_label_set(label, "Top Right position.");
	elm_box_pack_end(bx, label);
	evas_object_show(label);
	sd->label = label;

	bt = elm_button_add(notify);
	elm_button_label_set(bt, "Close");
	evas_object_smart_callback_add(bt, "clicked", _notify_bt_close, NULL);
	elm_box_pack_end(bx, bt);
	evas_object_show(bt);

	return notify;
}
void Browser_Common_View::show_notify_popup(const char *msg, int timeout, Eina_Bool has_control_bar)
{
	if (m_selection_info_layout) {
		evas_object_del(m_selection_info_layout);
		m_selection_info_layout = NULL;
	}

	if (m_selection_info) {
		evas_object_del(m_selection_info);
		m_selection_info = NULL;
	}

	int angle = 0;
	angle = elm_win_rotation_get(m_win);
	m_selection_info = elm_notify_add(m_navi_bar);
	if (!m_selection_info) {
		BROWSER_LOGD("elm_notify_add failed");
		return;
	}
	elm_notify_orient_set(m_selection_info, ELM_NOTIFY_ORIENT_BOTTOM);
	evas_object_size_hint_weight_set(m_selection_info, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(m_selection_info, EVAS_HINT_FILL, EVAS_HINT_FILL);
	m_selection_info_layout = elm_layout_add(m_selection_info);
	if (!m_selection_info_layout) {
		BROWSER_LOGD("elm_layout_add failed");
		return;
	}
	evas_object_size_hint_weight_set(m_selection_info_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(m_selection_info_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);

	elm_object_content_set(m_selection_info, m_selection_info_layout);

	if (has_control_bar) {
		if(angle == 0 || angle == 180)
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"vertical/bottom_64");
		else
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"horizontal/bottom_64");
	} else {
		if(angle == 0 || angle == 180)
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"vertical/bottom_12");
		else
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"horizontal/bottom_12");
	}
	edje_object_part_text_set(elm_layout_edje_get(m_selection_info_layout), "elm.text", msg);

	if (timeout)
		elm_notify_timeout_set(m_selection_info, timeout);

	evas_object_show(m_selection_info);
}
Esempio n. 3
0
Upload *
upload_new(Evas_Object *parent)
{
   Evas_Object *bx, *lbl, *pb, *notify;
   Upload *ul;

   ul = calloc(1, sizeof(Upload));

   notify = elm_notify_add(parent);
   elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT);
   elm_win_resize_object_add(parent, notify);
   evas_object_size_hint_weight_set(notify, -1.0, -1.0);
   evas_object_size_hint_align_set(notify, -1.0, -1.0);

   bx = elm_box_add(parent);
   evas_object_size_hint_weight_set(bx, 1.0, 1.0);
   evas_object_size_hint_align_set(bx, -1.0, -1.0);
   evas_object_show(bx);
   elm_notify_content_set(notify, bx);

   lbl = elm_label_add(bx);
   elm_object_text_set(lbl, D_("Uploading ..."));
   evas_object_size_hint_weight_set(lbl, 1.0, 1.0);
   evas_object_size_hint_align_set(lbl, 1.0, 1.0);
   elm_box_pack_end(bx, lbl);
   evas_object_show(lbl);

   pb = elm_progressbar_add(bx);
   elm_object_text_set(pb, "Photo");
   evas_object_size_hint_weight_set(pb, 1.0, 1.0);
   evas_object_size_hint_align_set(pb, 1.0, 1.0);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);

   ul->main = notify;
   ul->lbl = lbl;
   ul->pb = pb;

   return ul;
}
Esempio n. 4
0
/* externally accessible functions */
Evas_Object *
enna_photo_slideshow_add(Evas_Object *parent)
{
    Smart_Data *sd;
    Evas_Object *bx, *bt, *ic;
    Evas_Coord w, h;

    sd = calloc(1, sizeof(Smart_Data));

    sd->delay = enna_config->slideshow_delay;

    sd->layout = elm_layout_add(parent);
    elm_layout_file_set(sd->layout, enna_config_theme_get(), "enna/slideshow");
    evas_object_size_hint_weight_set(sd->layout, 1.0, 1.0);
    evas_object_show(sd->layout);

    sd->slideshow = elm_slideshow_add(sd->layout);
    elm_slideshow_transition_set(sd->slideshow, "horizontal");
    elm_slideshow_loop_set(sd->slideshow, 1);

    sd->controls = elm_notify_add(sd->layout);
    elm_notify_orient_set(sd->controls, ELM_NOTIFY_ORIENT_BOTTOM);
    evas_object_geometry_get(enna->layout, NULL, NULL, &w, &h);
    evas_object_move(sd->controls, 0, 0);
    evas_object_resize(sd->controls, w, h);
    //elm_object_style_set(sd->controls, "enna_bottom");
    /* Fixme : add a config value */
    elm_notify_timeout_set(sd->controls, 10);

    bx = elm_box_add(sd->layout);
    elm_box_horizontal_set(bx, 1);
    elm_notify_content_set(sd->controls, bx);
    evas_object_show(bx);

    evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_IN, _mouse_in, sd);
    evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_OUT, _mouse_out, sd);

    ELM_ADD ("icon/mp_prev",    _button_clicked_prev_cb);
    ELM_ADD ("icon/mp_pause",    _button_clicked_play_cb);
    sd->btplay = bt;
    ELM_ADD ("icon/mp_next",    _button_clicked_next_cb);
    ELM_ADD ("icon/mp_stop",    _button_clicked_stop_cb);

    sd->spin = elm_spinner_add(bx);
    elm_spinner_label_format_set(sd->spin, "%2.f secs.");
    evas_object_smart_callback_add(sd->spin, "changed", _spin, sd);
    elm_spinner_step_set(sd->spin, 1);
    elm_spinner_min_max_set(sd->spin, 1, 100);
    elm_spinner_value_set(sd->spin, sd->delay);
    elm_box_pack_end(bx, sd->spin);
    evas_object_show(sd->spin);

#ifdef FEATURE_ROTATION
    ELM_ADD ("icon/rotate_ccw", _button_clicked_rotate_ccw_cb);
    ELM_ADD ("icon/rotate_cw",  _button_clicked_rotate_cw_cb);
#endif /* FEATURE_ROTATION */

    evas_object_show(sd->layout);
    evas_object_show(sd->slideshow);
    elm_layout_content_set(sd->layout, "enna.content.swallow",
                           sd->slideshow);

    evas_object_data_set(sd->layout, "sd", sd);
    sd->state = 4;
    /* Catch mouse wheel event */
    evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_MOUSE_WHEEL,
                                   _mouse_wheel_cb, sd);
    /* connect to the input signal */
    sd->listener = enna_input_listener_add("slideshow", _input_events_cb, sd->layout);
    enna_input_listener_demote(sd->listener);

    evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_MOUSE_UP, _controls_show, sd);
    evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_MOUSE_MOVE, _controls_show, sd);

    evas_object_event_callback_add(sd->layout, EVAS_CALLBACK_DEL,
                                   _sd_del, sd);
    return sd->layout;
}