# Enable quiet compiles on automake 1.11.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+# set the window system platform where the bufmgr initializes
+AC_ARG_WITH(eom-platform, AS_HELP_STRING([--with-eom-platform=WINSYS], [eom platform (default: X11)]),
+ [ EOM_PLATFORM="$withval" ],
+ [ EOM_PLATFORM="X11" ])
+AC_SUBST(EOM_PLATFORM)
+
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(DBUS, dbus-1)
PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0)
LIBEOM_CFLAGS="$DBUS_CFLAGS $GLIB_CFLAGS $ELEMENTARY_CFLAGS"
LIBEOM_LIBS="$DBUS_LIBS $GLIB_LIBS $ELEMENTARY_LIBS"
+if test "x$EOM_PLATFORM" = "xX11"; then
+ LIBEOM_CFLAGS="$LIBEOM_CLAGS "
+ LIBEOM_LIBS="$LIBEOM_LIBS "
+fi
+
+if test "x$EOM_PLATFORM" = "xWAYLAND"; then
+ PKG_CHECK_MODULES(WAYLAND_CLIENT, wayland-client)
+ LIBEOM_CFLAGS="$LIBEOM_CFLAGS $WAYLAND_CLIENT_CFLAGS"
+ LIBEOM_LIBS="$LIBEOM_LIBS $WAYLAND_CLIENT_LIBS"
+
+ WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
+ [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
+fi
+
+
+
PKG_CHECK_MODULES(CAPI, [capi-base-common >= 0.1.1], [CAPI_VER="yes"], [CAPI_VER="no"])
if test "x$CAPI_VER" = "xyes"; then
AC_DEFINE(HAVE_CAPI_0_1_1,1,[The version of capi-base-common is over 0.1.1])
AC_SUBST([LIBEOM_CFLAGS])
AC_SUBST([LIBEOM_LIBS])
+if test "x$EOM_PLATFORM" = "xX11"; then
+ AC_DEFINE(HAVE_X11,1,[The window system is X11.])
+else
+ AC_DEFINE(HAVE_WAYLAND,1,[The window system is WAYLAND.])
+fi
+
+AM_CONDITIONAL(HAVE_EOM_PLATFORM_X11, test "x$EOM_PLATFORM" = "xX11")
+AM_CONDITIONAL(HAVE_EOM_PLATFORM_WAYLAND, test "x$EOM_PLATFORM" = "xWAYLAND")
+
# Checks for header files.
AC_HEADER_STDC
* @return 0 on success, otherwise a negative error value
* @retval #EOM_ERROR_NONE Successful
* @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance
* @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM module
* @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure
* @pre eom_init()
* @return 0 on success, otherwise a negative error value
* @retval #EOM_ERROR_NONE Successful
* @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance
* @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM module
* @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure
* @pre eom_init()
+%bcond_with x
+%bcond_with wayland
+
Name: libeom
Summary: External Output Manager Library
Version: 1.0.0
Source0: %{name}-%{version}.tar.gz
Source1001: libeom.manifest
+%if %{with wayland}
+BuildRequires: pkgconfig(wayland-client)
+%else
+%endif
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gio-unix-2.0)
%build
export CFLAGS="-g -O0 -Wall -Werror -Wno-error=deprecated-declarations"
export LDFLAGS="$LDFLAGS -Wl,--hash-style=both -Wl,--as-needed"
-%reconfigure --disable-dlog --disable-static
+%if %{with wayland}
+%reconfigure --disable-dlog --disable-static --with-eom-platform=WAYLAND
+%else
+%reconfigure --disable-dlog --disable-static --with-eom-platform=X11
+%endif
+
make %{?_smp_mflags}
%install
GValue *v = g_value_array_get_nth (array, i);
GType type = v->g_type;
- INFO ("[EOM_CLIENT:%s] type(%d)", client_info.name, type);
+ INFO ("[EOM_CLIENT:%s] type(%d)", client_info.name, (int)type);
switch (type)
{
API int
eom_set_output_attribute (eom_output_id output_id, eom_output_attribute_e attr)
{
+ eom_output_info *output_info = NULL;
bool ret = false;
GValueArray *msg_array;
GValueArray *ret_array;
_eom_mutex_lock ();
+ output_info = _eom_find_output_info (output_id);
+ if (!output_info)
+ {
+ set_last_result (EOM_ERROR_NO_SUCH_DEVICE);
+ _eom_mutex_unlock ();
+ return EOM_ERROR_NO_SUCH_DEVICE;
+ }
+
pid = getpid();
INFO ("output_id: %d, pid: %d, mode: %d\n", output_id, pid, attr);
API int
eom_set_output_window (eom_output_id output_id, Evas_Object *win)
{
+#ifdef HAVE_X11
+ eom_output_info *output_info = NULL;
bool ret = false;
GValueArray *msg_array;
GValueArray *ret_array;
_eom_mutex_lock ();
+ output_info = _eom_find_output_info (output_id);
+ if (!output_info)
+ {
+ set_last_result (EOM_ERROR_NO_SUCH_DEVICE);
+ _eom_mutex_unlock ();
+ return EOM_ERROR_NO_SUCH_DEVICE;
+ }
+
pid = getpid();
xwin = elm_win_xwindow_get (win);
return EOM_ERROR_NONE;
}
-
INFO ("SetWindow: failed\n");
_eom_mutex_unlock ();
-
return EOM_ERROR_MESSAGE_OPERATION_FAILURE;
+#else
+ return EOM_ERROR_NONE;
+#endif
}