renew pui prototype
[platform/core/uifw/libpui.git] / include / PUI.h
1 #ifndef _LIBPUI_H_
2 #define _LIBPUI_H_
3
4 #include "PUI_internal.h"
5 #include <Ecore_Wl2.h>
6 #include <wayland-tbm-client.h>
7 #include <tbm_surface_internal.h>
8
9 #define EFL_BETA_API_SUPPORT
10 #define PUI_API __attribute__ ((visibility("default"))
11
12 EAPI extern int PUI_EVENT_ANI_STARTED = 0;
13 EAPI extern int PUI_EVENT_ANI_STOPPED = 0;
14 EAPI extern int PUI_EVENT_ANI_PAUSED = 0;
15 EAPI extern int PUI_EVENT_ANI_READY_TO_START = 0;
16 EAPI extern int PUI_EVENT_ANI_READY_TO_RESUME = 0;
17 EAPI extern int PUI_EVENT_ANI_FRAME_DONE = 0;
18 EAPI extern int PUI_EVENT_ANI_BUFFER_RELEASED = 0;
19
20 enum {
21         PUI_ERROR_NONE,
22         PUI_ERROR_INVALID_ANI_HANDLE,
23         PUI_ERROR_INVALID_ANI_CMD,
24         PUI_ERROR_INVALID_ANI_OPT,
25         PUI_ERROR_INTERNAL,
26 } pui_error;
27
28 enum {
29         PUI_ANI_STATUS_INITIAL,
30         PUI_ANI_STATUS_RUNNING,
31         PUI_ANI_STATUS_PAUSED,
32         PUI_ANI_STATUS_STOPPED,
33         PUI_ANI_STATUS_FORCE_STOPPED,
34 } pui_ani_status;
35
36 enum {
37         PUI_ANI_CMD_NONE,
38         PUI_ANI_CMD_START,
39         PUI_ANI_CMD_STOP,
40         PUI_ANI_CMD_LAST
41 } pui_ani_cmd;
42
43 enum {
44         PUI_ANI_OPT_NONE,
45         PUI_ANI_OPT_ONCE,
46         PUI_ANI_OPT_REPEAT,
47         PUI_ANI_OPT_LAST
48 } pui_ani_opt;
49
50 typedef char* pui_id;
51 typedef char* pui_error_string;
52 typedef struct _pui * pui_h;
53 typedef struct _pui_ani * pui_ani_h;
54 typedef struct _pui_module_data pui_module_data;
55
56 typedef struct _PUI_Event_Animation_Status PUI_Event_Animation_Status;
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 PUI_API int
63 pui_init(void);
64
65 PUI_API int
66 pui_shutdown(void);
67
68 PUI_API pui_h
69 pui_create(Ecore_Wl2_Window *win);
70
71 PUI_API void
72 pui_destroy(pui_h handle);
73
74 PUI_API const pui_error_string
75 pui_error_to_string(pui_error e);
76
77 PUI_API pui_ani_h
78 pui_ani_create(pui_h handle, pui_id id);
79
80 PUI_API pui_error
81 pui_ani_control(pui_ani_h handle, pui_ani_cmd cmd, pui_ani_opt opt);
82
83 PUI_API void
84 pui_ani_destroy(pui_ani_h handle);
85
86 PUI_API pui_id
87 pui_ani_get_id(pui_ani_h handle);
88
89 PUI_API pui_ani_cmd
90 pui_ani_get_cmd(pui_ani_h handle);
91
92 PUI_API pui_ani_opt
93 pui_ani_get_opt(pui_ani_h handle);
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif//_LIBPUI_H_