2013-04-24 07:16:19 -07:00
|
|
|
#ifdef E_TYPEDEFS
|
|
|
|
|
|
|
|
typedef struct _E_Compositor E_Compositor;
|
|
|
|
|
|
|
|
#else
|
|
|
|
# ifndef E_COMP_H
|
|
|
|
# define E_COMP_H
|
|
|
|
|
2013-05-03 02:49:30 -07:00
|
|
|
# define container_of(ptr, type, mbr) \
|
|
|
|
({ \
|
|
|
|
const __typeof__(((type *)0)->mbr) *__mptr = (ptr); \
|
|
|
|
(type *)((char *)__mptr - offsetof(type, mbr)); \
|
|
|
|
})
|
|
|
|
|
2013-04-24 07:16:19 -07:00
|
|
|
struct _E_Compositor
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wl_display *display;
|
|
|
|
struct wl_event_loop *loop;
|
2013-04-25 04:04:08 -07:00
|
|
|
struct wl_event_loop *input_loop;
|
2013-05-07 04:28:23 -07:00
|
|
|
struct wl_event_source *input_loop_source;
|
2013-04-24 07:16:19 -07:00
|
|
|
} wl;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wl_signal destroy;
|
|
|
|
struct wl_signal activate;
|
|
|
|
struct wl_signal kill;
|
|
|
|
struct wl_signal seat;
|
|
|
|
} signals;
|
|
|
|
|
|
|
|
#ifdef HAVE_WAYLAND_EGL
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
EGLDisplay display;
|
|
|
|
EGLContext context;
|
|
|
|
EGLConfig config;
|
|
|
|
} egl;
|
|
|
|
#endif
|
|
|
|
|
2013-05-03 04:32:15 -07:00
|
|
|
E_Shell_Interface shell_interface;
|
|
|
|
|
2013-04-25 04:04:08 -07:00
|
|
|
E_Plane plane; // primary plane
|
|
|
|
|
2013-04-24 07:16:19 -07:00
|
|
|
Ecore_Fd_Handler *fd_hdlr;
|
|
|
|
Ecore_Idler *idler;
|
|
|
|
|
2013-05-02 01:09:48 -07:00
|
|
|
unsigned int output_pool;
|
|
|
|
|
2013-04-25 04:04:08 -07:00
|
|
|
Eina_List *planes;
|
2013-04-24 07:16:19 -07:00
|
|
|
Eina_List *outputs;
|
|
|
|
Eina_List *inputs;
|
|
|
|
Eina_List *surfaces;
|
|
|
|
|
2013-05-06 05:26:17 -07:00
|
|
|
void (*attach) (E_Surface *es, struct wl_buffer *buffer);
|
2013-04-24 07:16:19 -07:00
|
|
|
void (*cb_ping) (void *surface, unsigned int serial);
|
|
|
|
};
|
|
|
|
|
|
|
|
EINTERN int e_comp_init(void);
|
|
|
|
EINTERN int e_comp_shutdown(void);
|
|
|
|
|
2013-05-03 02:00:05 -07:00
|
|
|
EAPI Eina_Bool e_compositor_init(E_Compositor *comp, void *display);
|
2013-04-24 23:43:28 -07:00
|
|
|
EAPI Eina_Bool e_compositor_shutdown(E_Compositor *comp);
|
2013-05-02 22:54:43 -07:00
|
|
|
EAPI E_Compositor *e_compositor_get(void);
|
2013-04-25 04:04:08 -07:00
|
|
|
EAPI void e_compositor_plane_stack(E_Compositor *comp, E_Plane *plane, E_Plane *above);
|
2013-05-07 04:28:23 -07:00
|
|
|
EAPI int e_compositor_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data);
|
2013-05-07 05:30:33 -07:00
|
|
|
EAPI void e_compositor_damage_calculate(E_Compositor *comp);
|
|
|
|
EAPI void e_compositor_damage_flush(E_Compositor *comp, E_Surface *es);
|
2013-04-24 23:43:28 -07:00
|
|
|
|
2013-04-24 07:16:19 -07:00
|
|
|
# endif
|
|
|
|
#endif
|