elm_sys_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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8202
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 49044cc3ad
commit b01c6a09c8
20 changed files with 683 additions and 198 deletions

View File

@ -180,9 +180,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_sys_notify_interface.eo \
lib/elementary/elm_sys_notify.eo \
lib/elementary/elm_sys_notify_dbus.eo \
lib/elementary/elm_systray.eo \
lib/elementary/elm_widget_item_static_focus.eo \
lib/elementary/elm_ctxpopup_part.eo \
@ -388,6 +385,11 @@ lib/elementary/elm_slideshow_item_eo.c \
lib/elementary/elm_slideshow_item_eo.legacy.c \
lib/elementary/elm_spinner_eo.c \
lib/elementary/elm_spinner_eo.legacy.c \
lib/elementary/elm_sys_notify_dbus_eo.c \
lib/elementary/elm_sys_notify_eo.c \
lib/elementary/elm_sys_notify_eo.legacy.c \
lib/elementary/elm_sys_notify_interface_eo.c \
lib/elementary/elm_sys_notify_interface_eo.legacy.c \
$(NULL)
elm_legacy_eo_headers = \
@ -579,6 +581,12 @@ lib/elementary/elm_slideshow_item_eo.h \
lib/elementary/elm_slideshow_item_eo.legacy.h \
lib/elementary/elm_spinner_eo.h \
lib/elementary/elm_spinner_eo.legacy.h \
lib/elementary/elm_sys_notify_dbus_eo.h \
lib/elementary/elm_sys_notify_dbus_eo.legacy.h \
lib/elementary/elm_sys_notify_eo.h \
lib/elementary/elm_sys_notify_eo.legacy.h \
lib/elementary/elm_sys_notify_interface_eo.h \
lib/elementary/elm_sys_notify_interface_eo.legacy.h \
$(NULL)

View File

@ -6,10 +6,10 @@
#include "elm_priv.h"
#include "elm_sys_notify_interface.eo.h"
#include "elm_sys_notify.eo.h"
#include "elm_sys_notify_dbus.eo.h"
#include "elm_sys_notify_dbus.eo.legacy.h"
#include "elm_sys_notify_interface_eo.h"
#include "elm_sys_notify_eo.h"
#include "elm_sys_notify_dbus_eo.h"
#include "elm_sys_notify_dbus_eo.legacy.h"
#define MY_CLASS ELM_SYS_NOTIFY_CLASS
@ -288,5 +288,5 @@ elm_sys_notify_close(unsigned int id)
elm_obj_sys_notify_interface_close(_singleton, id);
}
#include "elm_sys_notify.eo.c"
#include "elm_sys_notify_eo.c"

View File

