2012-12-05 13:15:42 -08:00
|
|
|
#ifndef _ECORE_EVAS_WAYLAND_PRIVATE_H_
|
2016-12-02 11:00:04 -08:00
|
|
|
# define _ECORE_EVAS_WAYLAND_PRIVATE_H_
|
2012-12-05 13:15:42 -08:00
|
|
|
|
2016-12-02 11:00:04 -08:00
|
|
|
# ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
# endif
|
2012-12-05 13:15:42 -08:00
|
|
|
|
2016-12-02 11:00:04 -08:00
|
|
|
# define ECORE_EVAS_INTERNAL
|
2016-05-10 21:29:23 -07:00
|
|
|
|
2016-12-02 11:00:04 -08:00
|
|
|
# ifndef ELEMENTARY_H
|
2012-12-05 13:15:42 -08:00
|
|
|
//#define LOGFNS 1
|
2016-12-02 11:00:04 -08:00
|
|
|
# ifdef LOGFNS
|
|
|
|
# include <stdio.h>
|
2020-05-06 06:18:31 -07:00
|
|
|
# define LOGFN \
|
|
|
|
printf("-ECORE_EVAS-WL: %25s: %5i - %s\n", __FILE__, __LINE__, __func__)
|
2016-12-02 11:00:04 -08:00
|
|
|
# else
|
2020-05-06 06:18:31 -07:00
|
|
|
# define LOGFN
|
2016-12-02 11:00:04 -08:00
|
|
|
# endif
|
|
|
|
|
|
|
|
# include <Eina.h>
|
|
|
|
# include <Ecore.h>
|
|
|
|
# include <Ecore_Input.h>
|
|
|
|
# include <Ecore_Input_Evas.h>
|
|
|
|
# include <Ecore_Wl2.h>
|
|
|
|
|
|
|
|
# include <Ecore_Evas.h>
|
|
|
|
# endif
|
|
|
|
|
2019-08-06 05:36:50 -07:00
|
|
|
# include "ecore_wl2_internal.h"
|
2016-12-02 11:00:04 -08:00
|
|
|
# include "ecore_wl2_private.h"
|
|
|
|
# include "ecore_private.h"
|
|
|
|
# include "ecore_evas_private.h"
|
|
|
|
# include "ecore_evas_wayland.h"
|
2012-12-05 13:15:42 -08:00
|
|
|
|
|
|
|
typedef struct _Ecore_Evas_Engine_Wl_Data Ecore_Evas_Engine_Wl_Data;
|
|
|
|
|
2020-02-10 00:20:18 -08:00
|
|
|
typedef struct _Ecore_Evas_Wl_Selection_Data Ecore_Evas_Wl_Selection_Data;
|
|
|
|
|
|
|
|
struct _Ecore_Evas_Wl_Selection_Data
|
|
|
|
{
|
|
|
|
Ecore_Evas_Selection_Callbacks callbacks;
|
|
|
|
Eina_Promise *delivery;
|
|
|
|
Ecore_Wl2_Offer *offer;
|
|
|
|
const char *later_convert;
|
|
|
|
uint32_t sent_serial; //The serial of the last sent selection op
|
|
|
|
};
|
|
|
|
|
2017-06-05 11:06:36 -07:00
|
|
|
struct _Ecore_Evas_Engine_Wl_Data
|
2013-02-05 04:48:25 -08:00
|
|
|
{
|
2015-09-28 10:42:38 -07:00
|
|
|
Ecore_Wl2_Display *display;
|
2016-05-05 07:45:59 -07:00
|
|
|
Eina_List *regen_objs;
|
2015-09-28 10:42:38 -07:00
|
|
|
Ecore_Wl2_Window *parent, *win;
|
2020-02-10 00:20:18 -08:00
|
|
|
Ecore_Event_Handler *sync_handler, *changed_handler, *end_handler, *send_handler, *offer_handler, *dnd_leave_handler, *dnd_motion_handler, *dnd_enter_handler, *dnd_drop_handler, *dnd_end_handler;
|
2013-05-08 15:18:55 -07:00
|
|
|
int fx, fy, fw, fh;
|
2017-08-18 12:13:11 -07:00
|
|
|
Ecore_Wl2_Frame_Cb_Handle *frame;
|
2016-03-24 10:44:21 -07:00
|
|
|
int x_rel;
|
|
|
|
int y_rel;
|
|
|
|
uint32_t timestamp;
|
2016-10-03 08:34:10 -07:00
|
|
|
Eina_List *devices_list;
|
2017-08-04 13:17:53 -07:00
|
|
|
int cw, ch;
|
2020-02-10 00:20:18 -08:00
|
|
|
Ecore_Evas_Wl_Selection_Data selection_data[ECORE_EVAS_SELECTION_BUFFER_LAST];
|
|
|
|
Ecore_Wl2_Offer *external_offer;
|
2017-06-09 08:06:05 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
Eina_Bool supported : 1;
|
|
|
|
Eina_Bool prepare : 1;
|
|
|
|
Eina_Bool request : 1;
|
|
|
|
Eina_Bool done : 1;
|
|
|
|
Eina_Bool configure_coming : 1;
|
|
|
|
Ecore_Job *manual_mode_job;
|
|
|
|
} wm_rot;
|
|
|
|
|
2017-08-04 13:17:53 -07:00
|
|
|
Eina_Bool resizing : 1;
|
2016-03-24 10:44:21 -07:00
|
|
|
Eina_Bool dragging : 1;
|
2015-12-11 08:26:24 -08:00
|
|
|
Eina_Bool sync_done : 1;
|
|
|
|
Eina_Bool defer_show : 1;
|
2016-05-05 07:45:59 -07:00
|
|
|
Eina_Bool reset_pending : 1;
|
2017-05-17 13:02:53 -07:00
|
|
|
Eina_Bool activated : 1;
|
2017-08-18 12:13:11 -07:00
|
|
|
Eina_Bool ticking : 1;
|
2012-12-05 13:15:42 -08:00
|
|
|
};
|
|
|
|
|
2017-06-05 11:06:36 -07:00
|
|
|
/**
|
|
|
|
* @brief Create an Ecore_Evas window using a Wayland-based engine.
|
|
|
|
*
|
|
|
|
* @param disp_name Name of the Wayland display to connect to.
|
|
|
|
* @param parent ID of the parent window this Ecore_Evas window belongs
|
|
|
|
* to, or 0 if this is a top-level window.
|
|
|
|
* @param x Horizontal position of the Ecore_Evas window.
|
|
|
|
* @param y Vertical position of the Ecore_Evas window.
|
|
|
|
* @param w Width of the Ecore_Evas window to be created.
|
|
|
|
* @param h Height of the Ecore_Evas window to be created.
|
|
|
|
* @param frame Deprecated. (Just pass EINA_FALSE.)
|
2019-04-25 00:56:40 -07:00
|
|
|
* @param opt engine option list
|
2017-06-05 11:06:36 -07:00
|
|
|
* @param engine_name Wayland engine to use for rendering.
|
|
|
|
* @return Ecore_Evas instance or @c NULL if creation failed.
|
|
|
|
*
|
|
|
|
* Like Evas' other window creation routines, this constructs an
|
|
|
|
* Ecore_Evas window object using an engine name and various common
|
|
|
|
* parameters. However, this connects to the display using a Wayland
|
|
|
|
* protocol for client-server communication rather than the X11
|
|
|
|
* protocol.
|
|
|
|
*
|
|
|
|
* Also, Wayland uses a direct rendering model that permits clients to
|
|
|
|
* do their own rendering and share it using one of a range of buffer
|
|
|
|
* sharing alternatives. The caller of this routine must specify which
|
|
|
|
* @p engine_name to use (e.g. @c "wayland_egl" or @c "wayland_shm").
|
|
|
|
*
|
|
|
|
* @see ecore_evas_new()
|
|
|
|
* @see ecore_evas_wayland_shm_new()
|
|
|
|
* @see ecore_evas_wayland_egl_new()
|
|
|
|
*/
|
2019-04-25 00:56:40 -07:00
|
|
|
Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt, const char *engine_name);
|
2016-11-02 11:13:07 -07:00
|
|
|
|
2012-12-05 13:15:42 -08:00
|
|
|
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
|