2015-08-18 06:50:28 -07:00
|
|
|
#ifndef _ECORE_WL2_H_
|
|
|
|
# define _ECORE_WL2_H_
|
|
|
|
|
|
|
|
# include <Eina.h>
|
|
|
|
# include <Ecore.h>
|
|
|
|
# include <wayland-client.h>
|
|
|
|
# include <wayland-cursor.h>
|
|
|
|
# include <xkbcommon/xkbcommon.h>
|
|
|
|
|
2015-08-18 08:56:07 -07:00
|
|
|
# define WL_HIDE_DEPRECATED
|
|
|
|
# include <wayland-server.h>
|
|
|
|
|
2015-08-18 06:50:28 -07:00
|
|
|
# ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
|
|
|
|
/* # ifdef __cplusplus */
|
|
|
|
/* extern "C" { */
|
|
|
|
/* # endif */
|
|
|
|
|
|
|
|
# ifndef _ECORE_WAYLAND_WINDOW_PREDEF
|
|
|
|
typedef struct _Ecore_Wl_Window Ecore_Wl_Window;
|
|
|
|
# endif
|
|
|
|
|
2015-08-18 10:50:02 -07:00
|
|
|
typedef struct _Ecore_Wl2_Display Ecore_Wl2_Display;
|
|
|
|
|
2015-08-18 12:05:05 -07:00
|
|
|
typedef struct _Ecore_Wl2_Global
|
|
|
|
{
|
2015-08-18 12:11:09 -07:00
|
|
|
Eina_Stringshare *interface;
|
2015-08-18 12:05:05 -07:00
|
|
|
unsigned int id, version;
|
|
|
|
} Ecore_Wl2_Global;
|
|
|
|
|
|
|
|
typedef struct _Ecore_Wl2_Event_Global
|
|
|
|
{
|
|
|
|
Eina_Stringshare *interface;
|
|
|
|
unsigned int id, version;
|
|
|
|
} Ecore_Wl2_Event_Global;
|
|
|
|
|
2015-08-18 07:06:40 -07:00
|
|
|
EAPI extern int ECORE_WL2_EVENT_GLOBAL_ADDED;
|
|
|
|
EAPI extern int ECORE_WL2_EVENT_GLOBAL_REMOVED;
|
|
|
|
|
2015-08-18 07:57:32 -07:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Ecore functions for dealing with the Wayland display protocol
|
|
|
|
*
|
|
|
|
* @defgroup Ecore_Wl2_Group Ecore_Wl2 - Wayland integration
|
|
|
|
* @ingroup Ecore
|
|
|
|
*
|
|
|
|
* Ecore_Wl2 provides a wrapper and convenience functions for using the
|
|
|
|
* Wayland protocol in implementing a window system. Function groups for
|
|
|
|
* this part of the library include the following:
|
|
|
|
*
|
|
|
|
* @li @ref Ecore_Wl2_Init_Group
|
|
|
|
* @li @ref Ecore_Wl2_Display_Group
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Wl2_Init_Group Wayland Library Init and Shutdown Functions
|
|
|
|
* @ingroup Ecore_Wl2_Group
|
|
|
|
*
|
|
|
|
* Functions that start and shutdown the Ecore Wl2 Library.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the Ecore_Wl2 library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without being
|
|
|
|
* shutdown. 0 is returned if an error occurs.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Wl2_Init_Group
|
|
|
|
*/
|
2015-08-18 07:06:40 -07:00
|
|
|
EAPI int ecore_wl2_init(void);
|
2015-08-18 07:57:32 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown the Ecore_Wl2 Library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without
|
|
|
|
* being shutdown.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Wl2_Init_Group
|
|
|
|
*/
|
2015-08-18 07:06:40 -07:00
|
|
|
EAPI int ecore_wl2_shutdown(void);
|
|
|
|
|
2015-08-18 08:56:07 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Wl2_Display_Group Wayland Library Display Functions
|
|
|
|
* @ingroup Ecore_Wl2_Group
|
|
|
|
*
|
|
|
|
* Functions that deal with creating, connecting, or interacting with
|
|
|
|
* Wayland displays
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new Wayland display
|
|
|
|
*
|
|
|
|
* @brief This function is typically used to create a new display for
|
|
|
|
* use with compositors, or to create a new display for use in nested
|
|
|
|
* compositors.
|
|
|
|
*
|
2015-08-18 12:55:24 -07:00
|
|
|
* @param name The display target name to create. If @c NULL, a default
|
|
|
|
* display name will be assigned.
|
2015-08-18 10:50:02 -07:00
|
|
|
* @return The newly created Ecore_Wl2_Display
|
2015-08-18 08:56:07 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Wl2_Display_Group
|
|
|
|
*/
|
2015-08-18 12:55:24 -07:00
|
|
|
EAPI Ecore_Wl2_Display *ecore_wl2_display_create(const char *name);
|
2015-08-18 08:56:07 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Connect to an existing Wayland display
|
|
|
|
*
|
|
|
|
* @brief This function is typically used by clients to connect to an
|
2015-08-18 10:50:02 -07:00
|
|
|
* existing Wayland display.
|
2015-08-18 08:56:07 -07:00
|
|
|
*
|
|
|
|
* @param name The display target name to connect to. If @c NULL, the default
|
|
|
|
* display is assumed.
|
|
|
|
*
|
2015-08-18 10:50:02 -07:00
|
|
|
* @return The Ecore_Wl2_Display which was connected to
|
2015-08-18 08:56:07 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Wl2_Display_Group
|
|
|
|
*/
|
2015-08-18 10:50:02 -07:00
|
|
|
EAPI Ecore_Wl2_Display *ecore_wl2_display_connect(const char *name);
|
2015-08-18 08:56:07 -07:00
|
|
|
|
2015-08-18 06:50:28 -07:00
|
|
|
/* # ifdef __cplusplus */
|
|
|
|
/* } */
|
|
|
|
/* # endif */
|
|
|
|
|
|
|
|
# undef EAPI
|
|
|
|
# define EAPI
|
|
|
|
|
|
|
|
#endif
|