From ff173f8408ea731695374e1fb9a0ad1d8407f79e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_notify: remove all legacy usage from eo files this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8187 --- src/Makefile_Elementary.am | 5 +- src/bin/elementary/test_win_plug.c | 2 +- src/lib/elementary/elm_notify.c | 2 +- src/lib/elementary/elm_notify.eo | 98 ------------ src/lib/elementary/elm_notify_eo.c | 179 ++++++++++++++++++++++ src/lib/elementary/elm_notify_eo.h | 145 ++++++++++++++++++ src/lib/elementary/elm_notify_eo.legacy.c | 42 +++++ src/lib/elementary/elm_notify_eo.legacy.h | 114 ++++++++++++++ src/lib/elementary/elm_notify_legacy.h | 2 +- src/lib/elementary/elm_widget_notify.h | 2 +- src/lib/elementary/elm_widget_popup.h | 2 +- src/lib/elementary/meson.build | 3 +- 12 files changed, 491 insertions(+), 105 deletions(-) delete mode 100644 src/lib/elementary/elm_notify.eo create mode 100644 src/lib/elementary/elm_notify_eo.c create mode 100644 src/lib/elementary/elm_notify_eo.h create mode 100644 src/lib/elementary/elm_notify_eo.legacy.c create mode 100644 src/lib/elementary/elm_notify_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 7ceb4b1e21..9c5f68b07f 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -184,7 +184,6 @@ elm_private_eolian_files = \ # Legacy classes - not part of public EO API elm_legacy_eolian_files = \ lib/elementary/efl_ui_clock_legacy.eo \ - lib/elementary/elm_notify.eo \ lib/elementary/elm_panel.eo \ lib/elementary/elm_player.eo \ lib/elementary/elm_plug.eo \ @@ -374,6 +373,8 @@ lib/elementary/elm_naviframe_eo.c \ lib/elementary/elm_naviframe_eo.legacy.c \ lib/elementary/elm_naviframe_item_eo.c \ lib/elementary/elm_naviframe_item_eo.legacy.c \ +lib/elementary/elm_notify_eo.c \ +lib/elementary/elm_notify_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -527,6 +528,8 @@ lib/elementary/elm_naviframe_eo.h \ lib/elementary/elm_naviframe_eo.legacy.h \ lib/elementary/elm_naviframe_item_eo.h \ lib/elementary/elm_naviframe_item_eo.legacy.h \ +lib/elementary/elm_notify_eo.h \ +lib/elementary/elm_notify_eo.legacy.h \ $(NULL) diff --git a/src/bin/elementary/test_win_plug.c b/src/bin/elementary/test_win_plug.c index 867e5c4003..615e6fa8d5 100644 --- a/src/bin/elementary/test_win_plug.c +++ b/src/bin/elementary/test_win_plug.c @@ -4,7 +4,7 @@ #include // FIXME: use smart cb -#include "elm_notify.eo.h" +#include "elm_notify_eo.h" #define MAX_TRY 40 diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index e107227fd0..f5e9122668 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -735,4 +735,4 @@ _elm_notify_part_efl_ui_l10n_l10n_text_set(Eo *obj, void *_pd EINA_UNUSED, const ELM_PART_CONTENT_DEFAULT_OPS(elm_notify), \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_notify) -#include "elm_notify.eo.c" +#include "elm_notify_eo.c" diff --git a/src/lib/elementary/elm_notify.eo b/src/lib/elementary/elm_notify.eo deleted file mode 100644 index 04d1263bcf..0000000000 --- a/src/lib/elementary/elm_notify.eo +++ /dev/null @@ -1,98 +0,0 @@ -class Elm.Notify extends Efl.Ui.Widget implements Efl.Ui.Focus.Layer, Efl.Content, Efl.Ui.Legacy -{ - [[Elementary notification class]] - legacy_prefix: elm_notify; - eo_prefix: elm_obj_notify; - event_prefix: elm_notify; - methods { - @property align { - set { - [[Set the alignment of the notify object - - Sets the alignment in which the notify will appear in its parent. - - Note: To fill the notify box in the parent area, please pass the - ELM_NOTIFY_ALIGN_FILL to horizontal and vertical. - - @since 1.8 - ]] - } - get { - [[Get the alignment of the notify object - - @since 1.8 - ]] - } - values { - horizontal: double; [[The horizontal alignment of the notification]] - vertical: double; [[The vertical alignment of the notification]] - } - } - @property allow_events { - set { - [[Sets whether events should be passed to by a click outside - its area. - - 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 true. - ]] - } - get { - [[Return true if events are allowed below the notify object.]] - } - values { - allow: bool; [[$true if events are allowed, $false otherwise]] - } - } - @property timeout { - set { - [[Set the time interval after which the notify window is going to - be hidden. - - This function sets a timeout and starts the timer controlling - when the notify is hidden. Since calling evas_object_show() on - a notify restarts the timer controlling when the notify is - hidden, setting this before the notify is shown will in effect - mean starting the timer when the notify is shown. - - Note: Set a value <= 0.0 to disable a running timer. - - Note: If the value > 0.0 and the notify is previously visible, - the timer will be started with this value, canceling any running - timer. - ]] - } - get { - [[Return the timeout value (in seconds)]] - } - values { - timeout: double; [[The timeout in seconds]] - } - } - dismiss { - [[Dismiss a notify object. - @since 1.17 - ]] - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Gfx.Entity.visible { set; } - Efl.Gfx.Entity.position { set; } - Efl.Gfx.Entity.size { set; } - Efl.Ui.Widget.widget_parent { get; set; } - Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.widget_sub_object_del; - Efl.Content.content { get; set; } - Efl.Content.content_unset; - Efl.Part.part_get; - } - events { - block,clicked: void; [[Called when block was clicked]] - timeout: void; [[Called when notify timed out]] - dismissed: void; [[Called when notify was dismissed]] - } -} diff --git a/src/lib/elementary/elm_notify_eo.c b/src/lib/elementary/elm_notify_eo.c new file mode 100644 index 0000000000..b4974fabb6 --- /dev/null +++ b/src/lib/elementary/elm_notify_eo.c @@ -0,0 +1,179 @@ +EWAPI const Efl_Event_Description _ELM_NOTIFY_EVENT_BLOCK_CLICKED = + EFL_EVENT_DESCRIPTION("block,clicked"); +EWAPI const Efl_Event_Description _ELM_NOTIFY_EVENT_TIMEOUT = + EFL_EVENT_DESCRIPTION("timeout"); +EWAPI const Efl_Event_Description _ELM_NOTIFY_EVENT_DISMISSED = + EFL_EVENT_DESCRIPTION("dismissed"); + +void _elm_notify_align_set(Eo *obj, Elm_Notify_Data *pd, double horizontal, double vertical); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_notify_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical); + +void _elm_notify_align_get(const Eo *obj, Elm_Notify_Data *pd, double *horizontal, double *vertical); + +EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_notify_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical); + +void _elm_notify_allow_events_set(Eo *obj, Elm_Notify_Data *pd, Eina_Bool allow); + + +static Eina_Error +__eolian_elm_notify_allow_events_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; Eina_Bool cval; + if (!eina_value_bool_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_notify_allow_events_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_notify_allow_events_set, EFL_FUNC_CALL(allow), Eina_Bool allow); + +Eina_Bool _elm_notify_allow_events_get(const Eo *obj, Elm_Notify_Data *pd); + + +static Eina_Value +__eolian_elm_notify_allow_events_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_notify_allow_events_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_notify_allow_events_get, Eina_Bool, 0); + +void _elm_notify_timeout_set(Eo *obj, Elm_Notify_Data *pd, double timeout); + + +static Eina_Error +__eolian_elm_notify_timeout_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; double cval; + if (!eina_value_double_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + elm_obj_notify_timeout_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_notify_timeout_set, EFL_FUNC_CALL(timeout), double timeout); + +double _elm_notify_timeout_get(const Eo *obj, Elm_Notify_Data *pd); + + +static Eina_Value +__eolian_elm_notify_timeout_get_reflect(Eo *obj) +{ + double val = elm_obj_notify_timeout_get(obj); + return eina_value_double_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_notify_timeout_get, double, 0); + +void _elm_notify_dismiss(Eo *obj, Elm_Notify_Data *pd); + +EOAPI EFL_VOID_FUNC_BODY(elm_obj_notify_dismiss); + +Efl_Object *_elm_notify_efl_object_constructor(Eo *obj, Elm_Notify_Data *pd); + + +void _elm_notify_efl_gfx_entity_visible_set(Eo *obj, Elm_Notify_Data *pd, Eina_Bool v); + + +void _elm_notify_efl_gfx_entity_position_set(Eo *obj, Elm_Notify_Data *pd, Eina_Position2D pos); + + +void _elm_notify_efl_gfx_entity_size_set(Eo *obj, Elm_Notify_Data *pd, Eina_Size2D size); + + +void _elm_notify_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Notify_Data *pd, Efl_Ui_Widget *parent); + + +Efl_Ui_Widget *_elm_notify_efl_ui_widget_widget_parent_get(const Eo *obj, Elm_Notify_Data *pd); + + +Eina_Error _elm_notify_efl_ui_widget_theme_apply(Eo *obj, Elm_Notify_Data *pd); + + +Eina_Bool _elm_notify_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Notify_Data *pd, Efl_Canvas_Object *sub_obj); + + +Eina_Bool _elm_notify_efl_content_content_set(Eo *obj, Elm_Notify_Data *pd, Efl_Gfx_Entity *content); + + +Efl_Gfx_Entity *_elm_notify_efl_content_content_get(const Eo *obj, Elm_Notify_Data *pd); + + +Efl_Gfx_Entity *_elm_notify_efl_content_content_unset(Eo *obj, Elm_Notify_Data *pd); + + +Efl_Object *_elm_notify_efl_part_part_get(const Eo *obj, Elm_Notify_Data *pd, const char *name); + + +static Eina_Bool +_elm_notify_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_NOTIFY_EXTRA_OPS +#define ELM_NOTIFY_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_notify_align_set, _elm_notify_align_set), + EFL_OBJECT_OP_FUNC(elm_obj_notify_align_get, _elm_notify_align_get), + EFL_OBJECT_OP_FUNC(elm_obj_notify_allow_events_set, _elm_notify_allow_events_set), + EFL_OBJECT_OP_FUNC(elm_obj_notify_allow_events_get, _elm_notify_allow_events_get), + EFL_OBJECT_OP_FUNC(elm_obj_notify_timeout_set, _elm_notify_timeout_set), + EFL_OBJECT_OP_FUNC(elm_obj_notify_timeout_get, _elm_notify_timeout_get), + EFL_OBJECT_OP_FUNC(elm_obj_notify_dismiss, _elm_notify_dismiss), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_notify_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_notify_efl_gfx_entity_visible_set), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_notify_efl_gfx_entity_position_set), + EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_notify_efl_gfx_entity_size_set), + EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_notify_efl_ui_widget_widget_parent_set), + EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_get, _elm_notify_efl_ui_widget_widget_parent_get), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_notify_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_notify_efl_ui_widget_widget_sub_object_del), + EFL_OBJECT_OP_FUNC(efl_content_set, _elm_notify_efl_content_content_set), + EFL_OBJECT_OP_FUNC(efl_content_get, _elm_notify_efl_content_content_get), + EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_notify_efl_content_content_unset), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_notify_efl_part_part_get), + ELM_NOTIFY_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"allow_events", __eolian_elm_notify_allow_events_set_reflect, __eolian_elm_notify_allow_events_get_reflect}, + {"timeout", __eolian_elm_notify_timeout_set_reflect, __eolian_elm_notify_timeout_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_notify_class_desc = { + EO_VERSION, + "Elm.Notify", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Notify_Data), + _elm_notify_class_initializer, + _elm_notify_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_notify_class_get, &_elm_notify_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_FOCUS_LAYER_MIXIN, EFL_CONTENT_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_notify_eo.legacy.c" diff --git a/src/lib/elementary/elm_notify_eo.h b/src/lib/elementary/elm_notify_eo.h new file mode 100644 index 0000000000..37b0598982 --- /dev/null +++ b/src/lib/elementary/elm_notify_eo.h @@ -0,0 +1,145 @@ +#ifndef _ELM_NOTIFY_EO_H_ +#define _ELM_NOTIFY_EO_H_ + +#ifndef _ELM_NOTIFY_EO_CLASS_TYPE +#define _ELM_NOTIFY_EO_CLASS_TYPE + +typedef Eo Elm_Notify; + +#endif + +#ifndef _ELM_NOTIFY_EO_TYPES +#define _ELM_NOTIFY_EO_TYPES + + +#endif +/** Elementary notification class + * + * @ingroup Elm_Notify + */ +#define ELM_NOTIFY_CLASS elm_notify_class_get() + +EWAPI const Efl_Class *elm_notify_class_get(void); + +/** + * @brief Set the alignment of the notify object + * + * Sets the alignment in which the notify will appear in its parent. + * + * @note To fill the notify box in the parent area, please pass the + * ELM_NOTIFY_ALIGN_FILL to horizontal and vertical. + * + * @param[in] obj The object. + * @param[in] horizontal The horizontal alignment of the notification + * @param[in] vertical The vertical alignment of the notification + * + * @since 1.8 + * + * @ingroup Elm_Notify + */ +EOAPI void elm_obj_notify_align_set(Eo *obj, double horizontal, double vertical); + +/** + * @brief Get the alignment of the notify object + * + * @param[in] obj The object. + * @param[out] horizontal The horizontal alignment of the notification + * @param[out] vertical The vertical alignment of the notification + * + * @since 1.8 + * + * @ingroup Elm_Notify + */ +EOAPI void elm_obj_notify_align_get(const Eo *obj, double *horizontal, double *vertical); + +/** + * @brief Sets whether events should be passed to by a click outside its area. + * + * 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 true. + * + * @param[in] obj The object. + * @param[in] allow @c true if events are allowed, @c false otherwise + * + * @ingroup Elm_Notify + */ +EOAPI void elm_obj_notify_allow_events_set(Eo *obj, Eina_Bool allow); + +/** + * @brief Return true if events are allowed below the notify object. + * + * @param[in] obj The object. + * + * @return @c true if events are allowed, @c false otherwise + * + * @ingroup Elm_Notify + */ +EOAPI Eina_Bool elm_obj_notify_allow_events_get(const Eo *obj); + +/** + * @brief Set the time interval after which the notify window is going to be + * hidden. + * + * This function sets a timeout and starts the timer controlling when the + * notify is hidden. Since calling evas_object_show() on a notify restarts the + * timer controlling when the notify is hidden, setting this before the notify + * is shown will in effect mean starting the timer when the notify is shown. + * + * @note Set a value <= 0.0 to disable a running timer. + * + * @note If the value > 0.0 and the notify is previously visible, the timer + * will be started with this value, canceling any running timer. + * + * @param[in] obj The object. + * @param[in] timeout The timeout in seconds + * + * @ingroup Elm_Notify + */ +EOAPI void elm_obj_notify_timeout_set(Eo *obj, double timeout); + +/** + * @brief Return the timeout value (in seconds) + * + * @param[in] obj The object. + * + * @return The timeout in seconds + * + * @ingroup Elm_Notify + */ +EOAPI double elm_obj_notify_timeout_get(const Eo *obj); + +/** Dismiss a notify object. + * + * @since 1.17 + * + * @ingroup Elm_Notify + */ +EOAPI void elm_obj_notify_dismiss(Eo *obj); + +EWAPI extern const Efl_Event_Description _ELM_NOTIFY_EVENT_BLOCK_CLICKED; + +/** Called when block was clicked + * + * @ingroup Elm_Notify + */ +#define ELM_NOTIFY_EVENT_BLOCK_CLICKED (&(_ELM_NOTIFY_EVENT_BLOCK_CLICKED)) + +EWAPI extern const Efl_Event_Description _ELM_NOTIFY_EVENT_TIMEOUT; + +/** Called when notify timed out + * + * @ingroup Elm_Notify + */ +#define ELM_NOTIFY_EVENT_TIMEOUT (&(_ELM_NOTIFY_EVENT_TIMEOUT)) + +EWAPI extern const Efl_Event_Description _ELM_NOTIFY_EVENT_DISMISSED; + +/** Called when notify was dismissed + * + * @ingroup Elm_Notify + */ +#define ELM_NOTIFY_EVENT_DISMISSED (&(_ELM_NOTIFY_EVENT_DISMISSED)) + +#endif diff --git a/src/lib/elementary/elm_notify_eo.legacy.c b/src/lib/elementary/elm_notify_eo.legacy.c new file mode 100644 index 0000000000..9e951a9fad --- /dev/null +++ b/src/lib/elementary/elm_notify_eo.legacy.c @@ -0,0 +1,42 @@ + +EAPI void +elm_notify_align_set(Elm_Notify *obj, double horizontal, double vertical) +{ + elm_obj_notify_align_set(obj, horizontal, vertical); +} + +EAPI void +elm_notify_align_get(const Elm_Notify *obj, double *horizontal, double *vertical) +{ + elm_obj_notify_align_get(obj, horizontal, vertical); +} + +EAPI void +elm_notify_allow_events_set(Elm_Notify *obj, Eina_Bool allow) +{ + elm_obj_notify_allow_events_set(obj, allow); +} + +EAPI Eina_Bool +elm_notify_allow_events_get(const Elm_Notify *obj) +{ + return elm_obj_notify_allow_events_get(obj); +} + +EAPI void +elm_notify_timeout_set(Elm_Notify *obj, double timeout) +{ + elm_obj_notify_timeout_set(obj, timeout); +} + +EAPI double +elm_notify_timeout_get(const Elm_Notify *obj) +{ + return elm_obj_notify_timeout_get(obj); +} + +EAPI void +elm_notify_dismiss(Elm_Notify *obj) +{ + elm_obj_notify_dismiss(obj); +} diff --git a/src/lib/elementary/elm_notify_eo.legacy.h b/src/lib/elementary/elm_notify_eo.legacy.h new file mode 100644 index 0000000000..05e2e7de70 --- /dev/null +++ b/src/lib/elementary/elm_notify_eo.legacy.h @@ -0,0 +1,114 @@ +#ifndef _ELM_NOTIFY_EO_LEGACY_H_ +#define _ELM_NOTIFY_EO_LEGACY_H_ + +#ifndef _ELM_NOTIFY_EO_CLASS_TYPE +#define _ELM_NOTIFY_EO_CLASS_TYPE + +typedef Eo Elm_Notify; + +#endif + +#ifndef _ELM_NOTIFY_EO_TYPES +#define _ELM_NOTIFY_EO_TYPES + + +#endif + +/** + * @brief Set the alignment of the notify object + * + * Sets the alignment in which the notify will appear in its parent. + * + * @note To fill the notify box in the parent area, please pass the + * ELM_NOTIFY_ALIGN_FILL to horizontal and vertical. + * + * @param[in] obj The object. + * @param[in] horizontal The horizontal alignment of the notification + * @param[in] vertical The vertical alignment of the notification + * + * @since 1.8 + * + * @ingroup Elm_Notify_Group + */ +EAPI void elm_notify_align_set(Elm_Notify *obj, double horizontal, double vertical); + +/** + * @brief Get the alignment of the notify object + * + * @param[in] obj The object. + * @param[out] horizontal The horizontal alignment of the notification + * @param[out] vertical The vertical alignment of the notification + * + * @since 1.8 + * + * @ingroup Elm_Notify_Group + */ +EAPI void elm_notify_align_get(const Elm_Notify *obj, double *horizontal, double *vertical); + +/** + * @brief Sets whether events should be passed to by a click outside its area. + * + * 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 true. + * + * @param[in] obj The object. + * @param[in] allow @c true if events are allowed, @c false otherwise + * + * @ingroup Elm_Notify_Group + */ +EAPI void elm_notify_allow_events_set(Elm_Notify *obj, Eina_Bool allow); + +/** + * @brief Return true if events are allowed below the notify object. + * + * @param[in] obj The object. + * + * @return @c true if events are allowed, @c false otherwise + * + * @ingroup Elm_Notify_Group + */ +EAPI Eina_Bool elm_notify_allow_events_get(const Elm_Notify *obj); + +/** + * @brief Set the time interval after which the notify window is going to be + * hidden. + * + * This function sets a timeout and starts the timer controlling when the + * notify is hidden. Since calling evas_object_show() on a notify restarts the + * timer controlling when the notify is hidden, setting this before the notify + * is shown will in effect mean starting the timer when the notify is shown. + * + * @note Set a value <= 0.0 to disable a running timer. + * + * @note If the value > 0.0 and the notify is previously visible, the timer + * will be started with this value, canceling any running timer. + * + * @param[in] obj The object. + * @param[in] timeout The timeout in seconds + * + * @ingroup Elm_Notify_Group + */ +EAPI void elm_notify_timeout_set(Elm_Notify *obj, double timeout); + +/** + * @brief Return the timeout value (in seconds) + * + * @param[in] obj The object. + * + * @return The timeout in seconds + * + * @ingroup Elm_Notify_Group + */ +EAPI double elm_notify_timeout_get(const Elm_Notify *obj); + +/** Dismiss a notify object. + * + * @since 1.17 + * + * @ingroup Elm_Notify_Group + */ +EAPI void elm_notify_dismiss(Elm_Notify *obj); + +#endif diff --git a/src/lib/elementary/elm_notify_legacy.h b/src/lib/elementary/elm_notify_legacy.h index e3547d7439..ceb39a9dfe 100644 --- a/src/lib/elementary/elm_notify_legacy.h +++ b/src/lib/elementary/elm_notify_legacy.h @@ -33,4 +33,4 @@ EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_O */ EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj); -#include "elm_notify.eo.legacy.h" \ No newline at end of file +#include "elm_notify_eo.legacy.h" \ No newline at end of file diff --git a/src/lib/elementary/elm_widget_notify.h b/src/lib/elementary/elm_widget_notify.h index 0026f195f3..484377b97e 100644 --- a/src/lib/elementary/elm_widget_notify.h +++ b/src/lib/elementary/elm_widget_notify.h @@ -3,7 +3,7 @@ #include "Elementary.h" -#include +#include /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT diff --git a/src/lib/elementary/elm_widget_popup.h b/src/lib/elementary/elm_widget_popup.h index a57d22f40b..0ede3e5188 100644 --- a/src/lib/elementary/elm_widget_popup.h +++ b/src/lib/elementary/elm_widget_popup.h @@ -3,7 +3,7 @@ #include "Elementary.h" #include "elm_widget_layout.h" -#include "elm_notify.eo.h" +#include "elm_notify_eo.h" #include "elm_popup_item.eo.h" #include "elm_popup.eo.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 64379268de..752c5c9901 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,6 +1,5 @@ pub_legacy_eo_files = [ 'efl_ui_clock_legacy.eo', - 'elm_notify.eo', 'elm_panel.eo', 'elm_player.eo', 'elm_plug.eo', @@ -777,6 +776,8 @@ elementary_pub_headers = [ 'elm_naviframe_eo.legacy.h', 'elm_naviframe_item_eo.h', 'elm_naviframe_item_eo.legacy.h', + 'elm_notify_eo.h', + 'elm_notify_eo.legacy.h', ] elementary_header_src = [