@ -1,96 +0,0 @@
enum Elm.Sys_Notify.Server
{
[[System notification server types]]
none = 0, [[No notificationserver (disables notifications)]]
dbus = 1 << 0 [[Use DBus as a notification server]]
}
enum Elm.Sys_Notify.Closed_Reason
{
[[The reason the notification was closed
@since 1.8
]]
legacy: elm_sys_notify_closed;
expired, [[The notification expired]]
dismissed, [[The notification was dismissed by the user]]
requested, [[The notification was closed by a call to CloseNotification method]]
undefined [[Undefined/reserved reasons]]
}
struct Elm.Sys_Notify.Notification_Closed
{
[[Data on event when notification closed is emitted
@since 1.8
]]
id: uint; [[ID of the notification]]
reason: Elm.Sys_Notify.Closed_Reason; [[The reason the notification was closed]]
}
struct Elm.Sys_Notify.Action_Invoked
{
[[Data on event when the action invoked is emitted
@since 1.8
]]
id: uint; [[ID of the notification]]
action_key: ptr(char); [[The key of the action invoked. These match the
keys sent over in the list of actions]]
}
class Elm.Sys_Notify extends Efl.Object implements Elm.Sys_Notify_Interface
{
[[Elementary system notification class]]
legacy_prefix: elm_sys_notify;
eo_prefix: elm_obj_sys_notify;
methods {
@property servers {
get {
[[Get the notification servers that have been registered
@since 1.17
]]
}
set {
[[Set the notifications server to be used.
Note: This is an advanced function that should be used only to
fullfill very specific purposes. Use elm_need_sys_notify()
which activates the default available notification
servers.
@since 1.17
]]
return: bool; [[$true on success, $false on failure]]
}
values {
servers: Elm.Sys_Notify.Server; [[Binary mask of servers to enable.
If a server is not present in the binary mask but was previously
registered, it will be unregistered.]]
}
}
singleton_get @class {
[[Returns the singleton instance of the notification manager
Elm.Sys_Notify. It is initialized upon the first call of this
function
@since 1.17
]]
return: Elm.Sys_Notify; [[The unique notification manager]]
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Object.destructor;
Elm.Sys_Notify_Interface.send;
Elm.Sys_Notify_Interface.simple_send;
Elm.Sys_Notify_Interface.close;
}
}

View File

@ -4,8 +4,8 @@
typedef void (*Elm_Sys_Notify_Send_Cb)(void *data, unsigned int id);
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_sys_notify_interface.eo.legacy.h"
#include "elm_sys_notify.eo.legacy.h"
#include "elm_sys_notify_interface_eo.legacy.h"
#include "elm_sys_notify_eo.legacy.h"
#endif
/**

View File

@ -6,10 +6,10 @@
#include "elm_priv.h"
#include "elm_sys_notify_interface.eo.h"
#include "elm_sys_notify.eo.h"
#include "elm_sys_notify_dbus.eo.h"
#include "elm_sys_notify_dbus.eo.legacy.h"
#include "elm_sys_notify_interface_eo.h"
#include "elm_sys_notify_eo.h"
#include "elm_sys_notify_dbus_eo.h"
#include "elm_sys_notify_dbus_eo.legacy.h"
#define MY_CLASS ELM_SYS_NOTIFY_DBUS_CLASS
@ -396,5 +396,5 @@ _elm_sys_notify_dbus_efl_object_destructor(Eo *obj,
}
#include "elm_sys_notify_dbus.eo.c"
#include "elm_sys_notify_dbus_eo.c"

View File

@ -1,15 +0,0 @@
class Elm.Sys_Notify.Dbus extends Efl.Object implements Elm.Sys_Notify_Interface
{
[[Elementary system notification DBus class]]
legacy_prefix: elm_sys_notify_dbus;
eo_prefix: elm_obj_sys_notify_dbus;
data: null;
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Elm.Sys_Notify_Interface.send;
Elm.Sys_Notify_Interface.simple_send;
Elm.Sys_Notify_Interface.close;
}
}

View File

@ -0,0 +1,51 @@
Efl_Object *_elm_sys_notify_dbus_efl_object_constructor(Eo *obj, void *pd);
void _elm_sys_notify_dbus_efl_object_destructor(Eo *obj, void *pd);
void _elm_sys_notify_dbus_elm_sys_notify_interface_send(const Eo *obj, void *pd, unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data);
void _elm_sys_notify_dbus_elm_sys_notify_interface_simple_send(const Eo *obj, void *pd, const char *icon, const char *summary, const char *body);
void _elm_sys_notify_dbus_elm_sys_notify_interface_close(const Eo *obj, void *pd, unsigned int id);
static Eina_Bool
_elm_sys_notify_dbus_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
#define ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_sys_notify_dbus_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_sys_notify_dbus_efl_object_destructor),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, _elm_sys_notify_dbus_elm_sys_notify_interface_send),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, _elm_sys_notify_dbus_elm_sys_notify_interface_simple_send),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, _elm_sys_notify_dbus_elm_sys_notify_interface_close),
ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_sys_notify_dbus_class_desc = {
EO_VERSION,
"Elm.Sys_Notify.Dbus",
EFL_CLASS_TYPE_REGULAR,
0,
_elm_sys_notify_dbus_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(elm_sys_notify_dbus_class_get, &_elm_sys_notify_dbus_class_desc, EFL_OBJECT_CLASS, ELM_SYS_NOTIFY_INTERFACE_INTERFACE, NULL);

View File

@ -0,0 +1,24 @@
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_H_
#define _ELM_SYS_NOTIFY_DBUS_EO_H_
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify_Dbus;
#endif
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_TYPES
#define _ELM_SYS_NOTIFY_DBUS_EO_TYPES
#endif
/** Elementary system notification DBus class
*
* @ingroup Elm_Sys_Notify_Dbus
*/
#define ELM_SYS_NOTIFY_DBUS_CLASS elm_sys_notify_dbus_class_get()
EWAPI const Efl_Class *elm_sys_notify_dbus_class_get(void);
#endif

View File

@ -0,0 +1,17 @@
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_LEGACY_H_
#define _ELM_SYS_NOTIFY_DBUS_EO_LEGACY_H_
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify_Dbus;
#endif
#ifndef _ELM_SYS_NOTIFY_DBUS_EO_TYPES
#define _ELM_SYS_NOTIFY_DBUS_EO_TYPES
#endif
#endif

View File

@ -0,0 +1,76 @@
Eina_Bool _elm_sys_notify_servers_set(Eo *obj, Elm_Sys_Notify_Data *pd, Elm_Sys_Notify_Server servers);
EOAPI EFL_FUNC_BODYV(elm_obj_sys_notify_servers_set, Eina_Bool, 0, EFL_FUNC_CALL(servers), Elm_Sys_Notify_Server servers);
Elm_Sys_Notify_Server _elm_sys_notify_servers_get(const Eo *obj, Elm_Sys_Notify_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_sys_notify_servers_get, Elm_Sys_Notify_Server, 0);
Elm_Sys_Notify *_elm_sys_notify_singleton_get(void);
EOAPI Elm_Sys_Notify * elm_obj_sys_notify_singleton_get(void)
{
elm_sys_notify_class_get();
return _elm_sys_notify_singleton_get();
}
EOAPI Elm_Sys_Notify * elm_sys_notify_singleton_get(void)
{
elm_sys_notify_class_get();
return _elm_sys_notify_singleton_get();
}
Efl_Object *_elm_sys_notify_efl_object_constructor(Eo *obj, Elm_Sys_Notify_Data *pd);
void _elm_sys_notify_efl_object_destructor(Eo *obj, Elm_Sys_Notify_Data *pd);
void _elm_sys_notify_elm_sys_notify_interface_send(const Eo *obj, Elm_Sys_Notify_Data *pd, unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data);
void _elm_sys_notify_elm_sys_notify_interface_simple_send(const Eo *obj, Elm_Sys_Notify_Data *pd, const char *icon, const char *summary, const char *body);
void _elm_sys_notify_elm_sys_notify_interface_close(const Eo *obj, Elm_Sys_Notify_Data *pd, unsigned int id);
static Eina_Bool
_elm_sys_notify_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_SYS_NOTIFY_EXTRA_OPS
#define ELM_SYS_NOTIFY_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_servers_set, _elm_sys_notify_servers_set),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_servers_get, _elm_sys_notify_servers_get),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_sys_notify_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_sys_notify_efl_object_destructor),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, _elm_sys_notify_elm_sys_notify_interface_send),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, _elm_sys_notify_elm_sys_notify_interface_simple_send),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, _elm_sys_notify_elm_sys_notify_interface_close),
ELM_SYS_NOTIFY_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_sys_notify_class_desc = {
EO_VERSION,
"Elm.Sys_Notify",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Sys_Notify_Data),
_elm_sys_notify_class_initializer,
_elm_sys_notify_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_sys_notify_class_get, &_elm_sys_notify_class_desc, EFL_OBJECT_CLASS, ELM_SYS_NOTIFY_INTERFACE_INTERFACE, NULL);
#include "elm_sys_notify_eo.legacy.c"

