ecore-wl2: Add ecore_wl2_display file to build order
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
7d855cff30
commit
8c8334ad2d
|
@ -8,6 +8,7 @@ installed_ecorewl2mainheadersdir = $(includedir)/ecore-wl2-@VMAJ@
|
|||
dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h
|
||||
|
||||
lib_ecore_wl2_libecore_wl2_la_SOURCES = \
|
||||
lib/ecore_wl2/ecore_wl2_display.c \
|
||||
lib/ecore_wl2/ecore_wl2.c \
|
||||
lib/ecore_wl2/ecore_wl2_private.h
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
# include <wayland-cursor.h>
|
||||
# include <xkbcommon/xkbcommon.h>
|
||||
|
||||
# define WL_HIDE_DEPRECATED
|
||||
# include <wayland-server.h>
|
||||
|
||||
# ifdef EAPI
|
||||
# undef EAPI
|
||||
# endif
|
||||
|
@ -74,6 +77,42 @@ EAPI int ecore_wl2_init(void);
|
|||
*/
|
||||
EAPI int ecore_wl2_shutdown(void);
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*
|
||||
* @return The newly created wl_display
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Display_Group
|
||||
*/
|
||||
EAPI struct wl_display *ecore_wl2_display_create(void);
|
||||
|
||||
/**
|
||||
* Connect to an existing Wayland display
|
||||
*
|
||||
* @brief This function is typically used by clients to connect to an
|
||||
* existing wl_display.
|
||||
*
|
||||
* @param name The display target name to connect to. If @c NULL, the default
|
||||
* display is assumed.
|
||||
*
|
||||
* @return The wl_display which was connected to
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Display_Group
|
||||
*/
|
||||
EAPI struct wl_display *ecore_wl2_display_connect(const char *name);
|
||||
|
||||
/* # ifdef __cplusplus */
|
||||
/* } */
|
||||
/* # endif */
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "ecore_wl2_private.h"
|
||||
|
||||
EAPI struct wl_display *
|
||||
ecore_wl2_display_create(void)
|
||||
{
|
||||
return wl_display_create();
|
||||
}
|
||||
|
||||
EAPI struct wl_display *
|
||||
ecore_wl2_display_connect(const char *name)
|
||||
{
|
||||
struct wl_display *disp;
|
||||
|
||||
/* try to connect to wayland display with this name */
|
||||
disp = wl_display_connect(name);
|
||||
if (!disp)
|
||||
{
|
||||
ERR("Could not connect to display %s: %m", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return disp;
|
||||
}
|
Loading…
Reference in New Issue