2009-09-23 04:15:55 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
2012-05-03 15:44:51 -07:00
|
|
|
#include "elm_widget_container.h"
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
static const char NOTIFY_SMART_NAME[] = "elm_notify";
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
typedef struct _Elm_Notify_Smart_Data Elm_Notify_Smart_Data;
|
|
|
|
|
|
|
|
struct _Elm_Notify_Smart_Data
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
Elm_Widget_Smart_Data base;
|
2012-05-02 10:02:18 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
Evas_Object *notify, *content, *parent;
|
|
|
|
Evas_Object *block_events;
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
Elm_Notify_Orient orient;
|
|
|
|
|
|
|
|
double timeout;
|
|
|
|
Ecore_Timer *timer;
|
2009-10-15 13:48:00 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
Eina_Bool allow_events : 1;
|
|
|
|
};
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2010-09-27 12:52:56 -07:00
|
|
|
static const char SIG_BLOCK_CLICKED[] = "block,clicked";
|
|
|
|
static const char SIG_TIMEOUT[] = "timeout";
|
2012-05-03 15:44:51 -07:00
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|
|
|
{SIG_BLOCK_CLICKED, ""},
|
|
|
|
{SIG_TIMEOUT, ""},
|
|
|
|
{NULL, NULL}
|
2010-09-27 12:52:56 -07:00
|
|
|
};
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
#define ELM_NOTIFY_DATA_GET(o, sd) \
|
|
|
|
Elm_Notify_Smart_Data * sd = evas_object_smart_data_get(o)
|
|
|
|
|
|
|
|
#define ELM_NOTIFY_DATA_GET_OR_RETURN(o, ptr) \
|
|
|
|
ELM_NOTIFY_DATA_GET(o, ptr); \
|
|
|
|
if (!ptr) \
|
|
|
|
{ \
|
|
|
|
CRITICAL("No widget data for object %p (%s)", \
|
|
|
|
o, evas_object_type_get(o)); \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_NOTIFY_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
|
|
|
ELM_NOTIFY_DATA_GET(o, ptr); \
|
|
|
|
if (!ptr) \
|
|
|
|
{ \
|
|
|
|
CRITICAL("No widget data for object %p (%s)", \
|
|
|
|
o, evas_object_type_get(o)); \
|
|
|
|
return val; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_NOTIFY_CHECK(obj) \
|
|
|
|
if (!obj || !elm_widget_type_check((obj), NOTIFY_SMART_NAME, __func__)) \
|
|
|
|
return
|
|
|
|
|
|
|
|
EVAS_SMART_SUBCLASS_NEW
|
|
|
|
(NOTIFY_SMART_NAME, _elm_notify, Elm_Container_Smart_Class,
|
|
|
|
Elm_Container_Smart_Class, elm_container_smart_class_get, NULL);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
/**
|
|
|
|
* Return Notification orientation with RTL
|
|
|
|
*
|
|
|
|
* This function switches-sides of notification area when in RTL mode.
|
|
|
|
*
|
|
|
|
* @param obj notification object.
|
|
|
|
*
|
|
|
|
* @param orient Original notification orientation.
|
|
|
|
*
|
|
|
|
* @return notification orientation with respect to the object RTL mode.
|
|
|
|
*
|
|
|
|
* @internal
|
|
|
|
**/
|
|
|
|
static Elm_Notify_Orient
|
2012-05-03 15:44:51 -07:00
|
|
|
_notify_orientation_rtl_fix(Evas_Object *obj,
|
|
|
|
Elm_Notify_Orient orient)
|
2011-02-08 04:08:28 -08:00
|
|
|
{
|
|
|
|
if (elm_widget_mirrored_get(obj))
|
|
|
|
{
|
|
|
|
switch (orient)
|
|
|
|
{
|
|
|
|
case ELM_NOTIFY_ORIENT_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_RIGHT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_LEFT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
default:
|
2012-05-03 15:44:51 -07:00
|
|
|
break;
|
2011-02-08 04:08:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return orient;
|
|
|
|
}
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
static void
|
|
|
|
_notify_theme_apply(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
const char *style = elm_widget_style_get(obj);
|
2010-08-18 12:18:42 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
switch (sd->orient)
|
2010-07-14 12:04:22 -07:00
|
|
|
{
|
|
|
|
case ELM_NOTIFY_ORIENT_TOP:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set(obj, sd->notify, "notify", "top", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_CENTER:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "center", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "bottom", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set(obj, sd->notify, "notify", "left", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set(obj, sd->notify, "notify", "right", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "top_left", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "top_right", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "bottom_left", style);
|
|
|
|
break;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, sd->notify, "notify", "bottom_right", style);
|
|
|
|
break;
|
|
|
|
|
2010-08-18 12:18:42 -07:00
|
|
|
case ELM_NOTIFY_ORIENT_LAST:
|
2012-05-03 15:44:51 -07:00
|
|
|
break;
|
2010-07-14 12:04:22 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
/**
|
|
|
|
* Moves notification to orientation.
|
|
|
|
*
|
|
|
|
* This fucntion moves notification to orientation
|
|
|
|
* according to object RTL orientation.
|
|
|
|
*
|
|
|
|
* @param obj notification object.
|
|
|
|
*
|
|
|
|
* @param orient notification orientation.
|
|
|
|
*
|
|
|
|
* @internal
|
|
|
|
**/
|
|
|
|
static void
|
|
|
|
_notify_move_to_orientation(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
int offx;
|
|
|
|
int offy;
|
|
|
|
Evas_Coord minw = -1, minh = -1;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
2012-05-03 15:44:51 -07:00
|
|
|
edje_object_size_min_get(sd->notify, &minw, &minh);
|
|
|
|
edje_object_size_min_restricted_calc(sd->notify, &minw, &minh, minw, minh);
|
2011-02-08 04:08:28 -08:00
|
|
|
offx = (w - minw) / 2;
|
|
|
|
offy = (h - minh) / 2;
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
switch (_notify_orientation_rtl_fix(obj, sd->orient))
|
2011-02-08 04:08:28 -08:00
|
|
|
{
|
|
|
|
case ELM_NOTIFY_ORIENT_TOP:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + offx, y);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_CENTER:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + offx, y + offy);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + offx, y + h - minh);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x, y + offy);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + w - minw, y + offy);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x, y);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_TOP_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + w - minw, y);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x, y + h - minh);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_move(sd->notify, x + w - minw, y + h - minh);
|
|
|
|
break;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
case ELM_NOTIFY_ORIENT_LAST:
|
2012-05-03 15:44:51 -07:00
|
|
|
break;
|
2011-02-08 04:08:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
static void
|
|
|
|
_block_events_theme_apply(Evas_Object *obj)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
const char *style = elm_widget_style_get(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
elm_layout_theme_set(sd->block_events, "notify", "block_events", style);
|
2010-07-14 12:04:22 -07:00
|
|
|
}
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
static void
|
|
|
|
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
edje_object_mirrored_set(sd->notify, rtl);
|
2011-02-08 04:08:28 -08:00
|
|
|
_notify_move_to_orientation(obj);
|
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_sizing_eval(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (!sd->parent) return;
|
|
|
|
evas_object_geometry_get(sd->parent, &x, &y, &w, &h);
|
|
|
|
evas_object_move(obj, x, y);
|
|
|
|
evas_object_resize(obj, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_elm_notify_smart_theme(Evas_Object *obj)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (!ELM_WIDGET_CLASS(_elm_notify_parent_sc)->theme(obj)) return EINA_FALSE;
|
|
|
|
|
2011-02-08 04:08:28 -08:00
|
|
|
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
2012-05-03 15:44:51 -07:00
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
_notify_theme_apply(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
if (sd->block_events) _block_events_theme_apply(obj);
|
|
|
|
|
|
|
|
edje_object_scale_set
|
|
|
|
(sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get());
|
|
|
|
|
2009-09-23 04:15:55 -07:00
|
|
|
_sizing_eval(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
return EINA_TRUE;
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_calc(Evas_Object *obj)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
Evas_Coord minw = -1, minh = -1;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
_sizing_eval(obj);
|
|
|
|
|
|
|
|
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
|
|
|
|
|
|
|
edje_object_size_min_get(sd->notify, &minw, &minh);
|
|
|
|
edje_object_size_min_restricted_calc(sd->notify, &minw, &minh, minw, minh);
|
|
|
|
|
|
|
|
if (sd->content)
|
|
|
|
{
|
|
|
|
_notify_move_to_orientation(obj);
|
|
|
|
evas_object_resize(sd->notify, minw, minh);
|
|
|
|
}
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_changed_size_hints_cb(void *data,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info __UNUSED__)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2010-06-23 10:58:08 -07:00
|
|
|
_calc(data);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_content_resize_cb(void *data,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info __UNUSED__)
|
|
|
|
{
|
|
|
|
_calc(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_elm_notify_smart_sub_object_del(Evas_Object *obj,
|
|
|
|
Evas_Object *sobj)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
2010-06-23 10:58:08 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
if (!ELM_WIDGET_CLASS(_elm_notify_parent_sc)->sub_object_del(obj, sobj))
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
if (sobj == sd->content)
|
2010-06-16 13:58:09 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sobj, EVAS_CALLBACK_RESIZE, _content_resize_cb, obj);
|
|
|
|
sd->content = NULL;
|
2010-06-16 13:58:09 -07:00
|
|
|
}
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
return EINA_TRUE;
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-02-22 01:48:21 -08:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_block_area_clicked_cb(void *data,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
const char *emission __UNUSED__,
|
|
|
|
const char *source __UNUSED__)
|
2010-02-22 01:48:21 -08:00
|
|
|
{
|
2010-09-27 12:52:56 -07:00
|
|
|
evas_object_smart_callback_call(data, SIG_BLOCK_CLICKED, NULL);
|
2010-02-22 01:48:21 -08:00
|
|
|
}
|
|
|
|
|
2011-06-17 06:36:05 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_restack_cb(void *data __UNUSED__,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj,
|
|
|
|
void *event_info __UNUSED__)
|
2011-06-17 06:36:05 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
2009-09-23 06:05:00 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_layer_set(sd->notify, evas_object_layer_get(obj));
|
2009-10-04 16:05:50 -07:00
|
|
|
}
|
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_resize(Evas_Object *obj,
|
|
|
|
Evas_Coord w,
|
|
|
|
Evas_Coord h)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.resize(obj, w, h);
|
|
|
|
|
|
|
|
_calc(obj);
|
2012-05-02 18:19:05 -07:00
|
|
|
}
|
2010-08-18 12:18:42 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_move(Evas_Object *obj,
|
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y)
|
2012-05-02 18:19:05 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.move(obj, x, y);
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
_calc(obj);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-06-25 02:58:14 -07:00
|
|
|
static Eina_Bool
|
2009-09-23 04:15:55 -07:00
|
|
|
_timer_cb(void *data)
|
|
|
|
{
|
|
|
|
Evas_Object *obj = data;
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
sd->timer = NULL;
|
2009-09-23 04:15:55 -07:00
|
|
|
evas_object_hide(obj);
|
2010-09-27 12:52:56 -07:00
|
|
|
evas_object_smart_callback_call(obj, SIG_TIMEOUT, NULL);
|
2012-05-03 15:44:51 -07:00
|
|
|
|
2010-06-25 02:58:14 -07:00
|
|
|
return ECORE_CALLBACK_CANCEL;
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_timer_init(Evas_Object *obj,
|
|
|
|
Elm_Notify_Smart_Data *sd)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
if (sd->timer)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ecore_timer_del(sd->timer);
|
|
|
|
sd->timer = NULL;
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
2012-05-03 15:44:51 -07:00
|
|
|
if ((evas_object_visible_get(obj)) && (sd->timeout > 0.0))
|
|
|
|
sd->timer = ecore_timer_add(sd->timeout, _timer_cb, obj);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-09-27 14:13:45 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_show(Evas_Object *obj)
|
2010-09-27 14:13:45 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.show(obj);
|
|
|
|
|
|
|
|
evas_object_show(sd->notify);
|
|
|
|
if (!sd->allow_events) evas_object_show(sd->block_events);
|
|
|
|
_timer_init(obj, sd);
|
2011-08-03 04:46:23 -07:00
|
|
|
elm_object_focus_set(obj, EINA_TRUE);
|
2010-09-27 14:13:45 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_hide(Evas_Object *obj)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.hide(obj);
|
|
|
|
|
|
|
|
evas_object_hide(sd->notify);
|
|
|
|
if (!sd->allow_events) evas_object_hide(sd->block_events);
|
|
|
|
if (sd->timer)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ecore_timer_del(sd->timer);
|
|
|
|
sd->timer = NULL;
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_parent_del_cb(void *data,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info __UNUSED__)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(data, sd);
|
|
|
|
|
|
|
|
sd->parent = NULL;
|
2011-06-17 05:51:12 -07:00
|
|
|
evas_object_hide(data);
|
2009-10-22 15:10:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-05-03 15:44:51 -07:00
|
|
|
_parent_hide_cb(void *data,
|
|
|
|
Evas *e __UNUSED__,
|
|
|
|
Evas_Object *obj __UNUSED__,
|
|
|
|
void *event_info __UNUSED__)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2011-06-17 05:51:12 -07:00
|
|
|
evas_object_hide(data);
|
2009-10-22 15:10:23 -07:00
|
|
|
}
|
|
|
|
|
2011-03-24 21:13:10 -07:00
|
|
|
static Eina_Bool
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_focus_next(const Evas_Object *obj,
|
|
|
|
Elm_Focus_Direction dir,
|
|
|
|
Evas_Object **next)
|
2011-03-24 21:13:10 -07:00
|
|
|
{
|
|
|
|
Evas_Object *cur;
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (!sd->content)
|
2011-03-24 21:13:10 -07:00
|
|
|
return EINA_FALSE;
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
cur = sd->content;
|
2011-03-24 21:13:10 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
/* Try to cycle focus on content */
|
2011-03-24 21:13:10 -07:00
|
|
|
return elm_widget_focus_next_get(cur, dir, next);
|
|
|
|
}
|
|
|
|
|
2012-05-15 22:46:31 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_elm_notify_smart_focus_direction(const Evas_Object *obj,
|
|
|
|
const Evas_Object *base,
|
|
|
|
double degree,
|
|
|
|
Evas_Object **direction,
|
|
|
|
double *weight)
|
|
|
|
{
|
|
|
|
Evas_Object *cur;
|
|
|
|
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (!sd->content)
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
cur = sd->content;
|
|
|
|
|
|
|
|
return elm_widget_focus_direction_get(cur, base, degree, direction, weight);
|
|
|
|
}
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_elm_notify_smart_content_set(Evas_Object *obj,
|
|
|
|
const char *part,
|
|
|
|
Evas_Object *content)
|
2011-10-28 21:32:24 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (part && strcmp(part, "default")) return EINA_FALSE;
|
|
|
|
if (sd->content == content) return EINA_TRUE;
|
|
|
|
if (sd->content) evas_object_del(sd->content);
|
|
|
|
sd->content = content;
|
2011-10-28 21:32:24 -07:00
|
|
|
|
|
|
|
if (content)
|
|
|
|
{
|
|
|
|
elm_widget_sub_object_add(obj, content);
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_event_callback_add
|
|
|
|
(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(content, EVAS_CALLBACK_RESIZE, _content_resize_cb, obj);
|
|
|
|
edje_object_part_swallow(sd->notify, "elm.swallow.content", content);
|
2011-10-28 21:32:24 -07:00
|
|
|
}
|
2012-05-03 15:44:51 -07:00
|
|
|
|
2011-10-28 21:32:24 -07:00
|
|
|
_sizing_eval(obj);
|
|
|
|
_calc(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
return EINA_TRUE;
|
2011-10-28 21:32:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_content_get(const Evas_Object *obj,
|
|
|
|
const char *part)
|
2011-10-28 21:32:24 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (part && strcmp(part, "default")) return NULL;
|
|
|
|
|
|
|
|
return sd->content;
|
2011-10-28 21:32:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2012-05-03 15:44:51 -07:00
|
|
|
_elm_notify_smart_content_unset(Evas_Object *obj,
|
|
|
|
const char *part)
|
2011-10-28 21:32:24 -07:00
|
|
|
{
|
|
|
|
Evas_Object *content;
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (part && strcmp(part, "default")) return NULL;
|
|
|
|
if (!sd->content) return NULL;
|
|
|
|
|
|
|
|
content = sd->content;
|
|
|
|
elm_widget_sub_object_del(obj, sd->content);
|
|
|
|
edje_object_part_unswallow(sd->notify, content);
|
|
|
|
|
2011-10-28 21:32:24 -07:00
|
|
|
return content;
|
|
|
|
}
|
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
static void
|
|
|
|
_elm_notify_smart_add(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EVAS_SMART_DATA_ALLOC(obj, Elm_Notify_Smart_Data);
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.add(obj);
|
|
|
|
|
|
|
|
priv->allow_events = EINA_TRUE;
|
|
|
|
|
|
|
|
priv->notify = edje_object_add(evas_object_evas_get(obj));
|
|
|
|
priv->orient = -1;
|
|
|
|
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(obj, EVAS_CALLBACK_RESTACK, _restack_cb, obj);
|
|
|
|
|
|
|
|
elm_widget_can_focus_set(obj, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_notify_smart_del(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
elm_notify_parent_set(obj, NULL);
|
|
|
|
elm_notify_allow_events_set(obj, EINA_FALSE);
|
|
|
|
if (sd->timer)
|
|
|
|
{
|
|
|
|
ecore_timer_del(sd->timer);
|
|
|
|
sd->timer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(_elm_notify_parent_sc)->base.del(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_notify_smart_set_user(Elm_Container_Smart_Class *sc)
|
|
|
|
{
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.add = _elm_notify_smart_add;
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.del = _elm_notify_smart_del;
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.resize = _elm_notify_smart_resize;
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.move = _elm_notify_smart_move;
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.show = _elm_notify_smart_show;
|
|
|
|
ELM_WIDGET_CLASS(sc)->base.hide = _elm_notify_smart_hide;
|
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(sc)->theme = _elm_notify_smart_theme;
|
|
|
|
ELM_WIDGET_CLASS(sc)->focus_next = _elm_notify_smart_focus_next;
|
2012-05-15 22:46:31 -07:00
|
|
|
ELM_WIDGET_CLASS(sc)->focus_direction = _elm_notify_smart_focus_direction;
|
2012-05-03 15:44:51 -07:00
|
|
|
|
|
|
|
ELM_WIDGET_CLASS(sc)->sub_object_del = _elm_notify_smart_sub_object_del;
|
|
|
|
|
|
|
|
ELM_CONTAINER_CLASS(sc)->content_set = _elm_notify_smart_content_set;
|
|
|
|
ELM_CONTAINER_CLASS(sc)->content_get = _elm_notify_smart_content_get;
|
|
|
|
ELM_CONTAINER_CLASS(sc)->content_unset = _elm_notify_smart_content_unset;
|
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
EAPI Evas_Object *
|
2009-09-23 04:15:55 -07:00
|
|
|
elm_notify_add(Evas_Object *parent)
|
|
|
|
{
|
2012-05-02 18:19:05 -07:00
|
|
|
Evas *e;
|
2012-05-03 15:44:51 -07:00
|
|
|
Evas_Object *obj;
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
e = evas_object_evas_get(parent);
|
|
|
|
if (!e) return NULL;
|
2009-10-22 15:10:23 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
obj = evas_object_smart_add(e, _elm_notify_smart_class_new());
|
2009-09-23 04:15:55 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
if (!elm_widget_sub_object_add(parent, obj))
|
|
|
|
ERR("could not add %p as sub object of %p", obj, parent);
|
2012-05-02 18:19:05 -07:00
|
|
|
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_notify_orient_set(obj, ELM_NOTIFY_ORIENT_TOP);
|
2009-11-01 11:05:00 -08:00
|
|
|
elm_notify_parent_set(obj, parent);
|
|
|
|
|
2009-09-23 04:15:55 -07:00
|
|
|
_sizing_eval(obj);
|
2010-09-27 12:52:56 -07:00
|
|
|
|
2009-09-23 04:15:55 -07:00
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
EAPI void
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_notify_parent_set(Evas_Object *obj,
|
|
|
|
Evas_Object *parent)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj);
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (sd->parent)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sd->parent, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sd->parent, EVAS_CALLBACK_RESIZE, _changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sd->parent, EVAS_CALLBACK_MOVE, _changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sd->parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj);
|
|
|
|
evas_object_event_callback_del_full
|
|
|
|
(sd->parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj);
|
|
|
|
sd->parent = NULL;
|
2009-10-22 15:10:23 -07:00
|
|
|
}
|
2011-03-24 21:13:10 -07:00
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
if (parent)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
sd->parent = parent;
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(parent, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
|
|
_changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(parent, EVAS_CALLBACK_RESIZE, _changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(parent, EVAS_CALLBACK_MOVE, _changed_size_hints_cb, obj);
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj);
|
|
|
|
evas_object_event_callback_add
|
|
|
|
(parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj);
|
2011-04-01 04:26:58 -07:00
|
|
|
_sizing_eval(obj);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
2012-05-03 15:44:51 -07:00
|
|
|
|
2009-09-23 06:05:00 -07:00
|
|
|
_calc(obj);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-10-14 11:54:42 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_notify_parent_get(const Evas_Object *obj)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj) NULL;
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
return sd->parent;
|
2010-10-14 11:54:42 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
EAPI void
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_notify_orient_set(Evas_Object *obj,
|
|
|
|
Elm_Notify_Orient orient)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj);
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (sd->orient == orient) return;
|
|
|
|
sd->orient = orient;
|
|
|
|
|
2010-07-14 12:04:22 -07:00
|
|
|
_notify_theme_apply(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
_calc(obj);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-07-11 14:19:27 -07:00
|
|
|
EAPI Elm_Notify_Orient
|
|
|
|
elm_notify_orient_get(const Evas_Object *obj)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj) - 1;
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
return sd->orient;
|
2010-07-11 14:19:27 -07:00
|
|
|
}
|
|
|
|
|
2009-09-27 20:23:54 -07:00
|
|
|
EAPI void
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_notify_timeout_set(Evas_Object *obj,
|
|
|
|
double timeout)
|
2009-09-23 04:15:55 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj);
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
sd->timeout = timeout;
|
|
|
|
_timer_init(obj, sd);
|
2009-09-23 04:15:55 -07:00
|
|
|
}
|
|
|
|
|
2010-09-27 14:13:45 -07:00
|
|
|
EAPI double
|
2010-07-11 14:19:27 -07:00
|
|
|
elm_notify_timeout_get(const Evas_Object *obj)
|
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj) 0.0;
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
return sd->timeout;
|
2010-07-11 14:19:27 -07:00
|
|
|
}
|
|
|
|
|
2009-10-22 15:10:23 -07:00
|
|
|
EAPI void
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_notify_allow_events_set(Evas_Object *obj,
|
|
|
|
Eina_Bool allow)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj);
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (allow == sd->allow_events) return;
|
|
|
|
sd->allow_events = allow;
|
2012-03-05 01:50:32 -08:00
|
|
|
if (!allow)
|
2009-10-22 15:10:23 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
sd->block_events = elm_layout_add(obj);
|
2011-04-01 04:26:58 -07:00
|
|
|
_block_events_theme_apply(obj);
|
2012-05-03 15:44:51 -07:00
|
|
|
elm_widget_resize_object_set(obj, sd->block_events);
|
|
|
|
elm_layout_signal_callback_add
|
|
|
|
(sd->block_events, "elm,action,click", "elm",
|
|
|
|
_block_area_clicked_cb, obj);
|
2009-10-22 15:10:23 -07:00
|
|
|
}
|
|
|
|
else
|
2012-05-03 15:44:51 -07:00
|
|
|
evas_object_del(sd->block_events);
|
2009-10-22 15:10:23 -07:00
|
|
|
}
|
|
|
|
|
2010-07-11 14:19:27 -07:00
|
|
|
EAPI Eina_Bool
|
2012-03-05 01:50:32 -08:00
|
|
|
elm_notify_allow_events_get(const Evas_Object *obj)
|
2010-07-11 14:19:27 -07:00
|
|
|
{
|
2012-05-03 15:44:51 -07:00
|
|
|
ELM_NOTIFY_CHECK(obj) EINA_FALSE;
|
|
|
|
ELM_NOTIFY_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
return sd->allow_events;
|
2010-07-11 14:19:27 -07:00
|
|
|
}
|