View File

@ -0,0 +1,124 @@
#ifndef _ELM_SYS_NOTIFY_EO_H_
#define _ELM_SYS_NOTIFY_EO_H_
#ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify;
#endif
#ifndef _ELM_SYS_NOTIFY_EO_TYPES
#define _ELM_SYS_NOTIFY_EO_TYPES
/** System notification server types
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables
* notifications) */
ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification
* server */
} Elm_Sys_Notify_Server;
/** The reason the notification was closed
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */
ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the
* user */
ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to
* CloseNotification method */
ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */
} Elm_Sys_Notify_Closed_Reason;
/** Data on event when notification closed is emitted
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef struct _Elm_Sys_Notify_Notification_Closed
{
unsigned int id; /**< ID of the notification */
Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was
* closed */
} Elm_Sys_Notify_Notification_Closed;
/** Data on event when the action invoked is emitted
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef struct _Elm_Sys_Notify_Action_Invoked
{
unsigned int id; /**< ID of the notification */
char *action_key; /**< The key of the action invoked. These match the keys
* sent over in the list of actions */
} Elm_Sys_Notify_Action_Invoked;
#endif
/** Elementary system notification class
*
* @ingroup Elm_Sys_Notify
*/
#define ELM_SYS_NOTIFY_CLASS elm_sys_notify_class_get()
EWAPI const Efl_Class *elm_sys_notify_class_get(void);
/**
* @brief Set the notifications server to be used.
*
* @note This is an advanced function that should be used only to fullfill very
* specific purposes. Use elm_need_sys_notify() which activates the default
* available notification servers.
*
* @param[in] obj The object.
* @param[in] servers Binary mask of servers to enable. If a server is not
* present in the binary mask but was previously registered, it will be
* unregistered.
*
* @return @c true on success, @c false on failure
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify
*/
EOAPI Eina_Bool elm_obj_sys_notify_servers_set(Eo *obj, Elm_Sys_Notify_Server servers);
/**
* @brief Get the notification servers that have been registered
*
* @param[in] obj The object.
*
* @return Binary mask of servers to enable. If a server is not present in the
* binary mask but was previously registered, it will be unregistered.
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify
*/
EOAPI Elm_Sys_Notify_Server elm_obj_sys_notify_servers_get(const Eo *obj);
/**
* @brief Returns the singleton instance of the notification manager
* Elm.Sys_Notify. It is initialized upon the first call of this function
*
* @return The unique notification manager
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify
*/
EOAPI Elm_Sys_Notify *elm_obj_sys_notify_singleton_get(void);
#endif

