1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Elementary.h>
#include "elm_priv.h"
#include "elm_sys_notify_cocoa.eo.h"
#include "elm_sys_notify_cocoa.eo.legacy.h"
#define MY_CLASS ELM_SYS_NOTIFY_COCOA_CLASS
#ifdef HAVE_ELEMENTARY_COCOA
EOLIAN static void
_elm_sys_notify_cocoa_elm_sys_notify_interface_close(const Eo *obj EINA_UNUSED,
void *sd EINA_UNUSED,
unsigned int id EINA_UNUSED)
{
}
EOLIAN static void
_elm_sys_notify_cocoa_elm_sys_notify_interface_send(const Eo *obj EINA_UNUSED,
void *sd EINA_UNUSED,
unsigned int replaces_id EINA_UNUSED,
const char *icon EINA_UNUSED,
const char *summary,
const char *body,
Elm_Sys_Notify_Urgency urgency EINA_UNUSED,
int timeout EINA_UNUSED,
Elm_Sys_Notify_Send_Cb cb EINA_UNUSED,
const void *cb_data EINA_UNUSED)
{
Ecore_Cocoa_Notification *n;
printf("----> %s()\n", __func__);
n = ecore_cocoa_notification_get(replaces_id);
printf("-> %p\n", n);
ecore_cocoa_notification_send(n, summary, body, icon, cb, cb_data);
}
#else
EOLIAN static void
_elm_sys_notify_cocoa_elm_sys_notify_interface_close(const Eo *obj EINA_UNUSED,
void *sd EINA_UNUSED,
unsigned int id EINA_UNUSED)
{
}
EOLIAN static void
_elm_sys_notify_cocoa_elm_sys_notify_interface_send(const Eo *obj EINA_UNUSED,
void *sd EINA_UNUSED,
unsigned int replaces_id EINA_UNUSED,
const char *icon EINA_UNUSED,
const char *summary EINA_UNUSED,
const char *body EINA_UNUSED,
Elm_Sys_Notify_Urgency urgency EINA_UNUSED,
int timeout EINA_UNUSED,
Elm_Sys_Notify_Send_Cb cb EINA_UNUSED,
const void *cb_data EINA_UNUSED)
{
}
#endif
EOLIAN static void
_elm_sys_notify_cocoa_elm_sys_notify_interface_simple_send(const Eo *obj,
void *sd,
const char *icon,
const char *summary,
const char *body)
{
printf("----> %s()\n", __func__);
_elm_sys_notify_cocoa_elm_sys_notify_interface_send(obj, sd,
0, icon, summary, body,
ELM_SYS_NOTIFY_URGENCY_NORMAL,
-1, NULL, NULL);
}
#if 0
EOLIAN static Eina_Bool
_elm_sys_notify_cocoa_elm_sys_notify_interface_available_get(const Eo *obj,
void *sd)
{
#ifdef HAVE_ELEMENTARY_COCOA
return EINA_TRUE;
#else
return EINA_FALSE;
#endif
}
#endif
#include "elm_sys_notify_cocoa.eo.c"
|