make notify repeat events be allow_events... as thats what it really
does. SVN revision: 68685
This commit is contained in:
parent
05780e9b14
commit
d59ea1baad
|
@ -82,7 +82,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
||||||
notify = elm_notify_add(win);
|
notify = elm_notify_add(win);
|
||||||
elm_notify_repeat_events_set(notify, EINA_FALSE);
|
elm_notify_allow_events_set(notify, EINA_FALSE);
|
||||||
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
|
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
|
||||||
elm_notify_timeout_set(notify, 5.0);
|
elm_notify_timeout_set(notify, 5.0);
|
||||||
|
|
|
@ -133,7 +133,7 @@ _alert_hook(void *data __UNUSED__, Evas_Object *obj, const char *message)
|
||||||
elm_notify_orient_set(popup, ELM_NOTIFY_ORIENT_CENTER);
|
elm_notify_orient_set(popup, ELM_NOTIFY_ORIENT_CENTER);
|
||||||
// Using the timeout doesn't seem to go well with the second main loop
|
// Using the timeout doesn't seem to go well with the second main loop
|
||||||
//elm_notify_timeout_set(popup, 2.0);
|
//elm_notify_timeout_set(popup, 2.0);
|
||||||
elm_notify_repeat_events_set(popup, EINA_FALSE);
|
elm_notify_allow_events_set(popup, EINA_FALSE);
|
||||||
evas_object_show(popup);
|
evas_object_show(popup);
|
||||||
|
|
||||||
evas_object_smart_callback_add(popup, "block,clicked", _alert_del, NULL);
|
evas_object_smart_callback_add(popup, "block,clicked", _alert_del, NULL);
|
||||||
|
@ -173,7 +173,7 @@ _confirm_hook(void *data __UNUSED__, Evas_Object *obj, const char *message, Eina
|
||||||
|
|
||||||
popup = elm_notify_add(obj);
|
popup = elm_notify_add(obj);
|
||||||
elm_notify_orient_set(popup, ELM_NOTIFY_ORIENT_CENTER);
|
elm_notify_orient_set(popup, ELM_NOTIFY_ORIENT_CENTER);
|
||||||
elm_notify_repeat_events_set(popup, EINA_FALSE);
|
elm_notify_allow_events_set(popup, EINA_FALSE);
|
||||||
evas_object_show(popup);
|
evas_object_show(popup);
|
||||||
|
|
||||||
box = elm_box_add(obj);
|
box = elm_box_add(obj);
|
||||||
|
|
|
@ -4605,6 +4605,30 @@ EINA_DEPRECATED EAPI void elm_web_history_enable_set(Evas_Object *o
|
||||||
*/
|
*/
|
||||||
EINA_DEPRECATED EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data);
|
EINA_DEPRECATED EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets whether events should be passed to by a click outside
|
||||||
|
* its area.
|
||||||
|
*
|
||||||
|
* @param obj The notify object
|
||||||
|
* @param repeat EINA_TRUE Events are repeats, else no
|
||||||
|
*
|
||||||
|
* When true if the user clicks outside the window the events will be caught
|
||||||
|
* by the others widgets, else the events are blocked.
|
||||||
|
*
|
||||||
|
* @note The default value is EINA_TRUE.
|
||||||
|
* @deprecated Please use elm_notify_allow_events_set() instead
|
||||||
|
*/
|
||||||
|
EINA_DEPRECATED EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return true if events are repeat below the notify object
|
||||||
|
* @param obj the notify object
|
||||||
|
*
|
||||||
|
* @see elm_notify_repeat_events_set()
|
||||||
|
* @deprecated Please use elm_notify_allow_events_get() instead
|
||||||
|
*/
|
||||||
|
EINA_DEPRECATED EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set if the cursor set should be searched on the theme or should use
|
* Set if the cursor set should be searched on the theme or should use
|
||||||
* the provided by the engine, only.
|
* the provided by the engine, only.
|
||||||
|
|
|
@ -8,7 +8,7 @@ struct _Widget_Data
|
||||||
Evas_Object *notify, *content, *parent;
|
Evas_Object *notify, *content, *parent;
|
||||||
|
|
||||||
Elm_Notify_Orient orient;
|
Elm_Notify_Orient orient;
|
||||||
Eina_Bool repeat_events;
|
Eina_Bool allow_events;
|
||||||
Evas_Object *block_events;
|
Evas_Object *block_events;
|
||||||
|
|
||||||
double timeout;
|
double timeout;
|
||||||
|
@ -57,7 +57,7 @@ _del_hook(Evas_Object *obj)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
elm_notify_parent_set(obj, NULL);
|
elm_notify_parent_set(obj, NULL);
|
||||||
elm_notify_repeat_events_set(obj, EINA_TRUE);
|
elm_notify_allow_events_set(obj, EINA_TRUE);
|
||||||
if (wd->timer)
|
if (wd->timer)
|
||||||
{
|
{
|
||||||
ecore_timer_del(wd->timer);
|
ecore_timer_del(wd->timer);
|
||||||
|
@ -360,8 +360,7 @@ _show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
evas_object_show(wd->notify);
|
evas_object_show(wd->notify);
|
||||||
if (!wd->repeat_events)
|
if (!wd->allow_events) evas_object_show(wd->block_events);
|
||||||
evas_object_show(wd->block_events);
|
|
||||||
_timer_init(obj, wd);
|
_timer_init(obj, wd);
|
||||||
elm_object_focus_set(obj, EINA_TRUE);
|
elm_object_focus_set(obj, EINA_TRUE);
|
||||||
}
|
}
|
||||||
|
@ -372,8 +371,7 @@ _hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
evas_object_hide(wd->notify);
|
evas_object_hide(wd->notify);
|
||||||
if (!wd->repeat_events)
|
if (!wd->allow_events) evas_object_hide(wd->block_events);
|
||||||
evas_object_hide(wd->block_events);
|
|
||||||
if (wd->timer)
|
if (wd->timer)
|
||||||
{
|
{
|
||||||
ecore_timer_del(wd->timer);
|
ecore_timer_del(wd->timer);
|
||||||
|
@ -493,7 +491,7 @@ elm_notify_add(Evas_Object *parent)
|
||||||
elm_widget_content_get_hook_set(obj, _content_get_hook);
|
elm_widget_content_get_hook_set(obj, _content_get_hook);
|
||||||
elm_widget_content_unset_hook_set(obj, _content_unset_hook);
|
elm_widget_content_unset_hook_set(obj, _content_unset_hook);
|
||||||
|
|
||||||
wd->repeat_events = EINA_TRUE;
|
wd->allow_events = EINA_TRUE;
|
||||||
|
|
||||||
wd->notify = edje_object_add(e);
|
wd->notify = edje_object_add(e);
|
||||||
wd->orient = -1;
|
wd->orient = -1;
|
||||||
|
@ -622,15 +620,27 @@ elm_notify_timeout_get(const Evas_Object *obj)
|
||||||
return wd->timeout;
|
return wd->timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EINA_DEPRECATED EAPI void
|
||||||
|
elm_repeat_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
||||||
|
{
|
||||||
|
elm_notify_allow_events_set(obj, repeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
EINA_DEPRECATED EAPI Eina_Bool
|
||||||
|
elm_repeat_allow_events_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
return elm_notify_allow_events_get(obj);
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool allow)
|
||||||
{
|
{
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
if (repeat == wd->repeat_events) return;
|
if (allow == wd->allow_events) return;
|
||||||
wd->repeat_events = repeat;
|
wd->allow_events = allow;
|
||||||
if (!repeat)
|
if (!allow)
|
||||||
{
|
{
|
||||||
wd->block_events = edje_object_add(evas_object_evas_get(obj));
|
wd->block_events = edje_object_add(evas_object_evas_get(obj));
|
||||||
_block_events_theme_apply(obj);
|
_block_events_theme_apply(obj);
|
||||||
|
@ -643,10 +653,10 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_notify_repeat_events_get(const Evas_Object *obj)
|
elm_notify_allow_events_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (!wd) return EINA_FALSE;
|
if (!wd) return EINA_FALSE;
|
||||||
return wd->repeat_events;
|
return wd->allow_events;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,22 +132,22 @@ EAPI double elm_notify_timeout_get(const Evas_Object *obj)
|
||||||
* its area.
|
* its area.
|
||||||
*
|
*
|
||||||
* @param obj The notify object
|
* @param obj The notify object
|
||||||
* @param repeat EINA_TRUE Events are repeats, else no
|
* @param allow EINA_TRUE If events are allowed, otherwise not
|
||||||
*
|
*
|
||||||
* When true if the user clicks outside the window the events will be caught
|
* When true if the user clicks outside the window the events will be caught
|
||||||
* by the others widgets, else the events are blocked.
|
* by the others widgets, else the events are blocked.
|
||||||
*
|
*
|
||||||
* @note The default value is EINA_TRUE.
|
* @note The default value is EINA_TRUE.
|
||||||
*/
|
*/
|
||||||
EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat);
|
EAPI void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool allow);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return true if events are repeat below the notify object
|
* @brief Return true if events are allowed below the notify object
|
||||||
* @param obj the notify object
|
* @param obj the notify object
|
||||||
*
|
*
|
||||||
* @see elm_notify_repeat_events_set()
|
* @see elm_notify_allow_events_set()
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj);
|
EAPI Eina_Bool elm_notify_allow_events_get(const Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
Loading…
Reference in New Issue