View File

@ -0,0 +1,12 @@
EAPI Eina_Bool
elm_sys_notify_servers_set(Elm_Sys_Notify *obj, Elm_Sys_Notify_Server servers)
{
return elm_obj_sys_notify_servers_set(obj, servers);
}
EAPI Elm_Sys_Notify_Server
elm_sys_notify_servers_get(const Elm_Sys_Notify *obj)
{
return elm_obj_sys_notify_servers_get(obj);
}

View File

@ -0,0 +1,117 @@
#ifndef _ELM_SYS_NOTIFY_EO_LEGACY_H_
#define _ELM_SYS_NOTIFY_EO_LEGACY_H_
#ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify;
#endif
#ifndef _ELM_SYS_NOTIFY_EO_TYPES
#define _ELM_SYS_NOTIFY_EO_TYPES
/** System notification server types
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables
* notifications) */
ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification
* server */
} Elm_Sys_Notify_Server;
/** The reason the notification was closed
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */
ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the
* user */
ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to
* CloseNotification method */
ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */
} Elm_Sys_Notify_Closed_Reason;
/** Data on event when notification closed is emitted
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef struct _Elm_Sys_Notify_Notification_Closed
{
unsigned int id; /**< ID of the notification */
Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was
* closed */
} Elm_Sys_Notify_Notification_Closed;
/** Data on event when the action invoked is emitted
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef struct _Elm_Sys_Notify_Action_Invoked
{
unsigned int id; /**< ID of the notification */
char *action_key; /**< The key of the action invoked. These match the keys
* sent over in the list of actions */
} Elm_Sys_Notify_Action_Invoked;
#endif
/**
* @brief Set the notifications server to be used.
*
* @note This is an advanced function that should be used only to fullfill very
* specific purposes. Use elm_need_sys_notify() which activates the default
* available notification servers.
*
* @param[in] obj The object.
* @param[in] servers Binary mask of servers to enable. If a server is not
* present in the binary mask but was previously registered, it will be
* unregistered.
*
* @return @c true on success, @c false on failure
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify_Group
*/
EAPI Eina_Bool elm_sys_notify_servers_set(Elm_Sys_Notify *obj, Elm_Sys_Notify_Server servers);
/**
* @brief Get the notification servers that have been registered
*
* @param[in] obj The object.
*
* @return Binary mask of servers to enable. If a server is not present in the
* binary mask but was previously registered, it will be unregistered.
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify_Group
*/
EAPI Elm_Sys_Notify_Server elm_sys_notify_servers_get(const Elm_Sys_Notify *obj);
/**
* @brief Returns the singleton instance of the notification manager
* Elm.Sys_Notify. It is initialized upon the first call of this function
*
* @return The unique notification manager
*
* @since 1.17
*
* @ingroup Elm_Sys_Notify_Group
*/
EAPI Elm_Sys_Notify *elm_sys_notify_singleton_get(void);
#endif

