2008-10-28 18:51:45 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
|
|
|
|
|
|
|
typedef struct _Widget_Data Widget_Data;
|
|
|
|
|
|
|
|
struct _Widget_Data
|
|
|
|
{
|
|
|
|
Evas_Object *bbl;
|
|
|
|
Evas_Object *content, *icon;
|
2010-11-11 10:04:08 -08:00
|
|
|
const char *label, *info, *corner;
|
2012-02-28 19:41:31 -08:00
|
|
|
Elm_Bubble_Pos pos;
|
2008-10-28 18:51:45 -07:00
|
|
|
};
|
|
|
|
|
2010-03-08 22:15:39 -08:00
|
|
|
static const char *widtype = NULL;
|
2008-10-28 18:51:45 -07:00
|
|
|
static void _del_hook(Evas_Object *obj);
|
2011-02-08 04:08:28 -08:00
|
|
|
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
|
2011-10-31 09:16:21 -07:00
|
|
|
static void _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content);
|
|
|
|
static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
|
|
|
|
static Evas_Object *_content_unset_hook(Evas_Object *obj, const char *part);
|
2008-11-15 05:58:50 -08:00
|
|
|
static void _theme_hook(Evas_Object *obj);
|
2008-10-28 18:51:45 -07:00
|
|
|
static void _sizing_eval(Evas_Object *obj);
|
|
|
|
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
|
|
|
static void _sub_del(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
|
2011-04-15 10:01:39 -07:00
|
|
|
static const char SIG_CLICKED[] = "clicked";
|
|
|
|
|
2010-11-11 10:04:45 -08:00
|
|
|
static const Evas_Smart_Cb_Description _signals[] =
|
|
|
|
{
|
2011-04-01 04:35:07 -07:00
|
|
|
{SIG_CLICKED, ""},
|
|
|
|
{NULL, NULL}
|
2010-11-11 10:04:45 -08:00
|
|
|
};
|
|
|
|
|
2012-03-28 02:02:22 -07:00
|
|
|
static const char *corner_string[] =
|
2012-02-28 19:41:31 -08:00
|
|
|
{
|
|
|
|
"top_left",
|
|
|
|
"top_right",
|
|
|
|
"bottom_left",
|
|
|
|
"bottom_right"
|
|
|
|
};
|
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
static void
|
|
|
|
_del_hook(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
2010-03-09 03:42:53 -08:00
|
|
|
if (!wd) return;
|
2008-11-15 05:58:50 -08:00
|
|
|
if (wd->label) eina_stringshare_del(wd->label);
|
|
|
|
if (wd->info) eina_stringshare_del(wd->info);
|
2010-11-11 10:04:08 -08:00
|
|
|
if (wd->corner) eina_stringshare_del(wd->corner);
|
2008-10-28 18:51:45 -07:00
|
|
|
free(wd);
|
|
|
|
}
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
static void
|
|
|
|
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return;
|
|
|
|
edje_object_mirrored_set(wd->bbl, rtl);
|
|
|
|
}
|
|
|
|
|
2008-11-15 05:58:50 -08:00
|
|
|
static void
|
|
|
|
_theme_hook(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
2010-03-09 03:42:53 -08:00
|
|
|
if (!wd) return;
|
2011-02-09 08:14:02 -08:00
|
|
|
_elm_widget_mirrored_reload(obj);
|
2011-02-08 04:08:28 -08:00
|
|
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
2012-02-28 19:41:31 -08:00
|
|
|
_elm_theme_object_set(obj, wd->bbl, "bubble", corner_string[wd->pos],
|
2010-11-11 10:04:08 -08:00
|
|
|
elm_widget_style_get(obj));
|
2012-04-20 05:51:10 -07:00
|
|
|
edje_object_part_text_escaped_set(wd->bbl, "elm.text", wd->label);
|
2011-01-04 00:42:55 -08:00
|
|
|
if (wd->label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible", "elm");
|
|
|
|
else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm");
|
2012-04-20 05:51:10 -07:00
|
|
|
edje_object_part_text_escaped_set(wd->bbl, "elm.info", wd->info);
|
2011-01-04 00:42:55 -08:00
|
|
|
if (wd->info) edje_object_signal_emit(wd->bbl, "elm,state,info,visible", "elm");
|
|
|
|
else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm");
|
2010-09-14 16:46:01 -07:00
|
|
|
if (wd->content)
|
|
|
|
{
|
|
|
|
edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content);
|
2011-04-01 04:35:07 -07:00
|
|
|
edje_object_message_signal_process(wd->bbl);
|
2010-09-14 16:46:01 -07:00
|
|
|
}
|
2010-11-11 10:04:08 -08:00
|
|
|
if (wd->icon)
|
|
|
|
edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm");
|
2010-09-14 16:46:01 -07:00
|
|
|
else
|
2010-11-11 10:04:08 -08:00
|
|
|
edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm");
|
|
|
|
edje_object_scale_set(wd->bbl,
|
|
|
|
elm_widget_scale_get(obj) * _elm_config->scale);
|
2008-11-15 05:58:50 -08:00
|
|
|
_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
|
2011-10-31 09:16:21 -07:00
|
|
|
static void
|
2011-11-07 17:05:01 -08:00
|
|
|
_content_set(Evas_Object *obj, Evas_Object *content)
|
2011-10-31 09:16:21 -07:00
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return;
|
2011-11-07 17:05:01 -08:00
|
|
|
|
2011-10-31 09:16:21 -07:00
|
|
|
if (wd->content == content) return;
|
|
|
|
if (wd->content) evas_object_del(wd->content);
|
|
|
|
wd->content = content;
|
|
|
|
if (content)
|
|
|
|
{
|
|
|
|
elm_widget_sub_object_add(obj, content);
|
|
|
|
evas_object_event_callback_add(content,
|
|
|
|
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints, obj);
|
|
|
|
edje_object_part_swallow(wd->bbl, "elm.swallow.content", content);
|
|
|
|
}
|
|
|
|
_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2011-11-07 17:05:01 -08:00
|
|
|
_content_unset(Evas_Object *obj)
|
2011-10-31 09:16:21 -07:00
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
Evas_Object *content;
|
|
|
|
if (!wd) return NULL;
|
|
|
|
if (!wd->content) return NULL;
|
|
|
|
content = wd->content;
|
|
|
|
elm_widget_sub_object_del(obj, content);
|
2011-11-07 17:05:01 -08:00
|
|
|
evas_object_event_callback_del_full(content,
|
|
|
|
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
2011-10-31 09:16:21 -07:00
|
|
|
_changed_size_hints, obj);
|
|
|
|
edje_object_part_unswallow(wd->bbl, content);
|
|
|
|
wd->content = NULL;
|
|
|
|
return content;
|
|
|
|
}
|
|
|
|
|
2011-11-07 17:05:01 -08:00
|
|
|
static void
|
|
|
|
_icon_set(Evas_Object *obj, Evas_Object* icon)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return;
|
|
|
|
if (wd->icon == icon) return;
|
|
|
|
if (wd->icon) evas_object_del(wd->icon);
|
|
|
|
wd->icon = icon;
|
|
|
|
if (icon)
|
|
|
|
{
|
|
|
|
elm_widget_sub_object_add(obj, icon);
|
|
|
|
edje_object_part_swallow(wd->bbl, "elm.swallow.icon", icon);
|
|
|
|
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints, obj);
|
|
|
|
edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm");
|
|
|
|
edje_object_message_signal_process(wd->bbl);
|
|
|
|
}
|
|
|
|
_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_icon_unset(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
Evas_Object *icon;
|
|
|
|
if (!wd) return NULL;
|
|
|
|
if (!wd->icon) return NULL;
|
|
|
|
icon = wd->icon;
|
|
|
|
elm_widget_sub_object_del(obj, icon);
|
|
|
|
evas_object_event_callback_del_full(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints, obj);
|
|
|
|
edje_object_part_unswallow(wd->bbl, icon);
|
|
|
|
wd->icon = NULL;
|
|
|
|
return icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return;
|
|
|
|
|
2011-11-16 04:51:53 -08:00
|
|
|
if (!part || !strcmp(part, "default"))
|
2011-11-07 17:05:01 -08:00
|
|
|
_content_set(obj, content);
|
2012-03-29 04:09:45 -07:00
|
|
|
else if (!strcmp(part, "icon"))
|
2011-11-07 17:05:01 -08:00
|
|
|
_icon_set(obj, content);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_content_get_hook(const Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return NULL;
|
2011-11-16 04:51:53 -08:00
|
|
|
if (!part || !strcmp(part, "default"))
|
2011-11-07 17:05:01 -08:00
|
|
|
return wd->content;
|
2012-03-29 04:09:45 -07:00
|
|
|
else if (!strcmp(part, "icon"))
|
2011-11-07 17:05:01 -08:00
|
|
|
return wd->icon;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_content_unset_hook(Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return NULL;
|
2011-11-16 04:51:53 -08:00
|
|
|
if (!part || !strcmp(part, "default"))
|
2011-11-07 17:05:01 -08:00
|
|
|
return _content_unset(obj);
|
2012-03-29 04:09:45 -07:00
|
|
|
else if (!strcmp(part, "icon"))
|
2011-11-07 17:05:01 -08:00
|
|
|
return _icon_unset(obj);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2010-10-01 12:03:02 -07:00
|
|
|
static Eina_Bool
|
2010-10-06 13:24:19 -07:00
|
|
|
_elm_bubble_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
|
2010-10-01 12:03:02 -07:00
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
Evas_Object *cur;
|
|
|
|
|
|
|
|
if ((!wd) || (!wd->content))
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
cur = wd->content;
|
|
|
|
|
|
|
|
/* Try Focus cycle in subitem */
|
2010-10-06 13:24:13 -07:00
|
|
|
return elm_widget_focus_next_get(cur, dir, next);
|
2010-10-01 12:03:02 -07:00
|
|
|
}
|
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
static void
|
|
|
|
_sizing_eval(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
|
2010-03-09 03:42:53 -08:00
|
|
|
if (!wd) return;
|
2010-12-07 07:55:08 -08:00
|
|
|
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
|
|
|
edje_object_size_min_restricted_calc(wd->bbl, &minw, &minh, minw, minh);
|
2008-10-28 18:51:45 -07:00
|
|
|
evas_object_size_hint_min_set(obj, minw, minh);
|
|
|
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-03-09 09:51:30 -08:00
|
|
|
_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2008-10-28 18:51:45 -07:00
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(data);
|
2010-03-09 03:42:53 -08:00
|
|
|
if (!wd) return;
|
2008-10-28 18:51:45 -07:00
|
|
|
_sizing_eval(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-03-09 09:51:30 -08:00
|
|
|
_sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
2008-10-28 18:51:45 -07:00
|
|
|
{
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
Evas_Object *sub = event_info;
|
2010-03-09 03:42:53 -08:00
|
|
|
if (!wd) return;
|
2009-10-22 15:10:23 -07:00
|
|
|
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
2011-04-01 04:35:07 -07:00
|
|
|
_changed_size_hints, obj);
|
2009-09-26 10:36:26 -07:00
|
|
|
if (sub == wd->content) wd->content = NULL;
|
2010-06-16 13:57:42 -07:00
|
|
|
else if (sub == wd->icon)
|
|
|
|
{
|
2011-04-01 04:35:07 -07:00
|
|
|
edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm");
|
|
|
|
wd->icon = NULL;
|
|
|
|
edje_object_message_signal_process(wd->bbl);
|
2010-06-16 13:57:42 -07:00
|
|
|
}
|
2009-09-26 10:36:26 -07:00
|
|
|
_sizing_eval(obj);
|
2008-10-28 18:51:45 -07:00
|
|
|
}
|
|
|
|
|
2010-11-11 10:04:45 -08:00
|
|
|
static void
|
|
|
|
_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Up *ev = event_info;
|
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
|
|
|
return;
|
|
|
|
evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
|
|
|
|
}
|
|
|
|
|
2011-07-04 03:14:11 -07:00
|
|
|
static void
|
|
|
|
_elm_bubble_label_set(Evas_Object *obj, const char *item, const char *label)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return;
|
|
|
|
|
2011-07-04 03:52:23 -07:00
|
|
|
if (!item || !strcmp(item, "default"))
|
2011-07-04 03:14:11 -07:00
|
|
|
{
|
|
|
|
eina_stringshare_replace(&wd->label, label);
|
2012-04-20 05:51:10 -07:00
|
|
|
edje_object_part_text_escaped_set(wd->bbl, "elm.text", label);
|
2011-07-04 03:14:11 -07:00
|
|
|
if (label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible",
|
2012-04-20 05:51:10 -07:00
|
|
|
"elm");
|
2011-07-04 03:14:11 -07:00
|
|
|
else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm");
|
|
|
|
_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
else if (!strcmp(item, "info"))
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&wd->info, label);
|
2012-04-20 05:51:10 -07:00
|
|
|
edje_object_part_text_escaped_set(wd->bbl, "elm.info", label);
|
2011-07-04 03:14:11 -07:00
|
|
|
if (label) edje_object_signal_emit(wd->bbl, "elm,state,info,visible",
|
2012-04-20 05:51:10 -07:00
|
|
|
"elm");
|
2011-07-04 03:14:11 -07:00
|
|
|
else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm");
|
|
|
|
_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char*
|
|
|
|
_elm_bubble_label_get(const Evas_Object *obj, const char *item)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
|
|
|
if (!wd) return NULL;
|
|
|
|
|
2011-07-04 03:52:23 -07:00
|
|
|
if (!item || !strcmp(item, "default"))
|
2011-07-04 03:14:11 -07:00
|
|
|
{
|
|
|
|
return wd->label;
|
|
|
|
}
|
|
|
|
else if (!strcmp(item, "info"))
|
|
|
|
{
|
|
|
|
return wd->info;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_bubble_add(Evas_Object *parent)
|
|
|
|
{
|
|
|
|
Evas_Object *obj;
|
|
|
|
Evas *e;
|
|
|
|
Widget_Data *wd;
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2011-03-31 23:08:02 -07:00
|
|
|
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
2011-04-01 04:35:07 -07:00
|
|
|
|
2010-03-08 22:15:39 -08:00
|
|
|
ELM_SET_WIDTYPE(widtype, "bubble");
|
2009-05-13 05:21:52 -07:00
|
|
|
elm_widget_type_set(obj, "bubble");
|
|
|
|
elm_widget_sub_object_add(parent, obj);
|
2008-10-28 18:51:45 -07:00
|
|
|
elm_widget_data_set(obj, wd);
|
|
|
|
elm_widget_del_hook_set(obj, _del_hook);
|
2008-11-15 05:58:50 -08:00
|
|
|
elm_widget_theme_hook_set(obj, _theme_hook);
|
2010-10-06 13:24:13 -07:00
|
|
|
elm_widget_focus_next_hook_set(obj, _elm_bubble_focus_next_hook);
|
2010-09-29 05:22:30 -07:00
|
|
|
elm_widget_can_focus_set(obj, EINA_FALSE);
|
2011-07-04 03:14:11 -07:00
|
|
|
elm_widget_text_set_hook_set(obj, _elm_bubble_label_set);
|
|
|
|
elm_widget_text_get_hook_set(obj, _elm_bubble_label_get);
|
2011-10-31 09:16:21 -07:00
|
|
|
elm_widget_content_set_hook_set(obj, _content_set_hook);
|
|
|
|
elm_widget_content_get_hook_set(obj, _content_get_hook);
|
|
|
|
elm_widget_content_unset_hook_set(obj, _content_unset_hook);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2010-11-11 10:04:08 -08:00
|
|
|
wd->corner = eina_stringshare_add("base");
|
2012-02-28 19:41:31 -08:00
|
|
|
wd->pos = ELM_BUBBLE_POS_TOP_LEFT; //default
|
2010-11-11 10:04:08 -08:00
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
wd->bbl = edje_object_add(e);
|
|
|
|
elm_widget_resize_object_set(obj, wd->bbl);
|
|
|
|
|
|
|
|
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
2010-11-11 10:04:45 -08:00
|
|
|
evas_object_event_callback_add(wd->bbl, EVAS_CALLBACK_MOUSE_UP,
|
|
|
|
_mouse_up, obj);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2010-11-11 10:04:45 -08:00
|
|
|
evas_object_smart_callbacks_descriptions_set(obj, _signals);
|
2011-02-08 04:08:28 -08:00
|
|
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
|
|
|
_elm_theme_object_set(obj, wd->bbl, "bubble", wd->corner,
|
|
|
|
elm_widget_style_get(obj));
|
2008-10-28 18:51:45 -07:00
|
|
|
_sizing_eval(obj);
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
2012-02-28 19:41:31 -08:00
|
|
|
EAPI void
|
|
|
|
elm_bubble_pos_set(Evas_Object *obj, Elm_Bubble_Pos pos)
|
2008-12-04 23:42:14 -08:00
|
|
|
{
|
2010-03-08 22:15:39 -08:00
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
2008-12-04 23:42:14 -08:00
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
2010-12-03 06:08:33 -08:00
|
|
|
if (!wd) return;
|
2012-03-29 04:09:45 -07:00
|
|
|
if (pos<ELM_BUBBLE_POS_TOP_LEFT || pos>ELM_BUBBLE_POS_BOTTOM_RIGHT) return;
|
2012-02-28 19:41:31 -08:00
|
|
|
wd->pos = pos;
|
2010-11-11 10:04:08 -08:00
|
|
|
_theme_hook(obj);
|
|
|
|
}
|
|
|
|
|
2012-02-28 19:41:31 -08:00
|
|
|
EAPI Elm_Bubble_Pos
|
|
|
|
elm_bubble_pos_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
ELM_CHECK_WIDTYPE(obj, widtype) ELM_BUBBLE_POS_INVALID;
|
2010-11-11 10:04:08 -08:00
|
|
|
Widget_Data *wd = elm_widget_data_get(obj);
|
2012-02-28 19:41:31 -08:00
|
|
|
if (!wd) return ELM_BUBBLE_POS_INVALID;
|
|
|
|
return wd->pos;
|
2008-12-04 23:42:14 -08:00
|
|
|
}
|