summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:16:26 -0800
commitb01c6a09c8d1c009db86a2c2aef7290222522c91 (patch)
tree1141f8f8ff83aa54e5a49adab125b169dafa3bfc
parent49044cc3ade681f15fc33ceaee86648124933fd0 (diff)
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
-rw-r--r--src/Makefile_Elementary.am14
-rw-r--r--src/lib/elementary/elm_sys_notify.c10
-rw-r--r--src/lib/elementary/elm_sys_notify.eo96
-rw-r--r--src/lib/elementary/elm_sys_notify.h4
-rw-r--r--src/lib/elementary/elm_sys_notify_dbus.c10
-rw-r--r--src/lib/elementary/elm_sys_notify_dbus.eo15
-rw-r--r--src/lib/elementary/elm_sys_notify_dbus_eo.c51
-rw-r--r--src/lib/elementary/elm_sys_notify_dbus_eo.h24
-rw-r--r--src/lib/elementary/elm_sys_notify_dbus_eo.legacy.h17
-rw-r--r--src/lib/elementary/elm_sys_notify_eo.c76
-rw-r--r--src/lib/elementary/elm_sys_notify_eo.h124
-rw-r--r--src/lib/elementary/elm_sys_notify_eo.legacy.c12
-rw-r--r--src/lib/elementary/elm_sys_notify_eo.legacy.h117
-rw-r--r--src/lib/elementary/elm_sys_notify_interface.c2
-rw-r--r--src/lib/elementary/elm_sys_notify_interface.eo68
-rw-r--r--src/lib/elementary/elm_sys_notify_interface_eo.c39
-rw-r--r--src/lib/elementary/elm_sys_notify_interface_eo.h91
-rw-r--r--src/lib/elementary/elm_sys_notify_interface_eo.legacy.c18
-rw-r--r--src/lib/elementary/elm_sys_notify_interface_eo.legacy.h84
-rw-r--r--src/lib/elementary/meson.build9
20 files changed, 683 insertions, 198 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 6e9470f..d715e6c 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -180,9 +180,6 @@ elm_private_eolian_files = \
180# Legacy classes - not part of public EO API 180# Legacy classes - not part of public EO API
181elm_legacy_eolian_files = \ 181elm_legacy_eolian_files = \
182 lib/elementary/efl_ui_clock_legacy.eo \ 182 lib/elementary/efl_ui_clock_legacy.eo \
183 lib/elementary/elm_sys_notify_interface.eo \
184 lib/elementary/elm_sys_notify.eo \
185 lib/elementary/elm_sys_notify_dbus.eo \
186 lib/elementary/elm_systray.eo \ 183 lib/elementary/elm_systray.eo \
187 lib/elementary/elm_widget_item_static_focus.eo \ 184 lib/elementary/elm_widget_item_static_focus.eo \
188 lib/elementary/elm_ctxpopup_part.eo \ 185 lib/elementary/elm_ctxpopup_part.eo \
@@ -388,6 +385,11 @@ lib/elementary/elm_slideshow_item_eo.c \
388lib/elementary/elm_slideshow_item_eo.legacy.c \ 385lib/elementary/elm_slideshow_item_eo.legacy.c \
389lib/elementary/elm_spinner_eo.c \ 386lib/elementary/elm_spinner_eo.c \
390lib/elementary/elm_spinner_eo.legacy.c \ 387lib/elementary/elm_spinner_eo.legacy.c \
388lib/elementary/elm_sys_notify_dbus_eo.c \
389lib/elementary/elm_sys_notify_eo.c \
390lib/elementary/elm_sys_notify_eo.legacy.c \
391lib/elementary/elm_sys_notify_interface_eo.c \
392lib/elementary/elm_sys_notify_interface_eo.legacy.c \
391$(NULL) 393$(NULL)
392 394
393elm_legacy_eo_headers = \ 395elm_legacy_eo_headers = \
@@ -579,6 +581,12 @@ lib/elementary/elm_slideshow_item_eo.h \
579lib/elementary/elm_slideshow_item_eo.legacy.h \ 581lib/elementary/elm_slideshow_item_eo.legacy.h \
580lib/elementary/elm_spinner_eo.h \ 582lib/elementary/elm_spinner_eo.h \
581lib/elementary/elm_spinner_eo.legacy.h \ 583lib/elementary/elm_spinner_eo.legacy.h \
584lib/elementary/elm_sys_notify_dbus_eo.h \
585lib/elementary/elm_sys_notify_dbus_eo.legacy.h \
586lib/elementary/elm_sys_notify_eo.h \
587lib/elementary/elm_sys_notify_eo.legacy.h \
588lib/elementary/elm_sys_notify_interface_eo.h \
589lib/elementary/elm_sys_notify_interface_eo.legacy.h \
582$(NULL) 590$(NULL)
583 591
584 592
diff --git a/src/lib/elementary/elm_sys_notify.c b/src/lib/elementary/elm_sys_notify.c
index a4789cd..0b0e7f1 100644
--- a/src/lib/elementary/elm_sys_notify.c
+++ b/src/lib/elementary/elm_sys_notify.c
@@ -6,10 +6,10 @@
6 6
7#include "elm_priv.h" 7#include "elm_priv.h"
8 8
9#include "elm_sys_notify_interface.eo.h" 9#include "elm_sys_notify_interface_eo.h"
10#include "elm_sys_notify.eo.h" 10#include "elm_sys_notify_eo.h"
11#include "elm_sys_notify_dbus.eo.h" 11#include "elm_sys_notify_dbus_eo.h"
12#include "elm_sys_notify_dbus.eo.legacy.h" 12#include "elm_sys_notify_dbus_eo.legacy.h"
13 13
14#define MY_CLASS ELM_SYS_NOTIFY_CLASS 14#define MY_CLASS ELM_SYS_NOTIFY_CLASS
15 15
@@ -288,5 +288,5 @@ elm_sys_notify_close(unsigned int id)
288 elm_obj_sys_notify_interface_close(_singleton, id); 288 elm_obj_sys_notify_interface_close(_singleton, id);
289} 289}
290 290
291#include "elm_sys_notify.eo.c" 291#include "elm_sys_notify_eo.c"
292 292
diff --git a/src/lib/elementary/elm_sys_notify.eo b/src/lib/elementary/elm_sys_notify.eo
deleted file mode 100644
index cf557a0..0000000
--- a/src/lib/elementary/elm_sys_notify.eo
+++ /dev/null
@@ -1,96 +0,0 @@
1enum Elm.Sys_Notify.Server
2{
3 [[System notification server types]]
4 none = 0, [[No notificationserver (disables notifications)]]
5 dbus = 1 << 0 [[Use DBus as a notification server]]
6}
7
8enum Elm.Sys_Notify.Closed_Reason
9{
10 [[The reason the notification was closed
11
12 @since 1.8
13 ]]
14
15 legacy: elm_sys_notify_closed;
16
17 expired, [[The notification expired]]
18 dismissed, [[The notification was dismissed by the user]]
19 requested, [[The notification was closed by a call to CloseNotification method]]
20 undefined [[Undefined/reserved reasons]]
21}
22
23struct Elm.Sys_Notify.Notification_Closed
24{
25 [[Data on event when notification closed is emitted
26
27 @since 1.8
28 ]]
29 id: uint; [[ID of the notification]]
30 reason: Elm.Sys_Notify.Closed_Reason; [[The reason the notification was closed]]
31}
32
33struct Elm.Sys_Notify.Action_Invoked
34{
35 [[Data on event when the action invoked is emitted
36
37 @since 1.8
38 ]]
39 id: uint; [[ID of the notification]]
40 action_key: ptr(char); [[The key of the action invoked. These match the
41 keys sent over in the list of actions]]
42}
43
44class Elm.Sys_Notify extends Efl.Object implements Elm.Sys_Notify_Interface
45{
46 [[Elementary system notification class]]
47 legacy_prefix: elm_sys_notify;
48 eo_prefix: elm_obj_sys_notify;
49
50 methods {
51 @property servers {
52 get {
53 [[Get the notification servers that have been registered
54
55 @since 1.17
56 ]]
57 }
58 set {
59 [[Set the notifications server to be used.
60
61 Note: This is an advanced function that should be used only to
62 fullfill very specific purposes. Use elm_need_sys_notify()
63 which activates the default available notification
64 servers.
65
66 @since 1.17
67 ]]
68 return: bool; [[$true on success, $false on failure]]
69 }
70 values {
71 servers: Elm.Sys_Notify.Server; [[Binary mask of servers to enable.
72 If a server is not present in the binary mask but was previously
73 registered, it will be unregistered.]]
74 }
75 }
76
77 singleton_get @class {
78 [[Returns the singleton instance of the notification manager
79 Elm.Sys_Notify. It is initialized upon the first call of this
80 function
81
82 @since 1.17
83 ]]
84 return: Elm.Sys_Notify; [[The unique notification manager]]
85 }
86 }
87
88 implements {
89 class.constructor;
90 Efl.Object.constructor;
91 Efl.Object.destructor;
92 Elm.Sys_Notify_Interface.send;
93 Elm.Sys_Notify_Interface.simple_send;
94 Elm.Sys_Notify_Interface.close;
95 }
96}
diff --git a/src/lib/elementary/elm_sys_notify.h b/src/lib/elementary/elm_sys_notify.h
index 429ae92..aaf55f8 100644
--- a/src/lib/elementary/elm_sys_notify.h
+++ b/src/lib/elementary/elm_sys_notify.h
@@ -4,8 +4,8 @@
4typedef void (*Elm_Sys_Notify_Send_Cb)(void *data, unsigned int id); 4typedef void (*Elm_Sys_Notify_Send_Cb)(void *data, unsigned int id);
5 5
6#ifndef EFL_NOLEGACY_API_SUPPORT 6#ifndef EFL_NOLEGACY_API_SUPPORT
7#include "elm_sys_notify_interface.eo.legacy.h" 7#include "elm_sys_notify_interface_eo.legacy.h"
8#include "elm_sys_notify.eo.legacy.h" 8#include "elm_sys_notify_eo.legacy.h"
9#endif 9#endif
10 10
11/** 11/**
diff --git a/src/lib/elementary/elm_sys_notify_dbus.c b/src/lib/elementary/elm_sys_notify_dbus.c
index e2784cd..b1be50d 100644
--- a/src/lib/elementary/elm_sys_notify_dbus.c
+++ b/src/lib/elementary/elm_sys_notify_dbus.c
@@ -6,10 +6,10 @@
6 6
7#include "elm_priv.h" 7#include "elm_priv.h"
8 8
9#include "elm_sys_notify_interface.eo.h" 9#include "elm_sys_notify_interface_eo.h"
10#include "elm_sys_notify.eo.h" 10#include "elm_sys_notify_eo.h"
11#include "elm_sys_notify_dbus.eo.h" 11#include "elm_sys_notify_dbus_eo.h"
12#include "elm_sys_notify_dbus.eo.legacy.h" 12#include "elm_sys_notify_dbus_eo.legacy.h"
13 13
14#define MY_CLASS ELM_SYS_NOTIFY_DBUS_CLASS 14#define MY_CLASS ELM_SYS_NOTIFY_DBUS_CLASS
15 15
@@ -396,5 +396,5 @@ _elm_sys_notify_dbus_efl_object_destructor(Eo *obj,
396} 396}
397 397
398 398
399#include "elm_sys_notify_dbus.eo.c" 399#include "elm_sys_notify_dbus_eo.c"
400 400
diff --git a/src/lib/elementary/elm_sys_notify_dbus.eo b/src/lib/elementary/elm_sys_notify_dbus.eo
deleted file mode 100644
index eea2667..0000000
--- a/src/lib/elementary/elm_sys_notify_dbus.eo
+++ /dev/null
@@ -1,15 +0,0 @@
1class Elm.Sys_Notify.Dbus extends Efl.Object implements Elm.Sys_Notify_Interface
2{
3 [[Elementary system notification DBus class]]
4 legacy_prefix: elm_sys_notify_dbus;
5 eo_prefix: elm_obj_sys_notify_dbus;
6 data: null;
7
8 implements {
9 Efl.Object.constructor;
10 Efl.Object.destructor;
11 Elm.Sys_Notify_Interface.send;
12 Elm.Sys_Notify_Interface.simple_send;
13 Elm.Sys_Notify_Interface.close;
14 }
15}
diff --git a/src/lib/elementary/elm_sys_notify_dbus_eo.c b/src/lib/elementary/elm_sys_notify_dbus_eo.c
new file mode 100644
index 0000000..59259da
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_dbus_eo.c
@@ -0,0 +1,51 @@
1
2Efl_Object *_elm_sys_notify_dbus_efl_object_constructor(Eo *obj, void *pd);
3
4
5void _elm_sys_notify_dbus_efl_object_destructor(Eo *obj, void *pd);
6
7
8void _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);
9
10
11void _elm_sys_notify_dbus_elm_sys_notify_interface_simple_send(const Eo *obj, void *pd, const char *icon, const char *summary, const char *body);
12
13
14void _elm_sys_notify_dbus_elm_sys_notify_interface_close(const Eo *obj, void *pd, unsigned int id);
15
16
17static Eina_Bool
18_elm_sys_notify_dbus_class_initializer(Efl_Class *klass)
19{
20 const Efl_Object_Ops *opsp = NULL;
21
22 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
23
24#ifndef ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
25#define ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
26#endif
27
28 EFL_OPS_DEFINE(ops,
29 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_sys_notify_dbus_efl_object_constructor),
30 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_sys_notify_dbus_efl_object_destructor),
31 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, _elm_sys_notify_dbus_elm_sys_notify_interface_send),
32 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, _elm_sys_notify_dbus_elm_sys_notify_interface_simple_send),
33 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, _elm_sys_notify_dbus_elm_sys_notify_interface_close),
34 ELM_SYS_NOTIFY_DBUS_EXTRA_OPS
35 );
36 opsp = &ops;
37
38 return efl_class_functions_set(klass, opsp, ropsp);
39}
40
41static const Efl_Class_Description _elm_sys_notify_dbus_class_desc = {
42 EO_VERSION,
43 "Elm.Sys_Notify.Dbus",
44 EFL_CLASS_TYPE_REGULAR,
45 0,
46 _elm_sys_notify_dbus_class_initializer,
47 NULL,
48 NULL
49};
50
51EFL_DEFINE_CLASS(elm_sys_notify_dbus_class_get, &_elm_sys_notify_dbus_class_desc, EFL_OBJECT_CLASS, ELM_SYS_NOTIFY_INTERFACE_INTERFACE, NULL);
diff --git a/src/lib/elementary/elm_sys_notify_dbus_eo.h b/src/lib/elementary/elm_sys_notify_dbus_eo.h
new file mode 100644
index 0000000..c5976e4
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_dbus_eo.h
@@ -0,0 +1,24 @@
1#ifndef _ELM_SYS_NOTIFY_DBUS_EO_H_
2#define _ELM_SYS_NOTIFY_DBUS_EO_H_
3
4#ifndef _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify_Dbus;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_DBUS_EO_TYPES
12#define _ELM_SYS_NOTIFY_DBUS_EO_TYPES
13
14
15#endif
16/** Elementary system notification DBus class
17 *
18 * @ingroup Elm_Sys_Notify_Dbus
19 */
20#define ELM_SYS_NOTIFY_DBUS_CLASS elm_sys_notify_dbus_class_get()
21
22EWAPI const Efl_Class *elm_sys_notify_dbus_class_get(void);
23
24#endif
diff --git a/src/lib/elementary/elm_sys_notify_dbus_eo.legacy.h b/src/lib/elementary/elm_sys_notify_dbus_eo.legacy.h
new file mode 100644
index 0000000..8d42845
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_dbus_eo.legacy.h
@@ -0,0 +1,17 @@
1#ifndef _ELM_SYS_NOTIFY_DBUS_EO_LEGACY_H_
2#define _ELM_SYS_NOTIFY_DBUS_EO_LEGACY_H_
3
4#ifndef _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_DBUS_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify_Dbus;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_DBUS_EO_TYPES
12#define _ELM_SYS_NOTIFY_DBUS_EO_TYPES
13
14
15#endif
16
17#endif
diff --git a/src/lib/elementary/elm_sys_notify_eo.c b/src/lib/elementary/elm_sys_notify_eo.c
new file mode 100644
index 0000000..7b57eca
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_eo.c
@@ -0,0 +1,76 @@
1
2Eina_Bool _elm_sys_notify_servers_set(Eo *obj, Elm_Sys_Notify_Data *pd, Elm_Sys_Notify_Server servers);
3
4EOAPI EFL_FUNC_BODYV(elm_obj_sys_notify_servers_set, Eina_Bool, 0, EFL_FUNC_CALL(servers), Elm_Sys_Notify_Server servers);
5
6Elm_Sys_Notify_Server _elm_sys_notify_servers_get(const Eo *obj, Elm_Sys_Notify_Data *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_sys_notify_servers_get, Elm_Sys_Notify_Server, 0);
9
10Elm_Sys_Notify *_elm_sys_notify_singleton_get(void);
11
12EOAPI Elm_Sys_Notify * elm_obj_sys_notify_singleton_get(void)
13{
14 elm_sys_notify_class_get();
15 return _elm_sys_notify_singleton_get();
16}
17EOAPI Elm_Sys_Notify * elm_sys_notify_singleton_get(void)
18{
19 elm_sys_notify_class_get();
20 return _elm_sys_notify_singleton_get();
21}
22
23Efl_Object *_elm_sys_notify_efl_object_constructor(Eo *obj, Elm_Sys_Notify_Data *pd);
24
25
26void _elm_sys_notify_efl_object_destructor(Eo *obj, Elm_Sys_Notify_Data *pd);
27
28
29void _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);
30
31
32void _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);
33
34
35void _elm_sys_notify_elm_sys_notify_interface_close(const Eo *obj, Elm_Sys_Notify_Data *pd, unsigned int id);
36
37
38static Eina_Bool
39_elm_sys_notify_class_initializer(Efl_Class *klass)
40{
41 const Efl_Object_Ops *opsp = NULL;
42
43 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
44
45#ifndef ELM_SYS_NOTIFY_EXTRA_OPS
46#define ELM_SYS_NOTIFY_EXTRA_OPS
47#endif
48
49 EFL_OPS_DEFINE(ops,
50 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_servers_set, _elm_sys_notify_servers_set),
51 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_servers_get, _elm_sys_notify_servers_get),
52 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_sys_notify_efl_object_constructor),
53 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_sys_notify_efl_object_destructor),
54 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, _elm_sys_notify_elm_sys_notify_interface_send),
55 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, _elm_sys_notify_elm_sys_notify_interface_simple_send),
56 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, _elm_sys_notify_elm_sys_notify_interface_close),
57 ELM_SYS_NOTIFY_EXTRA_OPS
58 );
59 opsp = &ops;
60
61 return efl_class_functions_set(klass, opsp, ropsp);
62}
63
64static const Efl_Class_Description _elm_sys_notify_class_desc = {
65 EO_VERSION,
66 "Elm.Sys_Notify",
67 EFL_CLASS_TYPE_REGULAR,
68 sizeof(Elm_Sys_Notify_Data),
69 _elm_sys_notify_class_initializer,
70 _elm_sys_notify_class_constructor,
71 NULL
72};
73
74EFL_DEFINE_CLASS(elm_sys_notify_class_get, &_elm_sys_notify_class_desc, EFL_OBJECT_CLASS, ELM_SYS_NOTIFY_INTERFACE_INTERFACE, NULL);
75
76#include "elm_sys_notify_eo.legacy.c"
diff --git a/src/lib/elementary/elm_sys_notify_eo.h b/src/lib/elementary/elm_sys_notify_eo.h
new file mode 100644
index 0000000..247fef9
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_eo.h
@@ -0,0 +1,124 @@
1#ifndef _ELM_SYS_NOTIFY_EO_H_
2#define _ELM_SYS_NOTIFY_EO_H_
3
4#ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_EO_TYPES
12#define _ELM_SYS_NOTIFY_EO_TYPES
13
14/** System notification server types
15 *
16 * @ingroup Elm_Sys_Notify
17 */
18typedef enum
19{
20 ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables
21 * notifications) */
22 ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification
23 * server */
24} Elm_Sys_Notify_Server;
25
26/** The reason the notification was closed
27 *
28 * @since 1.8
29 *
30 * @ingroup Elm_Sys_Notify
31 */
32typedef enum
33{
34 ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */
35 ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the
36 * user */
37 ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to
38 * CloseNotification method */
39 ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */
40} Elm_Sys_Notify_Closed_Reason;
41
42/** Data on event when notification closed is emitted
43 *
44 * @since 1.8
45 *
46 * @ingroup Elm_Sys_Notify
47 */
48typedef struct _Elm_Sys_Notify_Notification_Closed
49{
50 unsigned int id; /**< ID of the notification */
51 Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was
52 * closed */
53} Elm_Sys_Notify_Notification_Closed;
54
55/** Data on event when the action invoked is emitted
56 *
57 * @since 1.8
58 *
59 * @ingroup Elm_Sys_Notify
60 */
61typedef struct _Elm_Sys_Notify_Action_Invoked
62{
63 unsigned int id; /**< ID of the notification */
64 char *action_key; /**< The key of the action invoked. These match the keys
65 * sent over in the list of actions */
66} Elm_Sys_Notify_Action_Invoked;
67
68
69#endif
70/** Elementary system notification class
71 *
72 * @ingroup Elm_Sys_Notify
73 */
74#define ELM_SYS_NOTIFY_CLASS elm_sys_notify_class_get()
75
76EWAPI const Efl_Class *elm_sys_notify_class_get(void);
77
78/**
79 * @brief Set the notifications server to be used.
80 *
81 * @note This is an advanced function that should be used only to fullfill very
82 * specific purposes. Use elm_need_sys_notify() which activates the default
83 * available notification servers.
84 *
85 * @param[in] obj The object.
86 * @param[in] servers Binary mask of servers to enable. If a server is not
87 * present in the binary mask but was previously registered, it will be
88 * unregistered.
89 *
90 * @return @c true on success, @c false on failure
91 *
92 * @since 1.17
93 *
94 * @ingroup Elm_Sys_Notify
95 */
96EOAPI Eina_Bool elm_obj_sys_notify_servers_set(Eo *obj, Elm_Sys_Notify_Server servers);
97
98/**
99 * @brief Get the notification servers that have been registered
100 *
101 * @param[in] obj The object.
102 *
103 * @return Binary mask of servers to enable. If a server is not present in the
104 * binary mask but was previously registered, it will be unregistered.
105 *
106 * @since 1.17
107 *
108 * @ingroup Elm_Sys_Notify
109 */
110EOAPI Elm_Sys_Notify_Server elm_obj_sys_notify_servers_get(const Eo *obj);
111
112/**
113 * @brief Returns the singleton instance of the notification manager
114 * Elm.Sys_Notify. It is initialized upon the first call of this function
115 *
116 * @return The unique notification manager
117 *
118 * @since 1.17
119 *
120 * @ingroup Elm_Sys_Notify
121 */
122EOAPI Elm_Sys_Notify *elm_obj_sys_notify_singleton_get(void);
123
124#endif
diff --git a/src/lib/elementary/elm_sys_notify_eo.legacy.c b/src/lib/elementary/elm_sys_notify_eo.legacy.c
new file mode 100644
index 0000000..93e0d17
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_eo.legacy.c
@@ -0,0 +1,12 @@
1
2EAPI Eina_Bool
3elm_sys_notify_servers_set(Elm_Sys_Notify *obj, Elm_Sys_Notify_Server servers)
4{
5 return elm_obj_sys_notify_servers_set(obj, servers);
6}
7
8EAPI Elm_Sys_Notify_Server
9elm_sys_notify_servers_get(const Elm_Sys_Notify *obj)
10{
11 return elm_obj_sys_notify_servers_get(obj);
12}
diff --git a/src/lib/elementary/elm_sys_notify_eo.legacy.h b/src/lib/elementary/elm_sys_notify_eo.legacy.h
new file mode 100644
index 0000000..a566673
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_eo.legacy.h
@@ -0,0 +1,117 @@
1#ifndef _ELM_SYS_NOTIFY_EO_LEGACY_H_
2#define _ELM_SYS_NOTIFY_EO_LEGACY_H_
3
4#ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_EO_TYPES
12#define _ELM_SYS_NOTIFY_EO_TYPES
13
14/** System notification server types
15 *
16 * @ingroup Elm_Sys_Notify
17 */
18typedef enum
19{
20 ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables
21 * notifications) */
22 ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification
23 * server */
24} Elm_Sys_Notify_Server;
25
26/** The reason the notification was closed
27 *
28 * @since 1.8
29 *
30 * @ingroup Elm_Sys_Notify
31 */
32typedef enum
33{
34 ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */
35 ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the
36 * user */
37 ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to
38 * CloseNotification method */
39 ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */
40} Elm_Sys_Notify_Closed_Reason;
41
42/** Data on event when notification closed is emitted
43 *
44 * @since 1.8
45 *
46 * @ingroup Elm_Sys_Notify
47 */
48typedef struct _Elm_Sys_Notify_Notification_Closed
49{
50 unsigned int id; /**< ID of the notification */
51 Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was
52 * closed */
53} Elm_Sys_Notify_Notification_Closed;
54
55/** Data on event when the action invoked is emitted
56 *
57 * @since 1.8
58 *
59 * @ingroup Elm_Sys_Notify
60 */
61typedef struct _Elm_Sys_Notify_Action_Invoked
62{
63 unsigned int id; /**< ID of the notification */
64 char *action_key; /**< The key of the action invoked. These match the keys
65 * sent over in the list of actions */
66} Elm_Sys_Notify_Action_Invoked;
67
68
69#endif
70
71/**
72 * @brief Set the notifications server to be used.
73 *
74 * @note This is an advanced function that should be used only to fullfill very
75 * specific purposes. Use elm_need_sys_notify() which activates the default
76 * available notification servers.
77 *
78 * @param[in] obj The object.
79 * @param[in] servers Binary mask of servers to enable. If a server is not
80 * present in the binary mask but was previously registered, it will be
81 * unregistered.
82 *
83 * @return @c true on success, @c false on failure
84 *
85 * @since 1.17
86 *
87 * @ingroup Elm_Sys_Notify_Group
88 */
89EAPI Eina_Bool elm_sys_notify_servers_set(Elm_Sys_Notify *obj, Elm_Sys_Notify_Server servers);
90
91/**
92 * @brief Get the notification servers that have been registered
93 *
94 * @param[in] obj The object.
95 *
96 * @return Binary mask of servers to enable. If a server is not present in the
97 * binary mask but was previously registered, it will be unregistered.
98 *
99 * @since 1.17
100 *
101 * @ingroup Elm_Sys_Notify_Group
102 */
103EAPI Elm_Sys_Notify_Server elm_sys_notify_servers_get(const Elm_Sys_Notify *obj);
104
105/**
106 * @brief Returns the singleton instance of the notification manager
107 * Elm.Sys_Notify. It is initialized upon the first call of this function
108 *
109 * @return The unique notification manager
110 *
111 * @since 1.17
112 *
113 * @ingroup Elm_Sys_Notify_Group
114 */
115EAPI Elm_Sys_Notify *elm_sys_notify_singleton_get(void);
116
117#endif
diff --git a/src/lib/elementary/elm_sys_notify_interface.c b/src/lib/elementary/elm_sys_notify_interface.c
index c630afe..ace1733 100644
--- a/src/lib/elementary/elm_sys_notify_interface.c
+++ b/src/lib/elementary/elm_sys_notify_interface.c
@@ -5,5 +5,5 @@
5#include <Elementary.h> 5#include <Elementary.h>
6 6
7#include "elm_priv.h" 7#include "elm_priv.h"
8#include "elm_sys_notify_interface.eo.c" 8#include "elm_sys_notify_interface_eo.c"
9 9
diff --git a/src/lib/elementary/elm_sys_notify_interface.eo b/src/lib/elementary/elm_sys_notify_interface.eo
deleted file mode 100644
index eddf330..0000000
--- a/src/lib/elementary/elm_sys_notify_interface.eo
+++ /dev/null
@@ -1,68 +0,0 @@
1type Elm_Sys_Notify_Send_Cb: __undefined_type; [[elementary system notify send callback type]]
2
3enum Elm.Sys_Notify.Urgency
4{
5 [[Urgency levels of a notification
6
7 @since 1.8
8 ]]
9 low, [[Low urgency]]
10 normal, [[Normal urgency]]
11 critical [[Critical urgency]]
12}
13
14interface Elm.Sys_Notify_Interface
15{
16 [[Elementary system notify interface]]
17 eo_prefix: elm_obj_sys_notify_interface;
18 legacy_prefix: elm_sys_notify_interface;
19
20 methods {
21 send @const {
22 [[Causes a notification to be forcefully closed and removed from the
23 user's view. It can be used, for example, in the event that what the
24 notification pertains to is no longer relevant, or to cancel a
25 notification with no expiration time.
26
27 @since 1.8
28 ]]
29 params {
30 @in replaces_id: uint; [[Notification ID that this notification replaces.
31 The value 0 means a new notification.]]
32 @in icon: string; [[The optional program icon of the calling application]]
33 @in summary: string; [[The summary text briefly describing the notification]]
34 @in body: string @optional; [[The optional detailed body text. Can be empty]]
35 @in urgency: Elm.Sys_Notify.Urgency; [[The urgency level]]
36 @in timeout: int; [[Timeout display in milliseconds]]
37 @in cb: Elm_Sys_Notify_Send_Cb; [[Callback used to retrieve the notification id
38 returned by the Notification Server]]
39 @in cb_data: const(void_ptr) @optional; [[Optional context data]]
40 }
41 }
42 simple_send @const {
43 [[Create a new notification just with Icon, Body and Summary.
44 It is a helper that wraps the send method
45
46 @since 1.16
47 ]]
48
49 params {
50 @in icon: string; [[The optional program icon of the calling application]]
51 @in summary: string; [[The summary text briefly describing the notification]]
52 @in body: string; [[The optional detailed body text. Can be empty]]
53 }
54 }
55 close @const {
56 [[Causes a notification to be forcefully closed and removed from the
57 user's view. It can be used, for example, in the event that what the
58 notification pertains to is no longer relevant, or to cancel a
59 notification with no expiration time.
60
61 @since 1.8
62 ]]
63 params {
64 @in id: uint; [[Notification ID]]
65 }
66 }
67 }
68}
diff --git a/src/lib/elementary/elm_sys_notify_interface_eo.c b/src/lib/elementary/elm_sys_notify_interface_eo.c
new file mode 100644
index 0000000..febf762
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_interface_eo.c
@@ -0,0 +1,39 @@
1EOAPI 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);
2EOAPI 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);
3EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_sys_notify_interface_close, EFL_FUNC_CALL(id), unsigned int id);
4
5static Eina_Bool
6_elm_sys_notify_interface_class_initializer(Efl_Class *klass)
7{
8 const Efl_Object_Ops *opsp = NULL;
9
10 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
11
12#ifndef ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
13#define ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
14#endif
15
16 EFL_OPS_DEFINE(ops,
17 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_send, NULL),
18 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_simple_send, NULL),
19 EFL_OBJECT_OP_FUNC(elm_obj_sys_notify_interface_close, NULL),
20 ELM_SYS_NOTIFY_INTERFACE_EXTRA_OPS
21 );
22 opsp = &ops;
23
24 return efl_class_functions_set(klass, opsp, ropsp);
25}
26
27static const Efl_Class_Description _elm_sys_notify_interface_class_desc = {
28 EO_VERSION,
29 "Elm.Sys_Notify_Interface",
30 EFL_CLASS_TYPE_INTERFACE,
31 0,
32 _elm_sys_notify_interface_class_initializer,
33 NULL,
34 NULL
35};
36
37EFL_DEFINE_CLASS(elm_sys_notify_interface_interface_get, &_elm_sys_notify_interface_class_desc, NULL, NULL);
38
39#include "elm_sys_notify_interface_eo.legacy.c"
diff --git a/src/lib/elementary/elm_sys_notify_interface_eo.h b/src/lib/elementary/elm_sys_notify_interface_eo.h
new file mode 100644
index 0000000..0c91b01
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_interface_eo.h
@@ -0,0 +1,91 @@
1#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_H_
2#define _ELM_SYS_NOTIFY_INTERFACE_EO_H_
3
4#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify_Interface;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
12#define _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
13
14/** Urgency levels of a notification
15 *
16 * @since 1.8
17 *
18 * @ingroup Elm_Sys_Notify
19 */
20typedef enum
21{
22 ELM_SYS_NOTIFY_URGENCY_LOW = 0, /**< Low urgency */
23 ELM_SYS_NOTIFY_URGENCY_NORMAL, /**< Normal urgency */
24 ELM_SYS_NOTIFY_URGENCY_CRITICAL /**< Critical urgency */
25} Elm_Sys_Notify_Urgency;
26
27
28#endif
29/** Elementary system notify interface
30 *
31 * @ingroup Elm_Sys_Notify_Interface
32 */
33#define ELM_SYS_NOTIFY_INTERFACE_INTERFACE elm_sys_notify_interface_interface_get()
34
35EWAPI const Efl_Class *elm_sys_notify_interface_interface_get(void);
36
37/**
38 * @brief Causes a notification to be forcefully closed and removed from the
39 * user's view. It can be used, for example, in the event that what the
40 * notification pertains to is no longer relevant, or to cancel a notification
41 * with no expiration time.
42 *
43 * @param[in] obj The object.
44 * @param[in] replaces_id Notification ID that this notification replaces. The
45 * value 0 means a new notification.
46 * @param[in] icon The optional program icon of the calling application
47 * @param[in] summary The summary text briefly describing the notification
48 * @param[in] body The optional detailed body text. Can be empty
49 * @param[in] urgency The urgency level
50 * @param[in] timeout Timeout display in milliseconds
51 * @param[in] cb Callback used to retrieve the notification id returned by the
52 * Notification Server
53 * @param[in] cb_data Optional context data
54 *
55 * @since 1.8
56 *
57 * @ingroup Elm_Sys_Notify_Interface
58 */
59EOAPI 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);
60
61/**
62 * @brief Create a new notification just with Icon, Body and Summary. It is a
63 * helper that wraps the send method
64 *
65 * @param[in] obj The object.
66 * @param[in] icon The optional program icon of the calling application
67 * @param[in] summary The summary text briefly describing the notification
68 * @param[in] body The optional detailed body text. Can be empty
69 *
70 * @since 1.16
71 *
72 * @ingroup Elm_Sys_Notify_Interface
73 */
74EOAPI void elm_obj_sys_notify_interface_simple_send(const Eo *obj, const char *icon, const char *summary, const char *body);
75
76/**
77 * @brief Causes a notification to be forcefully closed and removed from the
78 * user's view. It can be used, for example, in the event that what the
79 * notification pertains to is no longer relevant, or to cancel a notification
80 * with no expiration time.
81 *
82 * @param[in] obj The object.
83 * @param[in] id Notification ID
84 *
85 * @since 1.8
86 *
87 * @ingroup Elm_Sys_Notify_Interface
88 */
89EOAPI void elm_obj_sys_notify_interface_close(const Eo *obj, unsigned int id);
90
91#endif
diff --git a/src/lib/elementary/elm_sys_notify_interface_eo.legacy.c b/src/lib/elementary/elm_sys_notify_interface_eo.legacy.c
new file mode 100644
index 0000000..9554388
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_interface_eo.legacy.c
@@ -0,0 +1,18 @@
1
2EAPI void
3elm_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)
4{
5 elm_obj_sys_notify_interface_send(obj, replaces_id, icon, summary, body, urgency, timeout, cb, cb_data);
6}
7
8EAPI void
9elm_sys_notify_interface_simple_send(const Elm_Sys_Notify_Interface *obj, const char *icon, const char *summary, const char *body)
10{
11 elm_obj_sys_notify_interface_simple_send(obj, icon, summary, body);
12}
13
14EAPI void
15elm_sys_notify_interface_close(const Elm_Sys_Notify_Interface *obj, unsigned int id)
16{
17 elm_obj_sys_notify_interface_close(obj, id);
18}
diff --git a/src/lib/elementary/elm_sys_notify_interface_eo.legacy.h b/src/lib/elementary/elm_sys_notify_interface_eo.legacy.h
new file mode 100644
index 0000000..89903c5
--- /dev/null
+++ b/src/lib/elementary/elm_sys_notify_interface_eo.legacy.h
@@ -0,0 +1,84 @@
1#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_LEGACY_H_
2#define _ELM_SYS_NOTIFY_INTERFACE_EO_LEGACY_H_
3
4#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
5#define _ELM_SYS_NOTIFY_INTERFACE_EO_CLASS_TYPE
6
7typedef Eo Elm_Sys_Notify_Interface;
8
9#endif
10
11#ifndef _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
12#define _ELM_SYS_NOTIFY_INTERFACE_EO_TYPES
13
14/** Urgency levels of a notification
15 *
16 * @since 1.8
17 *
18 * @ingroup Elm_Sys_Notify
19 */
20typedef enum
21{
22 ELM_SYS_NOTIFY_URGENCY_LOW = 0, /**< Low urgency */
23 ELM_SYS_NOTIFY_URGENCY_NORMAL, /**< Normal urgency */
24 ELM_SYS_NOTIFY_URGENCY_CRITICAL /**< Critical urgency */
25} Elm_Sys_Notify_Urgency;
26
27
28#endif
29
30/**
31 * @brief Causes a notification to be forcefully closed and removed from the
32 * user's view. It can be used, for example, in the event that what the
33 * notification pertains to is no longer relevant, or to cancel a notification
34 * with no expiration time.
35 *
36 * @param[in] obj The object.
37 * @param[in] replaces_id Notification ID that this notification replaces. The
38 * value 0 means a new notification.
39 * @param[in] icon The optional program icon of the calling application
40 * @param[in] summary The summary text briefly describing the notification
41 * @param[in] body The optional detailed body text. Can be empty
42 * @param[in] urgency The urgency level
43 * @param[in] timeout Timeout display in milliseconds
44 * @param[in] cb Callback used to retrieve the notification id returned by the
45 * Notification Server
46 * @param[in] cb_data Optional context data
47 *
48 * @since 1.8
49 *
50 * @ingroup Elm_Sys_Notify_Interface_Group
51 */
52EAPI 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);
53
54/**
55 * @brief Create a new notification just with Icon, Body and Summary. It is a
56 * helper that wraps the send method
57 *
58 * @param[in] obj The object.
59 * @param[in] icon The optional program icon of the calling application
60 * @param[in] summary The summary text briefly describing the notification
61 * @param[in] body The optional detailed body text. Can be empty
62 *
63 * @since 1.16
64 *
65 * @ingroup Elm_Sys_Notify_Interface_Group
66 */
67EAPI void elm_sys_notify_interface_simple_send(const Elm_Sys_Notify_Interface *obj, const char *icon, const char *summary, const char *body);
68
69/**
70 * @brief Causes a notification to be forcefully closed and removed from the
71 * user's view. It can be used, for example, in the event that what the
72 * notification pertains to is no longer relevant, or to cancel a notification
73 * with no expiration time.
74 *
75 * @param[in] obj The object.
76 * @param[in] id Notification ID
77 *
78 * @since 1.8
79 *
80 * @ingroup Elm_Sys_Notify_Interface_Group
81 */
82EAPI void elm_sys_notify_interface_close(const Elm_Sys_Notify_Interface *obj, unsigned int id);
83
84#endif
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 27b4b23..17d9b65 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,8 +1,5 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_sys_notify_interface.eo',
4 'elm_sys_notify.eo',
5 'elm_sys_notify_dbus.eo',
6 'elm_systray.eo', 3 'elm_systray.eo',
7 'elm_widget_item_static_focus.eo', 4 'elm_widget_item_static_focus.eo',
8 'elm_ctxpopup_part.eo', 5 'elm_ctxpopup_part.eo',
@@ -796,6 +793,12 @@ elementary_pub_headers = [
796 'elm_slideshow_item_eo.legacy.h', 793 'elm_slideshow_item_eo.legacy.h',
797 'elm_spinner_eo.h', 794 'elm_spinner_eo.h',
798 'elm_spinner_eo.legacy.h', 795 'elm_spinner_eo.legacy.h',
796 'elm_sys_notify_dbus_eo.h',
797 'elm_sys_notify_dbus_eo.legacy.h',
798 'elm_sys_notify_eo.h',
799 'elm_sys_notify_eo.legacy.h',
800 'elm_sys_notify_interface_eo.h',
801 'elm_sys_notify_interface_eo.legacy.h',
799] 802]
800 803
801elementary_header_src = [ 804elementary_header_src = [