View File

@ -5,5 +5,5 @@
#include <Elementary.h>
#include "elm_priv.h"
#include "elm_sys_notify_interface.eo.c"
#include "elm_sys_notify_interface_eo.c"

View File

@ -1,68 +0,0 @@
type Elm_Sys_Notify_Send_Cb: __undefined_type; [[elementary system notify send callback type]]
enum Elm.Sys_Notify.Urgency
{
[[Urgency levels of a notification
@since 1.8
]]
low, [[Low urgency]]
normal, [[Normal urgency]]
critical [[Critical urgency]]
}
interface Elm.Sys_Notify_Interface
{
[[Elementary system notify interface]]
eo_prefix: elm_obj_sys_notify_interface;
legacy_prefix: elm_sys_notify_interface;
methods {
send @const {
[[Causes a notification to be forcefully closed and removed from the
user's view. It can be used, for example, in the event that what the
notification pertains to is no longer relevant, or to cancel a
notification with no expiration time.
@since 1.8
]]
params {
@in replaces_id: uint; [[Notification ID that this notification replaces.
The value 0 means a new notification.]]
@in icon: string; [[The optional program icon of the calling application]]
@in summary: string; [[The summary text briefly describing the notification]]
@in body: string @optional; [[The optional detailed body text. Can be empty]]
@in urgency: Elm.Sys_Notify.Urgency; [[The urgency level]]
@in timeout: int; [[Timeout display in milliseconds]]
@in cb: Elm_Sys_Notify_Send_Cb; [[Callback used to retrieve the notification id
returned by the Notification Server]]
@in cb_data: const(void_ptr) @optional; [[Optional context data]]
}
}
simple_send @const {
[[Create a new notification just with Icon, Body and Summary.
It is a helper that wraps the send method
@since 1.16
]]
params {
@in icon: string; [[The optional program icon of the calling application]]
@in summary: string; [[The summary text briefly describing the notification]]
@in body: string; [[The optional detailed body text. Can be empty]]
}
}
close @const {
[[Causes a notification to be forcefully closed and removed from the
user's view. It can be used, for example, in the event that what the
notification pertains to is no longer relevant, or to cancel a
notification with no expiration time.
@since 1.8
]]
params {
@in id: uint; [[Notification ID]]
}
}
}
}

View File

