-#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
+#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct _Testitem
{
- Elm_Gengrid_Item *item;
+ Elm_Object_Item *item;
const char *path;
int mode;
int onoff;
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- Evas_Object *gl = elm_gen_item_widget_get(it);
- int val = (int)(long)elm_genlist_item_data_get(it);
- Elm_Genlist_Item *it1, *it2, *it3;
+ Elm_Object_Item *glit = event_info;
+ Evas_Object *gl = elm_object_item_widget_get(glit);
+ int val = (int)(long) elm_object_item_data_get(glit);
+ Elm_Object_Item *glit1, *glit2, *glit3;
val *= 10;
- it1 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 1), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 2), it,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *)(long)(val + 3), it,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
-
- elm_genlist_item_tooltip_text_set(it1, "Testing A");
- elm_genlist_item_tooltip_text_set(it2, "Testing B");
- elm_genlist_item_tooltip_text_set(it3, "Testing C");
+ glit1 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 1), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 2), glit,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 3), glit,
+ ELM_GENLIST_ITEM_TREE, NULL, NULL);
+
+ elm_genlist_item_tooltip_text_set(glit1, "Testing A");
+ elm_genlist_item_tooltip_text_set(glit2, "Testing B");
+ elm_genlist_item_tooltip_text_set(glit3, "Testing C");
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_subitems_clear(it);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_subitems_clear(glit);
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 1);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_TRUE);
}
static void
Evas_Object *obj __UNUSED__,
void *event_info)
{
- Elm_Genlist_Item *it = event_info;
- elm_genlist_item_expanded_set(it, 0);
+ Elm_Object_Item *glit = event_info;
+ elm_genlist_item_expanded_set(glit, EINA_FALSE);
}
char *
-gltt_label_get(void *data,
+gltt_text_get(void *data,
Evas_Object *obj __UNUSED__,
const char *part __UNUSED__)
{
snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
evas_object_resize(ic, 64, 64);
return ic;
}
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
return ic;
}
{
int w, h, sw, sh;
Evas_Object *ic = elm_icon_add(tt);
-
+
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
elm_icon_size_get(ic, &w, &h);
+ elm_icon_resizable_set(ic, 0, 0);
elm_win_screen_size_get(tt, NULL, NULL, &sw, &sh);
if ((w > sw) || (h > sh))
{
void *item __UNUSED__)
{
Evas_Object *l = elm_label_add(tt);
- elm_object_text_set(l, "Something useful here?<ps>"
- "No probably not, but this is a super long label<ps>"
- "which probably breaks on your system, now doesn't it?<ps>"
+ elm_object_text_set(l, "Something useful here?<ps/>"
+ "No probably not, but this is a super long label<ps/>"
+ "which probably breaks on your system, now doesn't it?<ps/>"
"Yeah, I thought so.");
elm_label_line_wrap_set(l, ELM_WRAP_MIXED);
return l;
snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
evas_object_resize(ic, 64, 64);
return ic;
}
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/images/icon_00.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
evas_object_resize(ic, 64, 64);
return ic;
}
{
elm_object_text_set(obj, "Locked tooltip visibility");
elm_object_tooltip_text_set(obj, "This tooltip is locked"
- " visible,<br> click the button"
+ " visible,<br/> click the button"
" to unlock!");
elm_object_tooltip_show(obj);
}
{
elm_object_text_set(obj, "Unlocked tooltip visibility");
elm_object_tooltip_text_set(obj, "This tooltip is unlocked"
- " visible,<br> click the button"
+ " visible,<br/> click the button"
" to lock!");
elm_object_tooltip_hide(obj);
}
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
- Elm_Toolbar_Item *ti;
- Elm_List_Item *li;
+ Evas_Object *win, *bx, *tb, *bt, *se, *lst;
+ Elm_Object_Item *tb_it;
+ Elm_Object_Item *lit;
- win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
- elm_win_title_set(win, "Tooltip");
+ win = elm_win_util_standard_add("tooltip", "Tooltip");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
elm_box_pack_end(bx, tb);
evas_object_show(tb);
- ti = elm_toolbar_item_append(tb, NULL, "Open", NULL, NULL);
- elm_toolbar_item_tooltip_text_set(ti, "Opens a file");
+ tb_it = elm_toolbar_item_append(tb, NULL, "Open", NULL, NULL);
+ elm_object_item_tooltip_text_set(tb_it, "Opens a file");
- ti = elm_toolbar_item_append(tb, NULL, "Icon", NULL, NULL);
- elm_toolbar_item_tooltip_content_cb_set
- (ti, _tt_item_icon, (void *)456L, _tt_item_icon_del);
- elm_toolbar_item_tooltip_style_set(ti, "transparent");
+ tb_it = elm_toolbar_item_append(tb, NULL, "Icon", NULL, NULL);
+ elm_object_item_tooltip_content_cb_set
+ (tb_it, _tt_item_icon, (void *)456L, _tt_item_icon_del);
+ elm_object_item_tooltip_style_set(tb_it, "transparent");
bt = elm_button_add(win);
elm_object_text_set(bt, "Simple text tooltip");
bt = elm_button_add(win);
elm_object_text_set(bt, "Unlocked tooltip visibility");
- elm_object_tooltip_text_set(bt, "This tooltip is unlocked visible,<br>"
+ elm_object_tooltip_text_set(bt, "This tooltip is unlocked visible,<br/>"
" click the button to lock!");
evas_object_smart_callback_add(bt, "clicked", _tt_visible_lock_toggle,
NULL);
evas_object_size_hint_align_set(se, EVAS_HINT_FILL, 0.5);
elm_entry_scrollbar_policy_set(se, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
- elm_entry_entry_set(se, "Hello, some scrolled entry here!");
+ elm_object_text_set(se, "Hello, some entry here!");
elm_object_tooltip_text_set(se, "Type something here!");
- elm_entry_single_line_set(se, 1);
+ elm_entry_single_line_set(se, EINA_TRUE);
elm_box_pack_end(bx, se);
evas_object_show(se);
lst = elm_list_add(win);
- li = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_label, NULL, NULL);
- elm_list_item_tooltip_size_restrict_disable(li, EINA_TRUE);
- li = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon, NULL, NULL);
- li = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon2, NULL, NULL);
- elm_list_item_tooltip_style_set(li, "transparent");
- elm_list_item_tooltip_size_restrict_disable(li, EINA_TRUE);
- li = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
- elm_list_item_tooltip_content_cb_set(li, _tt_item_icon3, NULL, NULL);
- elm_list_item_tooltip_style_set(li, "transparent");
- elm_list_item_tooltip_size_restrict_disable(li, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
+ elm_object_item_tooltip_content_cb_set(lit, _tt_item_label, NULL, NULL);
+ elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon, NULL, NULL);
+ lit = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon2, NULL, NULL);
+ elm_object_item_tooltip_style_set(lit, "transparent");
+ elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
+ lit = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
+ elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon3, NULL, NULL);
+ elm_object_item_tooltip_style_set(lit, "transparent");
+ elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *grid, *gl;
- Elm_Genlist_Item *it1, *it2, *it3;
+ Evas_Object *win, *bx, *grid, *gl;
+ Elm_Object_Item *glit1, *glit2, *glit3;
static Testitem ti[144];
int i, n;
char buf[PATH_MAX];
"wood_01.jpg",
};
- win = elm_win_add(NULL, "tooltip2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Tooltip 2");
+ win = elm_win_util_standard_add("tooltip2", "Tooltip 2");
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);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
EVAS_HINT_EXPAND);
gic.item_style = "default";
- gic.func.label_get = grdt_lbl_get;
+ gic.func.text_get = grdt_lbl_get;
gic.func.content_get = grdt_content_get;
n = 0;
else
elm_gengrid_item_tooltip_text_set(ti[i].item, "Testing Y");
if (!(i % 5))
- elm_gen_item_selected_set(ti[i].item, EINA_TRUE);
+ elm_gengrid_item_selected_set(ti[i].item, EINA_TRUE);
}
elm_box_pack_end(bx, grid);
EVAS_HINT_EXPAND);
itct.item_style = "default";
- itct.func.label_get = gltt_label_get;
-
- it1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it2 = elm_genlist_item_append(gl, &itct, (void *)2, NULL,
- ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
- it3 = elm_genlist_item_append(gl, &itct, (void *)3, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
-
- elm_genlist_item_tooltip_text_set(it1, "Testing 1");
- elm_genlist_item_tooltip_text_set(it2, "Testing 2");
- elm_genlist_item_tooltip_text_set(it3, "Testing 3");
+ itct.func.text_get = gltt_text_get;
+
+ glit1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
+ ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ glit2 = elm_genlist_item_append(gl, &itct, (void *)2, NULL,
+ ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ glit3 = elm_genlist_item_append(gl, &itct, (void *)3, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+ elm_genlist_item_tooltip_text_set(glit1, "Testing 1");
+ elm_genlist_item_tooltip_text_set(glit2, "Testing 2");
+ elm_genlist_item_tooltip_text_set(glit3, "Testing 3");
evas_object_smart_callback_add(gl, "expand,request", gltt_exp_req, gl);
evas_object_smart_callback_add(gl, "contract,request", gltt_con_req,