2011-12-26 15:27:20 -08:00
|
|
|
#ifndef _ECORE_WAYLAND_PRIVATE_H
|
|
|
|
# define _ECORE_WAYLAND_PRIVATE_H
|
|
|
|
|
|
|
|
# include <limits.h>
|
2012-06-06 01:18:58 -07:00
|
|
|
# include <unistd.h>
|
2011-12-26 15:27:20 -08:00
|
|
|
|
2012-04-24 09:59:35 -07:00
|
|
|
# include "Ecore.h"
|
|
|
|
# include "Ecore_Input.h"
|
2012-02-28 13:55:51 -08:00
|
|
|
# include "Ecore_Wayland.h"
|
|
|
|
|
2012-05-17 06:55:14 -07:00
|
|
|
//# define LOGFNS 1
|
2011-12-26 15:27:20 -08:00
|
|
|
|
|
|
|
# ifdef LOGFNS
|
|
|
|
# include <stdio.h>
|
|
|
|
# define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn);
|
|
|
|
# else
|
|
|
|
# define LOGFN(fl, ln, fn)
|
|
|
|
# endif
|
|
|
|
|
|
|
|
extern int _ecore_wl_log_dom;
|
2012-02-28 13:55:51 -08:00
|
|
|
extern Ecore_Wl_Display *_ecore_wl_disp;
|
2011-12-26 15:27:20 -08:00
|
|
|
|
|
|
|
# ifdef ECORE_WL_DEFAULT_LOG_COLOR
|
|
|
|
# undef ECORE_WL_DEFAULT_LOG_COLOR
|
|
|
|
# endif
|
|
|
|
# define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
|
|
|
|
|
|
|
|
# ifdef ERR
|
|
|
|
# undef ERR
|
|
|
|
# endif
|
|
|
|
# define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef DBG
|
|
|
|
# undef DBG
|
|
|
|
# endif
|
|
|
|
# define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef INF
|
|
|
|
# undef INF
|
|
|
|
# endif
|
|
|
|
# define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef WRN
|
|
|
|
# undef WRN
|
|
|
|
# endif
|
|
|
|
# define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef CRIT
|
|
|
|
# undef CRIT
|
|
|
|
# endif
|
|
|
|
# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__)
|
|
|
|
|
2013-10-31 13:02:04 -07:00
|
|
|
|
|
|
|
struct _Ecore_Wl_Display
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wl_display *display;
|
|
|
|
struct wl_registry *registry;
|
|
|
|
struct wl_compositor *compositor;
|
|
|
|
struct wl_subcompositor *subcompositor;
|
|
|
|
struct wl_shell *shell;
|
|
|
|
struct wl_shell *desktop_shell;
|
|
|
|
struct wl_shm *shm;
|
|
|
|
struct wl_data_device_manager *data_device_manager;
|
|
|
|
} wl;
|
|
|
|
|
|
|
|
int fd;
|
|
|
|
unsigned int mask;
|
|
|
|
unsigned int serial;
|
|
|
|
int sync_ref_count;
|
|
|
|
Ecore_Fd_Handler *fd_hdl;
|
|
|
|
Ecore_Idle_Enterer *idle_enterer;
|
|
|
|
|
|
|
|
struct wl_list inputs;
|
|
|
|
struct wl_list outputs;
|
|
|
|
struct wl_list globals; /** @since 1.7.6 */
|
|
|
|
|
|
|
|
Eina_Bool init_done;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct xkb_context *context;
|
|
|
|
} xkb;
|
|
|
|
|
|
|
|
struct wl_cursor_theme *cursor_theme;
|
|
|
|
|
|
|
|
Ecore_Wl_Output *output;
|
|
|
|
Ecore_Wl_Input *input;
|
|
|
|
|
|
|
|
void (*output_configure)(Ecore_Wl_Output *output, void *data);
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2012-08-28 23:35:02 -07:00
|
|
|
struct _Ecore_Wl_Dnd
|
|
|
|
{
|
|
|
|
Ecore_Wl_Display *ewd;
|
|
|
|
Ecore_Wl_Input *input;
|
|
|
|
};
|
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
struct _Ecore_Wl_Dnd_Source
|
2012-01-12 22:18:04 -08:00
|
|
|
{
|
2012-02-28 13:55:51 -08:00
|
|
|
Ecore_Wl_Input *input;
|
2013-05-28 03:41:46 -07:00
|
|
|
|
|
|
|
struct wl_data_offer *data_offer;
|
2012-02-28 13:55:51 -08:00
|
|
|
struct wl_array types;
|
2013-05-28 03:41:46 -07:00
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
int refcount;
|
|
|
|
int fd;
|
|
|
|
int x, y;
|
|
|
|
};
|
2012-01-12 22:18:04 -08:00
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
struct _Ecore_Wl_Dnd_Target
|
2012-01-12 22:18:04 -08:00
|
|
|
{
|
2012-02-28 13:55:51 -08:00
|
|
|
Ecore_Wl_Dnd_Source *source;
|
|
|
|
};
|
2012-01-13 01:33:33 -08:00
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
void _ecore_wl_window_init(void);
|
|
|
|
void _ecore_wl_window_shutdown(void);
|
2013-06-07 07:33:22 -07:00
|
|
|
Eina_Hash *_ecore_wl_window_hash_get(void);
|
2012-01-12 22:18:04 -08:00
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id);
|
|
|
|
void _ecore_wl_output_del(Ecore_Wl_Output *output);
|
2012-01-13 01:33:33 -08:00
|
|
|
|
2012-02-28 13:55:51 -08:00
|
|
|
void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
|
|
|
|
void _ecore_wl_input_del(Ecore_Wl_Input *input);
|
2012-03-05 08:50:20 -08:00
|
|
|
void _ecore_wl_input_pointer_xy_get(int *x, int *y);
|
2012-01-13 01:33:33 -08:00
|
|
|
|
2012-07-04 00:16:29 -07:00
|
|
|
void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, struct wl_data_offer *offer);
|
2012-11-28 22:43:44 -08:00
|
|
|
void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer);
|
|
|
|
void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device);
|
|
|
|
void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y);
|
|
|
|
void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device);
|
|
|
|
void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer);
|
2012-02-28 13:55:51 -08:00
|
|
|
void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source);
|
2012-01-13 01:33:33 -08:00
|
|
|
|
2013-04-10 10:45:12 -07:00
|
|
|
void _ecore_wl_events_init(void);
|
|
|
|
void _ecore_wl_events_shutdown(void);
|
|
|
|
|
2013-10-11 01:41:22 -07:00
|
|
|
void _ecore_wl_subsurfs_del_all(Ecore_Wl_Window *win);
|
|
|
|
|
2013-10-29 14:32:00 -07:00
|
|
|
struct wl_compositor *_ecore_wl_compositor_get(void);
|
|
|
|
struct wl_subcompositor *_ecore_wl_subcompositor_get(void);
|
2013-10-29 13:40:33 -07:00
|
|
|
|
2011-12-26 15:27:20 -08:00
|
|
|
#endif
|