@ -0,0 +1,39 @@
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_sys_notify_interface_send, EFL_FUNC_CALL(replaces_id, icon, summary, body, urgency, timeout, cb, cb_data), unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_sys_notify_interface_simple_send, EFL_FUNC_CALL(icon, summary, body), const char *icon, const char *summary, const char *body);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_sys_notify_interface_close, EFL_FUNC_CALL(id), unsigned int id);
static Eina_Bool
_elm_sys_notify_interface_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
#define ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, NULL),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, NULL),
EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, NULL),
ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_sys_notify_interface_class_desc = {
EO_VERSION,
"Elm.Sys_Notify_Interface",
EFL_CLASS_TYPE_INTERFACE,
0,
_elm_sys_notify_interface_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(elm_sys_notify_interface_interface_get, &_elm_sys_notify_interface_class_desc, NULL, NULL);
#include "elm_sys_notify_interface_eo.legacy.c"

View File

@ -0,0 +1,91 @@
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_H_
#define _ELM_SYS_NOTIFY_INTERFACE_EO_H_
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify_Interface;
#endif
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
#define _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
/** Urgency levels of a notification
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_URGENCY_LOW = 0, /**< Low urgency */
ELM_SYS_NOTIFY_URGENCY_NORMAL, /**< Normal urgency */
ELM_SYS_NOTIFY_URGENCY_CRITICAL /**< Critical urgency */
} Elm_Sys_Notify_Urgency;
#endif
/** Elementary system notify interface
*
* @ingroup Elm_Sys_Notify_Interface
*/
#define ELM_SYS_NOTIFY_INTERFACE_INTERFACE elm_sys_notify_interface_interface_get()
EWAPI const Efl_Class *elm_sys_notify_interface_interface_get(void);
/**
* @brief Causes a notification to be forcefully closed and removed from the
* user's view. It can be used, for example, in the event that what the
* notification pertains to is no longer relevant, or to cancel a notification
* with no expiration time.
*
* @param[in] obj The object.
* @param[in] replaces_id Notification ID that this notification replaces. The
* value 0 means a new notification.
* @param[in] icon The optional program icon of the calling application
* @param[in] summary The summary text briefly describing the notification
* @param[in] body The optional detailed body text. Can be empty
* @param[in] urgency The urgency level
* @param[in] timeout Timeout display in milliseconds
* @param[in] cb Callback used to retrieve the notification id returned by the
* Notification Server
* @param[in] cb_data Optional context data
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify_Interface
*/
EOAPI void elm_obj_sys_notify_interface_send(const Eo *obj, unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data);
/**
* @brief Create a new notification just with Icon, Body and Summary. It is a
* helper that wraps the send method
*
* @param[in] obj The object.
* @param[in] icon The optional program icon of the calling application
* @param[in] summary The summary text briefly describing the notification
* @param[in] body The optional detailed body text. Can be empty
*
* @since 1.16
*
* @ingroup Elm_Sys_Notify_Interface
*/
EOAPI void elm_obj_sys_notify_interface_simple_send(const Eo *obj, const char *icon, const char *summary, const char *body);
/**
* @brief Causes a notification to be forcefully closed and removed from the
* user's view. It can be used, for example, in the event that what the
* notification pertains to is no longer relevant, or to cancel a notification
* with no expiration time.
*
* @param[in] obj The object.
* @param[in] id Notification ID
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify_Interface
*/
EOAPI void elm_obj_sys_notify_interface_close(const Eo *obj, unsigned int id);
#endif

View File

@ -0,0 +1,18 @@
EAPI void
elm_sys_notify_interface_send(const Elm_Sys_Notify_Interface *obj, unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data)
{
elm_obj_sys_notify_interface_send(obj, replaces_id, icon, summary, body, urgency, timeout, cb, cb_data);
}
EAPI void
elm_sys_notify_interface_simple_send(const Elm_Sys_Notify_Interface *obj, const char *icon, const char *summary, const char *body)
{
elm_obj_sys_notify_interface_simple_send(obj, icon, summary, body);
}
EAPI void
elm_sys_notify_interface_close(const Elm_Sys_Notify_Interface *obj, unsigned int id)
{
elm_obj_sys_notify_interface_close(obj, id);
}

