2013-04-25 22:13:00 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
2012-08-01 14:04:39 -07:00
|
|
|
#include "elm_widget_bubble.h"
|
2012-11-25 22:32:53 -08:00
|
|
|
#include "elm_widget_layout.h"
|
2008-10-28 18:51:45 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
EAPI Eo_Op ELM_OBJ_BUBBLE_BASE_ID = EO_NOOP;
|
|
|
|
|
|
|
|
#define MY_CLASS ELM_OBJ_BUBBLE_CLASS
|
|
|
|
|
|
|
|
#define MY_CLASS_NAME "elm_bubble"
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2011-04-15 10:01:39 -07:00
|
|
|
static const char SIG_CLICKED[] = "clicked";
|
2013-06-09 02:54:43 -07:00
|
|
|
|
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] =
|
|
|
|
{
|
|
|
|
{SIG_CLICKED, ""},
|
elm: do not declare SIG_FUCSED/SIG_UNFOCUSED if the const char is not used more than once.
ctxpopup, fileselector_button, naviframe, player, popup, bubble, button, calendar, check, clock, colorselector, datetime, diskselector, flipselector, gengrid.
2013-06-09 22:05:33 -07:00
|
|
|
{"focused", ""}, /**< handled by elm_widget */
|
|
|
|
{"unfocused", ""}, /**< handled by elm_widget */
|
2013-06-09 02:54:43 -07:00
|
|
|
{NULL, NULL}
|
|
|
|
};
|
2011-04-15 10:01:39 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
static const Elm_Layout_Part_Alias_Description _content_aliases[] =
|
2010-11-11 10:04:45 -08:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
{"default", "elm.swallow.content"},
|
|
|
|
{"icon", "elm.swallow.icon"},
|
|
|
|
{NULL, NULL}
|
2010-11-11 10:04:45 -08:00
|
|
|
};
|
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
static const Elm_Layout_Part_Alias_Description _text_aliases[] =
|
2012-02-28 19:41:31 -08:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
{"default", "elm.text"},
|
|
|
|
{"info", "elm.info"},
|
|
|
|
{NULL, NULL}
|
2012-02-28 19:41:31 -08:00
|
|
|
};
|
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
static const char *corner_string[] =
|
2011-02-08 04:08:28 -08:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
"top_left",
|
|
|
|
"top_right",
|
|
|
|
"bottom_left",
|
|
|
|
"bottom_right"
|
|
|
|
};
|
2008-11-15 05:58:50 -08:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
static void
|
2012-11-25 22:32:53 -08:00
|
|
|
_elm_bubble_smart_sizing_eval(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
|
2012-05-02 09:59:07 -07:00
|
|
|
|
2013-04-24 04:41:37 -07:00
|
|
|
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
2011-10-31 09:16:21 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
|
|
|
edje_object_size_min_restricted_calc
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, &minw, &minh, minw, minh);
|
2012-05-03 15:42:26 -07:00
|
|
|
evas_object_size_hint_min_set(obj, minw, minh);
|
|
|
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2011-10-31 09:16:21 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
static void
|
2012-05-03 15:42:26 -07:00
|
|
|
_on_mouse_up(void *data,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
Evas_Event_Mouse_Up *ev = event_info;
|
2012-05-02 09:59:07 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
|
|
|
return;
|
2011-11-07 17:05:01 -08:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2011-11-07 17:05:01 -08:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
/* overriding layout's focus_next() in order to just cycle through the
|
|
|
|
* content's tree */
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
|
|
|
_elm_bubble_smart_focus_next(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
Evas_Object *content;
|
2011-11-07 17:05:01 -08:00
|
|
|
|
2013-04-24 04:41:37 -07:00
|
|
|
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
2012-11-25 22:32:53 -08:00
|
|
|
|
|
|
|
Elm_Focus_Direction dir = va_arg(*list, Elm_Focus_Direction);
|
|
|
|
Evas_Object **next = va_arg(*list, Evas_Object **);
|
|
|
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
|
|
|
if (ret) *ret = EINA_FALSE;
|
|
|
|
Eina_Bool int_ret = EINA_FALSE;
|
2012-05-03 15:42:26 -07:00
|
|
|
|
2012-09-18 03:56:19 -07:00
|
|
|
if ((elm_widget_can_focus_get(obj)) &&
|
2012-11-25 22:32:53 -08:00
|
|
|
(!wd->focused))
|
2012-09-18 03:56:19 -07:00
|
|
|
{
|
|
|
|
// ACCESS
|
|
|
|
*next = (Evas_Object *)obj;
|
2012-11-25 22:32:53 -08:00
|
|
|
if (ret) *ret = EINA_TRUE;
|
|
|
|
return;
|
2012-09-18 03:56:19 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
content = elm_layout_content_get(obj, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (!content) return;
|
2012-05-03 15:42:26 -07:00
|
|
|
|
2012-09-18 03:56:19 -07:00
|
|
|
/* attempt to follow focus cycle into sub-object */
|
2012-11-25 22:32:53 -08:00
|
|
|
int_ret = elm_widget_focus_next_get(content, dir, next);
|
|
|
|
if (ret) *ret = int_ret;
|
2012-09-18 03:56:19 -07:00
|
|
|
}
|
2011-11-07 17:05:01 -08:00
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
|
|
|
_elm_bubble_smart_focus_direction(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
2010-10-01 12:03:02 -07:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
Evas_Object *content;
|
2010-10-01 12:03:02 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
Evas_Object *base = va_arg(*list, Evas_Object *);
|
|
|
|
double degree = va_arg(*list, double);
|
|
|
|
Evas_Object **direction = va_arg(*list, Evas_Object **);
|
|
|
|
double *weight = va_arg(*list, double *);
|
|
|
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
|
|
|
if (ret) *ret = EINA_FALSE;
|
|
|
|
Eina_Bool int_ret;
|
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
content = elm_layout_content_get(obj, NULL);
|
2010-10-01 12:03:02 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
if (!content) return;
|
2010-10-01 12:03:02 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
/* Try Focus cycle in subitem */
|
2012-11-25 22:32:53 -08:00
|
|
|
int_ret = elm_widget_focus_direction_get
|
2012-05-03 15:42:26 -07:00
|
|
|
(content, base, degree, direction, weight);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (ret) *ret = int_ret;
|
2010-10-01 12:03:02 -07:00
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
|
|
|
_elm_bubble_smart_text_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
2012-05-02 20:02:54 -07:00
|
|
|
{
|
2013-07-22 13:34:19 -07:00
|
|
|
const char *part = va_arg(*list, const char *);
|
2012-11-25 22:32:53 -08:00
|
|
|
const char *label = va_arg(*list, const char *);
|
|
|
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
|
|
|
if (ret) *ret = EINA_FALSE;
|
|
|
|
Eina_Bool int_ret = EINA_FALSE;
|
2013-07-22 14:05:16 -07:00
|
|
|
|
2013-07-22 13:34:19 -07:00
|
|
|
eo_do_super(obj, MY_CLASS, elm_obj_layout_text_set(part, label, &int_ret));
|
2012-11-25 22:32:53 -08:00
|
|
|
if (!int_ret) return;
|
2012-09-14 06:30:18 -07:00
|
|
|
|
2013-07-22 13:34:19 -07:00
|
|
|
if (part && (!strcmp(part, "info") || !strcmp(part, "elm.info")))
|
2012-05-03 15:42:26 -07:00
|
|
|
{
|
|
|
|
if (label)
|
|
|
|
elm_layout_signal_emit(obj, "elm,state,info,visible", "elm");
|
|
|
|
else
|
|
|
|
elm_layout_signal_emit(obj, "elm,state,info,hidden", "elm");
|
|
|
|
}
|
2012-05-02 20:02:54 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
elm_layout_sizing_eval(obj);
|
2012-05-02 20:02:54 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
if (ret) *ret = EINA_TRUE;
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2008-10-28 18:51:45 -07:00
|
|
|
|
2012-09-18 03:56:19 -07:00
|
|
|
static char *
|
2012-12-23 06:50:56 -08:00
|
|
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
2012-09-18 03:56:19 -07:00
|
|
|
{
|
|
|
|
char *ret;
|
|
|
|
Eina_Strbuf *buf;
|
|
|
|
buf = eina_strbuf_new();
|
|
|
|
Evas_Object *content;
|
|
|
|
const char *default_txt = NULL;
|
|
|
|
const char *content_txt = NULL;
|
|
|
|
const char *info_txt = NULL;
|
|
|
|
|
|
|
|
default_txt = elm_widget_access_info_get(obj);
|
|
|
|
if (!default_txt) default_txt = elm_layout_text_get(obj, NULL);
|
|
|
|
if (default_txt) eina_strbuf_append(buf, default_txt);
|
|
|
|
|
|
|
|
content = elm_layout_content_get(obj, NULL);
|
|
|
|
if (content) content_txt = elm_layout_text_get(content, NULL);
|
|
|
|
if (content_txt)
|
|
|
|
{
|
|
|
|
if (!eina_strbuf_length_get(buf))
|
|
|
|
eina_strbuf_append(buf, content_txt);
|
|
|
|
else
|
|
|
|
eina_strbuf_append_printf(buf, ", %s", content_txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
info_txt = edje_object_part_text_get(elm_layout_edje_get(obj), "elm.info");
|
|
|
|
if (info_txt)
|
|
|
|
{
|
|
|
|
if (!eina_strbuf_length_get(buf))
|
|
|
|
eina_strbuf_append(buf, info_txt);
|
|
|
|
else
|
|
|
|
eina_strbuf_append_printf(buf, ", %s", info_txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = eina_strbuf_string_steal(buf);
|
|
|
|
eina_strbuf_free(buf);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
static void
|
2012-11-25 22:32:53 -08:00
|
|
|
_elm_bubble_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-11-25 22:32:53 -08:00
|
|
|
Elm_Bubble_Smart_Data *priv = _pd;
|
2013-04-24 04:41:37 -07:00
|
|
|
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
2010-11-11 10:04:45 -08:00
|
|
|
|
2013-03-18 09:07:38 -07:00
|
|
|
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
|
2013-09-24 21:33:39 -07:00
|
|
|
elm_widget_sub_object_parent_add(obj);
|
2013-08-26 08:29:45 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
priv->pos = ELM_BUBBLE_POS_TOP_LEFT; //default
|
2011-07-04 03:14:11 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
elm_widget_can_focus_set(obj, EINA_FALSE);
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:42:26 -07:00
|
|
|
evas_object_event_callback_add
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, EVAS_CALLBACK_MOUSE_UP,
|
2012-05-03 15:42:26 -07:00
|
|
|
_on_mouse_up, obj);
|
|
|
|
|
2012-09-18 03:56:19 -07:00
|
|
|
// ACCESS
|
2012-11-25 22:32:53 -08:00
|
|
|
_elm_access_object_register(obj, wd->resize_obj);
|
2012-09-18 03:56:19 -07:00
|
|
|
_elm_access_text_set
|
2013-07-30 20:53:04 -07:00
|
|
|
(_elm_access_info_get(obj), ELM_ACCESS_TYPE, E_("Bubble"));
|
2012-09-18 03:56:19 -07:00
|
|
|
_elm_access_callback_set
|
2013-07-30 20:53:04 -07:00
|
|
|
(_elm_access_info_get(obj), ELM_ACCESS_INFO, _access_info_cb, NULL);
|
2012-09-18 03:56:19 -07:00
|
|
|
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set(obj, "bubble", "base", elm_widget_style_get(obj)))
|
|
|
|
CRITICAL("Failed to set layout!");
|
2012-07-17 11:44:55 -07:00
|
|
|
|
|
|
|
elm_layout_sizing_eval(obj);
|
2012-09-18 03:56:19 -07:00
|
|
|
|
2013-03-22 01:42:04 -07:00
|
|
|
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
|
2012-09-18 03:56:19 -07:00
|
|
|
elm_widget_can_focus_set(obj, EINA_TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-11-25 22:32:53 -08:00
|
|
|
_elm_bubble_smart_access(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
2012-09-18 03:56:19 -07:00
|
|
|
{
|
2012-11-25 22:32:53 -08:00
|
|
|
Eina_Bool is_access = va_arg(*list, int);
|
2012-09-18 03:56:19 -07:00
|
|
|
ELM_BUBBLE_CHECK(obj);
|
|
|
|
|
|
|
|
if (is_access)
|
|
|
|
elm_widget_can_focus_set(obj, EINA_TRUE);
|
|
|
|
else
|
|
|
|
elm_widget_can_focus_set(obj, EINA_FALSE);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2011-07-04 03:14:11 -07:00
|
|
|
|
2008-10-28 18:51:45 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_bubble_add(Evas_Object *parent)
|
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
Evas_Object *obj = eo_add(MY_CLASS, parent);
|
|
|
|
eo_unref(obj);
|
|
|
|
return obj;
|
|
|
|
}
|
2012-05-03 15:42:26 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
|
|
|
_constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
|
|
|
|
{
|
2013-03-18 09:07:38 -07:00
|
|
|
eo_do_super(obj, MY_CLASS, eo_constructor());
|
2012-11-25 22:32:53 -08:00
|
|
|
eo_do(obj,
|
|
|
|
evas_obj_type_set(MY_CLASS_NAME),
|
|
|
|
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
|
2008-10-28 18:51:45 -07:00
|
|
|
}
|
|
|
|
|
2012-02-28 19:41:31 -08:00
|
|
|
EAPI void
|
2012-05-03 15:42:26 -07:00
|
|
|
elm_bubble_pos_set(Evas_Object *obj,
|
|
|
|
Elm_Bubble_Pos pos)
|
2008-12-04 23:42:14 -08:00
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
ELM_BUBBLE_CHECK(obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
eo_do(obj, elm_obj_bubble_pos_set(pos));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_pos_set(Eo *obj, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
Elm_Bubble_Pos pos = va_arg(*list, Elm_Bubble_Pos);
|
|
|
|
Elm_Bubble_Smart_Data *sd = _pd;
|
2013-04-24 04:41:37 -07:00
|
|
|
Elm_Layout_Smart_Data *ld = eo_data_scope_get(obj, ELM_OBJ_LAYOUT_CLASS);
|
2012-05-03 15:42:26 -07:00
|
|
|
|
|
|
|
if (pos < ELM_BUBBLE_POS_TOP_LEFT || pos > ELM_BUBBLE_POS_BOTTOM_RIGHT)
|
|
|
|
return;
|
|
|
|
|
|
|
|
sd->pos = pos;
|
|
|
|
|
|
|
|
eina_stringshare_replace
|
2012-11-25 22:32:53 -08:00
|
|
|
(&ld->group, corner_string[sd->pos]);
|
2012-05-03 15:42:26 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
eo_do(obj, elm_wdg_theme(NULL));
|
2010-11-11 10:04:08 -08:00
|
|
|
}
|
|
|
|
|
2012-02-28 19:41:31 -08:00
|
|
|
EAPI Elm_Bubble_Pos
|
|
|
|
elm_bubble_pos_get(const Evas_Object *obj)
|
|
|
|
{
|
2012-05-03 15:42:26 -07:00
|
|
|
ELM_BUBBLE_CHECK(obj) ELM_BUBBLE_POS_INVALID;
|
2012-11-25 22:32:53 -08:00
|
|
|
Elm_Bubble_Pos ret = ELM_BUBBLE_POS_INVALID;
|
|
|
|
eo_do((Eo *) obj, elm_obj_bubble_pos_get(&ret));
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_pos_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
Elm_Bubble_Pos *ret = va_arg(*list, Elm_Bubble_Pos *);
|
|
|
|
Elm_Bubble_Smart_Data *sd = _pd;
|
|
|
|
*ret = sd->pos;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_bubble_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
|
|
|
{
|
|
|
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
|
|
|
*ret = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_bubble_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
|
|
|
{
|
|
|
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
|
|
|
*ret = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_bubble_smart_text_aliases_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
|
|
|
{
|
|
|
|
const Elm_Layout_Part_Alias_Description **aliases = va_arg(*list, const Elm_Layout_Part_Alias_Description **);
|
|
|
|
*aliases = _text_aliases;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_bubble_smart_content_aliases_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
|
|
|
{
|
|
|
|
const Elm_Layout_Part_Alias_Description **aliases = va_arg(*list, const Elm_Layout_Part_Alias_Description **);
|
|
|
|
*aliases = _content_aliases;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_class_constructor(Eo_Class *klass)
|
|
|
|
{
|
|
|
|
const Eo_Op_Func_Description func_desc[] = {
|
|
|
|
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
|
|
|
|
|
|
|
|
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_bubble_smart_add),
|
|
|
|
|
|
|
|
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_bubble_smart_focus_next_manager_is),
|
|
|
|
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_bubble_smart_focus_next),
|
|
|
|
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_bubble_smart_focus_direction_manager_is),
|
|
|
|
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION), _elm_bubble_smart_focus_direction),
|
|
|
|
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS), _elm_bubble_smart_access),
|
2012-05-03 15:42:26 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET), _elm_bubble_smart_text_set),
|
|
|
|
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_bubble_smart_sizing_eval),
|
|
|
|
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_ALIASES_GET), _elm_bubble_smart_text_aliases_get),
|
|
|
|
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET), _elm_bubble_smart_content_aliases_get),
|
|
|
|
|
|
|
|
EO_OP_FUNC(ELM_OBJ_BUBBLE_ID(ELM_OBJ_BUBBLE_SUB_ID_POS_SET), _pos_set),
|
|
|
|
EO_OP_FUNC(ELM_OBJ_BUBBLE_ID(ELM_OBJ_BUBBLE_SUB_ID_POS_GET), _pos_get),
|
|
|
|
|
|
|
|
EO_OP_FUNC_SENTINEL
|
|
|
|
};
|
|
|
|
eo_class_funcs_set(klass, func_desc);
|
2013-02-09 23:52:31 -08:00
|
|
|
|
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
|
2008-12-04 23:42:14 -08:00
|
|
|
}
|
2012-11-25 22:32:53 -08:00
|
|
|
static const Eo_Op_Description op_desc[] = {
|
|
|
|
EO_OP_DESCRIPTION(ELM_OBJ_BUBBLE_SUB_ID_POS_SET, "Set the corner of the bubble."),
|
|
|
|
EO_OP_DESCRIPTION(ELM_OBJ_BUBBLE_SUB_ID_POS_GET, "Get the corner of the bubble."),
|
|
|
|
EO_OP_DESCRIPTION_SENTINEL
|
|
|
|
};
|
|
|
|
static const Eo_Class_Description class_desc = {
|
|
|
|
EO_VERSION,
|
|
|
|
MY_CLASS_NAME,
|
|
|
|
EO_CLASS_TYPE_REGULAR,
|
|
|
|
EO_CLASS_DESCRIPTION_OPS(&ELM_OBJ_BUBBLE_BASE_ID, op_desc, ELM_OBJ_BUBBLE_SUB_ID_LAST),
|
|
|
|
NULL,
|
|
|
|
sizeof(Elm_Bubble_Smart_Data),
|
|
|
|
_class_constructor,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
EO_DEFINE_CLASS(elm_obj_bubble_class_get, &class_desc, ELM_OBJ_LAYOUT_CLASS, NULL);
|