keyrouter: Fix wrong return value
[platform/core/uifw/libds-tizen.git] / src / libds / addon.h
1 #ifndef DS_ADDON_H
2 #define DS_ADDON_H
3
4 #include <wayland-util.h>
5
6 struct ds_addon_set {
7     struct wl_list addons;
8 };
9
10 struct ds_addon {
11     const struct ds_addon_interface *impl;
12     const void *owner;
13     struct wl_list link;
14 };
15
16 struct ds_addon_interface {
17     const char *name;
18     void (*destroy)(struct ds_addon *addon);
19 };
20
21 void
22 ds_addon_set_init(struct ds_addon_set *set);
23
24 void
25 ds_addon_set_finish(struct ds_addon_set *set);
26
27 void
28 ds_addon_init(struct ds_addon *addon, struct ds_addon_set *set,
29         const void *owner, const struct ds_addon_interface *impl);
30
31 void
32 ds_addon_finish(struct ds_addon *addon);
33
34 struct ds_addon *
35 ds_addon_find(struct ds_addon_set *set, const void *owner,
36         const struct ds_addon_interface *impl);
37
38 #endif