View File

@ -0,0 +1,84 @@
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_LEGACY_H_
#define _ELM_SYS_NOTIFY_INTERFACE_EO_LEGACY_H_
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
#define _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
typedef Eo Elm_Sys_Notify_Interface;
#endif
#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
#define _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
/** Urgency levels of a notification
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify
*/
typedef enum
{
ELM_SYS_NOTIFY_URGENCY_LOW = 0, /**< Low urgency */
ELM_SYS_NOTIFY_URGENCY_NORMAL, /**< Normal urgency */
ELM_SYS_NOTIFY_URGENCY_CRITICAL /**< Critical urgency */
} Elm_Sys_Notify_Urgency;
#endif
/**
* @brief Causes a notification to be forcefully closed and removed from the
* user's view. It can be used, for example, in the event that what the
* notification pertains to is no longer relevant, or to cancel a notification
* with no expiration time.
*
* @param[in] obj The object.
* @param[in] replaces_id Notification ID that this notification replaces. The
* value 0 means a new notification.
* @param[in] icon The optional program icon of the calling application
* @param[in] summary The summary text briefly describing the notification
* @param[in] body The optional detailed body text. Can be empty
* @param[in] urgency The urgency level
* @param[in] timeout Timeout display in milliseconds
* @param[in] cb Callback used to retrieve the notification id returned by the
* Notification Server
* @param[in] cb_data Optional context data
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify_Interface_Group
*/
EAPI void elm_sys_notify_interface_send(const Elm_Sys_Notify_Interface *obj, unsigned int replaces_id, const char *icon, const char *summary, const char *body, Elm_Sys_Notify_Urgency urgency, int timeout, Elm_Sys_Notify_Send_Cb cb, const void *cb_data);
/**
* @brief Create a new notification just with Icon, Body and Summary. It is a
* helper that wraps the send method
*
* @param[in] obj The object.
* @param[in] icon The optional program icon of the calling application
* @param[in] summary The summary text briefly describing the notification
* @param[in] body The optional detailed body text. Can be empty
*
* @since 1.16
*
* @ingroup Elm_Sys_Notify_Interface_Group
*/
EAPI void elm_sys_notify_interface_simple_send(const Elm_Sys_Notify_Interface *obj, const char *icon, const char *summary, const char *body);
/**
* @brief Causes a notification to be forcefully closed and removed from the
* user's view. It can be used, for example, in the event that what the
* notification pertains to is no longer relevant, or to cancel a notification
* with no expiration time.
*
* @param[in] obj The object.
* @param[in] id Notification ID
*
* @since 1.8
*
* @ingroup Elm_Sys_Notify_Interface_Group
*/
EAPI void elm_sys_notify_interface_close(const Elm_Sys_Notify_Interface *obj, unsigned int id);
#endif

View File

@ -1,8 +1,5 @@
pub_legacy_eo_files = [
'efl_ui_clock_legacy.eo',
'elm_sys_notify_interface.eo',
'elm_sys_notify.eo',
'elm_sys_notify_dbus.eo',
'elm_systray.eo',
'elm_widget_item_static_focus.eo',
'elm_ctxpopup_part.eo',
@ -796,6 +793,12 @@ elementary_pub_headers = [
'elm_slideshow_item_eo.legacy.h',
'elm_spinner_eo.h',
'elm_spinner_eo.legacy.h',
'elm_sys_notify_dbus_eo.h',
'elm_sys_notify_dbus_eo.legacy.h',
'elm_sys_notify_eo.h',
'elm_sys_notify_eo.legacy.h',
'elm_sys_notify_interface_eo.h',
'elm_sys_notify_interface_eo.legacy.h',
]
elementary_header_src = [