2010-10-19 11:25:22 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
2012-03-29 12:27:13 -07:00
|
|
|
#include <Elementary.h>
|
2009-09-23 04:15:55 -07:00
|
|
|
#ifndef ELM_LIB_QUICKLAUNCH
|
|
|
|
|
|
|
|
static void
|
2010-10-19 11:25:22 -07:00
|
|
|
_bt(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
|
|
|
Evas_Object *notify = data;
|
|
|
|
evas_object_show(notify);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-10-19 11:25:22 -07:00
|
|
|
_bt_close(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
|
|
|
Evas_Object *notify = data;
|
|
|
|
evas_object_hide(notify);
|
|
|
|
}
|
|
|
|
|
2010-09-27 14:13:45 -07:00
|
|
|
static void
|
2010-10-19 11:25:22 -07:00
|
|
|
_bt_timer_close(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-09-27 14:13:45 -07:00
|
|
|
{
|
|
|
|
Evas_Object *notify = data;
|
|
|
|
elm_notify_timeout_set(notify, 2.0);
|
|
|
|
}
|
|
|
|
|
2010-09-27 12:52:56 -07:00
|
|
|
static void
|
2010-10-19 11:25:22 -07:00
|
|
|
_notify_timeout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-09-27 12:52:56 -07:00
|
|
|
{
|
|
|
|
printf("Notify timed out!\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-10-19 11:25:22 -07:00
|
|
|
_notify_block(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2010-09-27 12:52:56 -07:00
|
|
|
{
|
|
|
|
printf("Notify block area clicked!!\n");
|
|
|
|
}
|
|
|
|
|
2009-10-17 17:10:36 -07:00
|
|
|
void
|
2010-10-19 11:25:22 -07:00
|
|
|
test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-04-01 23:20:28 -07:00
|
|
|
Evas_Object *win, *bx, *tb, *notify, *bt, *lb;
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-04-01 23:20:28 -07:00
|
|
|
win = elm_win_util_standard_add("notify", "Notify");
|
2011-07-25 07:22:19 -07:00
|
|
|
elm_win_autodel_set(win, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
tb = elm_table_add(win);
|
|
|
|
elm_win_resize_object_add(win, tb);
|
|
|
|
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_show(tb);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify top
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.5, 0.0);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "This position is the default.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Top");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 2, 1, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify bottom
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2012-03-05 01:50:32 -08:00
|
|
|
elm_notify_allow_events_set(notify, EINA_FALSE);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.5, 1.0);
|
|
|
|
|
2010-09-27 14:13:45 -07:00
|
|
|
elm_notify_timeout_set(notify, 5.0);
|
2010-09-27 12:52:56 -07:00
|
|
|
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
|
|
|
|
evas_object_smart_callback_add(notify, "block,clicked", _notify_block, NULL);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2012-06-07 02:52:14 -07:00
|
|
|
elm_object_text_set(lb, "Bottom position. This notify uses a timeout of 5 sec.<br/>"
|
2009-10-22 15:10:23 -07:00
|
|
|
"<b>The events outside the window are blocked.</b>");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Bottom");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 2, 3, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify left
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.0, 0.5);
|
2010-09-27 14:13:45 -07:00
|
|
|
elm_notify_timeout_set(notify, 10.0);
|
2010-09-27 12:52:56 -07:00
|
|
|
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2012-06-07 02:52:14 -07:00
|
|
|
elm_object_text_set(lb, "Left position. This notify uses a timeout of 10 sec.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Left");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 1, 2, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify center
|
2010-01-18 22:57:25 -08:00
|
|
|
notify = elm_notify_add(win);
|
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.5, 0.5);
|
2010-09-27 14:13:45 -07:00
|
|
|
elm_notify_timeout_set(notify, 10.0);
|
2010-09-27 12:52:56 -07:00
|
|
|
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
|
2010-01-18 22:57:25 -08:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2010-01-18 22:57:25 -08:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2012-06-07 02:52:14 -07:00
|
|
|
elm_object_text_set(lb, "Center position. This notify uses a timeout of 10 sec.");
|
2010-01-18 22:57:25 -08:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2010-01-18 22:57:25 -08:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Center");
|
2010-01-18 22:57:25 -08:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 2, 2, 1, 1);
|
2010-01-18 22:57:25 -08:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify right
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 1.0, 0.5);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "Right position.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Right");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 3, 2, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify top left
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.0, 0.0);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "Top Left position.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Top Left");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 1, 1, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify top right
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 1.0, 0.0);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "Top Right position.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Top Right");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 3, 1, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify bottom left
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 0.0, 1.0);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "Bottom Left position.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Bottom Left");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 1, 3, 1, 1);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
2012-10-30 06:14:45 -07:00
|
|
|
// Notify bottom right
|
2009-09-23 04:15:55 -07:00
|
|
|
notify = elm_notify_add(win);
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_notify_align_set(notify, 1.0, 1.0);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(notify, bx);
|
2011-04-15 04:44:05 -07:00
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb, "Bottom Right position.");
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Close in 2s");
|
2010-09-27 14:13:45 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_timer_close, notify);
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2011-06-29 00:11:54 -07:00
|
|
|
elm_object_text_set(bt, "Bottom Right");
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
2012-10-30 06:14:45 -07:00
|
|
|
elm_table_pack(tb, bt, 3, 3, 1, 1);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
// Notify top fill
|
|
|
|
notify = elm_notify_add(win);
|
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, 0.0);
|
|
|
|
elm_notify_timeout_set(notify, 5.0);
|
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
|
|
|
elm_object_content_set(notify, bx);
|
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
|
|
|
elm_object_text_set(lb, "Fill top. This notify fills horizontal area.<br/>"
|
|
|
|
"<b>elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, 0.0); </b>");
|
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
elm_object_text_set(bt, "Close");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0.5);
|
|
|
|
elm_object_text_set(bt, "Top fill");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
|
|
|
elm_table_pack(tb, bt, 1, 0, 3, 1);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
// Notify bottom fill
|
|
|
|
notify = elm_notify_add(win);
|
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, 1.0);
|
|
|
|
elm_notify_timeout_set(notify, 5.0);
|
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
|
|
|
elm_object_content_set(notify, bx);
|
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
|
|
|
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(lb, 0.0, 0.5);
|
|
|
|
elm_object_text_set(lb, "Fill Bottom. This notify fills horizontal area.<br/>"
|
|
|
|
"<b>elm_notify_align_set(notify, ELM_NOTIFY_ALIGN_FILL, 1.0); </b>");
|
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
elm_object_text_set(bt, "Close");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0.5);
|
|
|
|
elm_object_text_set(bt, "Bottom fill");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
|
|
|
elm_table_pack(tb, bt, 1, 4, 3, 1);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
// Notify left fill
|
|
|
|
notify = elm_notify_add(win);
|
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
elm_notify_align_set(notify, 0.0, EVAS_HINT_FILL);
|
|
|
|
elm_notify_timeout_set(notify, 5.0);
|
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
|
|
|
elm_object_content_set(notify, bx);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
|
|
|
elm_object_text_set(lb, "Left fill.");
|
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
elm_object_text_set(bt, "Close");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
evas_object_size_hint_align_set(bt, 0.5, EVAS_HINT_FILL);
|
|
|
|
elm_object_text_set(bt, "Left fill");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
|
|
|
elm_table_pack(tb, bt, 0, 1, 1, 3);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
// Notify right fill
|
|
|
|
notify = elm_notify_add(win);
|
|
|
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
elm_notify_align_set(notify, 1.0, EVAS_HINT_FILL);
|
|
|
|
elm_notify_timeout_set(notify, 5.0);
|
|
|
|
|
|
|
|
bx = elm_box_add(win);
|
|
|
|
elm_object_content_set(notify, bx);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
|
|
|
elm_object_text_set(lb, "Right fill.");
|
|
|
|
elm_box_pack_end(bx, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
elm_object_text_set(bt, "Close");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
|
|
|
elm_box_pack_end(bx, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
bt = elm_button_add(win);
|
|
|
|
evas_object_size_hint_align_set(bt, 0.5, EVAS_HINT_FILL);
|
|
|
|
elm_object_text_set(bt, "Right fill");
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
|
|
|
elm_table_pack(tb, bt, 4, 1, 1, 3);
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_show(bt);
|
|
|
|
|
|
|
|
evas_object_show(win);
|
2012-10-30 06:14:45 -07:00
|
|
|
evas_object_resize(win, 400, 400);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
2009-10-22 15:10:23 -07:00
|
|
|
|
2009-09-23 04:15:55 -07:00
|
|
|
#endif
|