[PATCH] Weston: SDK: export evdev.h

Eoff, Ullysses A ullysses.a.eoff at intel.com
Fri May 31 09:52:20 PDT 2013


> -----Original Message-----
> From: wayland-devel-bounces+ullysses.a.eoff=intel.com at lists.freedesktop.org [mailto:wayland-devel-
> bounces+ullysses.a.eoff=intel.com at lists.freedesktop.org] On Behalf Of Martin Minarik
> Sent: Friday, May 31, 2013 8:36 AM
> To: wayland-devel at lists.freedesktop.org
> Subject: [PATCH] Weston: SDK: export evdev.h
> 
> This allows plugins to emulate a weston evdev device
> 
> To run wl-fits without superuser, apply this patch.
> ---
>  src/Makefile.am |    9 ++++++---
>  src/evdev.c     |    4 ++--
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 106ccba..6146aff 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -11,7 +11,7 @@ AM_CPPFLAGS =					\
>  weston_LDFLAGS = -export-dynamic
>  weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
>  weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
> -	$(DLOPEN_LIBS) -lm ../shared/libshared.la
> +	$(DLOPEN_LIBS) -lm ../shared/libshared.la -lmtdev
> 

What kind of implications will '-lmtdev' have if the weston binary requires it?  Is mtdev
available on all systems/flavors?  I don't know.  Right now, mtdev is only required for
drm, rpi, and fbdev backends and has a minimum version requirement in configure.ac.
Thus, you'd want to do the same check in configure.ac for weston, then use
$(LIBMTDEV_LIBS), or whatever, here.

>  weston_SOURCES =				\
>  	git-version.h				\
> @@ -47,7 +47,9 @@ weston_SOURCES =				\
>  	../shared/matrix.c			\
>  	../shared/matrix.h			\
>  	weston-launch.h				\
> -	weston-egl-ext.h
> +	weston-egl-ext.h                        \
> +	evdev.c                                 \
> +	evdev-touchpad.c
> 
>  if ENABLE_EGL
>  weston_SOURCES +=				\
> @@ -92,7 +94,8 @@ westoninclude_HEADERS =				\
>  	version.h				\
>  	compositor.h				\
>  	../shared/matrix.h			\
> -	../shared/config-parser.h
> +	../shared/config-parser.h               \
> +	evdev.h
> 
>  moduledir = $(libdir)/weston
>  module_LTLIBRARIES =				\
> diff --git a/src/evdev.c b/src/evdev.c
> index 9289b1c..24735f7 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -518,7 +518,7 @@ evdev_configure_device(struct evdev_device *device)
>  	return 0;
>  }
> 
> -struct evdev_device *
> +WL_EXPORT struct evdev_device *
>  evdev_device_create(struct weston_seat *seat, const char *path, int device_fd)
>  {
>  	struct evdev_device *device;
> @@ -587,7 +587,7 @@ err1:
>  	return NULL;
>  }
> 
> -void
> +WL_EXPORT void
>  evdev_device_destroy(struct evdev_device *device)
>  {
>  	struct evdev_dispatch *dispatch;
> --
> 1.7.10.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list