summaryrefslogtreecommitdiff
path: root/src/lib/elm_systray_eo.h
blob: 18998f96f2fafa353fc39d5fcf020e7bfb4f677c (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
#define ELM_OBJ_SYSTRAY_CLASS elm_obj_systray_class_get()

const Eo_Class *elm_obj_systray_class_get(void) EINA_CONST;

extern EAPI Eo_Op ELM_OBJ_SYSTRAY_BASE_ID;

enum
{
   ELM_OBJ_SYSTRAY_SUB_ID_CATEGORY_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_CATEGORY_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_STATUS_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_STATUS_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_ATT_ICON_NAME_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_ATT_ICON_NAME_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_ICON_NAME_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_ICON_NAME_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_ICON_THEME_PATH_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_ICON_THEME_PATH_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_ID_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_ID_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_TITLE_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_TITLE_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_MENU_SET,
   ELM_OBJ_SYSTRAY_SUB_ID_MENU_GET,
   ELM_OBJ_SYSTRAY_SUB_ID_REGISTER,
   ELM_OBJ_SYSTRAY_SUB_ID_LAST
};

#define ELM_OBJ_SYSTRAY_ID(sub_id) (ELM_OBJ_SYSTRAY_BASE_ID + sub_id)

/**
 * @def elm_obj_systray_category_set
 *
 * Set the category of the Status Notifier Item.
 *
 * @param[in] cat Category
 *
 * @see Elm_Systray_Category
 *
 * @since 1.8
 */
#define elm_obj_systray_category_set(cat)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_CATEGORY_SET), \
        EO_TYPECHECK(Elm_Systray_Category, cat)

/**
 * @def elm_obj_systray_category_get
 *
 * Retrieve the category of the Status Notifier Item.
 *
 * @param[out] ret Category
 *
 * @see elm_obj_systray_category_set
 *
 * @since 1.8
 */
#define elm_obj_systray_category_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_CATEGORY_GET), \
        EO_TYPECHECK(Elm_Systray_Category *, ret)

/**
 * @def elm_obj_systray_status_set
 *
 * Set the status of the Status Notifier Item.
 *
 * @param[in] st Status
 *
 * @see Elm_Systray_Status
 *
 * @since 1.8
 */
#define elm_obj_systray_status_set(st)                         \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_STATUS_SET), \
        EO_TYPECHECK(Elm_Systray_Status, st)

/**
 * @def elm_obj_systray_status_get
 *
 * Retrieve the status of the Status Notifier Item.
 *
 * @param[out] ret Status
 *
 * @see elm_obj_systray_status_set
 *
 * @since 1.8
 */
#define elm_obj_systray_status_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_STATUS_GET), \
        EO_TYPECHECK(Elm_Systray_Status *, ret)

/**
 * @def elm_obj_systray_att_icon_name_set
 *
 * Set the name of the attention icon to be used by the Status Notifier Item.
 *
 * @param[in] att_icon_name
 *
 * @see elm_obj_systray_att_icon_name_get
 *
 * @since 1.8
 */
#define elm_obj_systray_att_icon_name_set(att_icon_name)              \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ATT_ICON_NAME_SET), \
        EO_TYPECHECK(const char *, att_icon_name)

/**
 * @def elm_obj_systray_att_icon_name_get
 *
 * Retrieve the name of the attention icon used by the Status Notifier Item.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_att_icon_name_set
 *
 * @since 1.8
 */
#define elm_obj_systray_att_icon_name_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ATT_ICON_NAME_GET), \
        EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_systray_icon_name_set
 *
 * Set the name of the icon to be used by the Status Notifier Item.
 *
 * @param[in] icon_name
 *
 * @see elm_obj_systray_icon_name_get
 *
 * @since 1.8
 */
#define elm_obj_systray_icon_name_set(icon_name)                  \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ICON_NAME_SET), \
        EO_TYPECHECK(const char *, icon_name)

/**
 * @def elm_obj_systray_icon_name_get
 *
 * Retrieve the name of the icon used by the Status Notifier Item.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_icon_name_set
 *
 * @since 1.8
 */
#define elm_obj_systray_icon_name_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ICON_NAME_GET), \
        EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_systray_icon_theme_path_set
 *
 * Set the path to the theme where the icons can be found.
 * Set this value to "" to use the default path.
 *
 * @param[in] icon_theme_path
 *
 * @see elm_obj_systray_icon_theme_path_get
 *
 * @since 1.8
 */
#define elm_obj_systray_icon_theme_path_set(icon_theme_path)            \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ICON_THEME_PATH_SET), \
        EO_TYPECHECK(const char *, icon_theme_path)

/**
 * @def elm_obj_systray_icon_theme_path_get
 *
 * Retrieve the path to the icon's theme currently in use.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_icon_theme_path_set
 *
 * @since 1.8
 */
#define elm_obj_systray_icon_theme_path_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ICON_THEME_PATH_GET), \
        EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_systray_id_set
 *
 * Set the id of the Status Notifier Item.
 *
 * @param[in] id
 *
 * @see elm_obj_systray_id_get
 *
 * @since 1.8
 */
#define elm_obj_systray_id_set(id)                         \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ID_SET), \
        EO_TYPECHECK(const char *, id)

/**
 * @def elm_obj_systray_id_get
 *
 * Retrieve the id of the Status Notifier Item.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_id_set
 *
 * @since 1.8
 */
#define elm_obj_systray_id_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_ID_GET), \
        EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_systray_title_set
 *
 * Set the title of the Status Notifier Item.
 *
 * @param[in] title
 *
 * @see elm_obj_systray_title_get
 *
 * @since 1.8
 */
#define elm_obj_systray_title_set(title)                      \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_TITLE_SET), \
        EO_TYPECHECK(const char *, title)

/**
 * @def elm_obj_systray_title_get
 *
 * Retrieve the title of the Status Notifier Item.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_title_set
 *
 * @since 1.8
 */
#define elm_obj_systray_title_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_TITLE_GET), \
        EO_TYPECHECK(const char **, ret)

/**
 * @def elm_obj_systray_menu_set
 *
 * Set the object path of the D-Bus Menu that is to be show when the
 * Status Notifier Item is activated by the user.
 *
 * @param[in] menu
 *
 * @see elm_obj_systray_menu_get
 *
 * @since 1.8
 */
#define elm_obj_systray_menu_set(menu)                       \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_MENU_SET), \
        EO_TYPECHECK(const Eo *, menu)

/**
 * @def elm_obj_systray_menu_get
 *
 * Retrieve the object path of the D-Bus Menu currently in use.
 *
 * @param[out] ret
 *
 * @see elm_obj_systray_menu_set
 *
 * @since 1.8
 */
#define elm_obj_systray_menu_get(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_MENU_GET), \
        EO_TYPECHECK(const Eo **, ret)

/**
 * @def elm_obj_systray_register
 *
 * Register this Status Notifier Item in the System Tray Watcher.
 * This function should only be called after the event
 * ELM_EVENT_SYSTRAY_READY is emitted.
 *
 * @param[out] ret
 *
 * @since 1.8
 */
#define elm_obj_systray_register(ret)                        \
        ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_REGISTER), \
        EO_TYPECHECK(Eina_Bool *, ret)