Renamed ecore-wl-types to wl-types 77/55077/5
authorNick Holland <nick.holland@partner.samsung.com>
Tue, 22 Dec 2015 10:03:51 +0000 (10:03 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Tue, 22 Dec 2015 10:36:29 +0000 (10:36 +0000)
The wl-types header is not related to ecore
and will be shared between wayland / ecore-wayland adaptors.

Also conditionally excludes wayland client extensions
on Tizen common platform.

Change-Id: Iee31f398a3fdffeca1f05f5031b775e16fa58183

adaptors/ecore/wayland/display-connection-impl.h
adaptors/ecore/wayland/pixmap-render-surface-ecore-wl.cpp
adaptors/ecore/wayland/render-surface-ecore-wl.cpp
adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp
adaptors/integration-api/file.list
adaptors/integration-api/wayland/ecore-wl-types.h [deleted file]
adaptors/integration-api/wayland/wl-types.h [new file with mode: 0644]
build/tizen/configure.ac
packaging/dali-adaptor.spec

index 49ba200..b9134d1 100644 (file)
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <wayland-egl.h>
 #include <Ecore_Wayland.h>
-#include <ecore-wl-types.h>
+#include <wl-types.h>
 
 // INTERNAL INCLUDES
 #include <base/display-connection.h>
index cc76c24..9e66c5c 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <ecore-wl-types.h>
+#include <wl-types.h>
 #include <trigger-event.h>
 #include <gl/egl-implementation.h>
 #include <base/display-connection.h>
index 31cdc33..dbb495a 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <ecore-wl-types.h>
+#include <wl-types.h>
 #include <trigger-event.h>
 #include <gl/egl-implementation.h>
 
index d14dacc..532c47f 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <ecore-wl-types.h>
+#include <wl-types.h>
 #include <trigger-event.h>
 #include <gl/egl-implementation.h>
 #include <base/display-connection.h>
index c245a1d..45fcc77 100644 (file)
@@ -8,7 +8,7 @@ adaptor_integration_api_header_files = \
   $(adaptor_integration_api_dir)/pixmap-render-surface-factory.h
 
 adaptor_integration_wayland_api_header_files = \
-  $(adaptor_integration_api_dir)/wayland/ecore-wl-types.h \
+  $(adaptor_integration_api_dir)/wayland/wl-types.h \
   $(adaptor_integration_api_dir)/wayland/ecore-wl-render-surface.h \
   $(adaptor_integration_api_dir)/wayland/pixmap-render-surface.h
 
diff --git a/adaptors/integration-api/wayland/ecore-wl-types.h b/adaptors/integration-api/wayland/ecore-wl-types.h
deleted file mode 100644 (file)
index 97869fb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef __DALI_WL_TYPES_H__
-#define __DALI_WL_TYPES_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <wayland-client.h>
-
-namespace Dali
-{
-
-typedef ::wl_display WlDisplay;
-typedef ::wl_surface WlSurface;
-
-} // namespace Dali
-
-#endif /* __DALI_WL_TYPES_H__ */
diff --git a/adaptors/integration-api/wayland/wl-types.h b/adaptors/integration-api/wayland/wl-types.h
new file mode 100644 (file)
index 0000000..18d5b54
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __DALI_WL_TYPES_H__
+#define __DALI_WL_TYPES_H__
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <wayland-client.h> // from wayland-devel package
+
+#ifdef WAYLAND_EXTENSIONS_SUPPORTED
+#include <wayland-extension/xdg-shell-client-protocol.h>   // from wayland
+#endif
+
+namespace Dali
+{
+
+typedef ::wl_display WlDisplay;
+typedef ::wl_surface WlSurface;
+typedef ::wl_array WlArray;
+
+typedef ::wl_shell WlShell;
+typedef ::wl_shell_surface WlShellSurface;
+
+typedef ::wl_registry WlRegistry;
+typedef ::wl_compositor WlCompositor;
+typedef ::wl_seat WlSeat;
+typedef ::wl_pointer WlPointer;
+typedef ::wl_keyboard WlKeyboard;
+typedef ::wl_touch WlTouch;
+
+typedef ::wl_seat_listener WlSeatListener;
+typedef ::wl_pointer_listener WlPointerListener;
+typedef ::wl_touch_listener WlTouchListener;
+typedef ::wl_keyboard_listener WlKeyboardListener;
+
+#ifdef WAYLAND_EXTENSIONS_SUPPORTED
+typedef ::xdg_shell WlXdgShell;
+typedef ::xdg_surface WlXdgShellSurface;
+#else
+typedef void* WlXdgShell;
+typedef void* WlXdgShellSurface;
+
+
+#endif
+
+} // namespace Dali
+
+#endif /* __DALI_WL_TYPES_H__ */
index 031c518..a5715bc 100644 (file)
@@ -182,6 +182,7 @@ AC_ARG_ENABLE(wayland,
 DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
+AM_CONDITIONAL([WAYLAND_EXTENSIONS_SUPPORTED], [test x$enable_profile != xCOMMON])
 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
@@ -235,6 +236,11 @@ if test "x$enable_wayland" = "xyes"; then
 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
                   [DALI_HAS_ECOREWL=yes],
                   [DALI_HAS_ECOREWL=no])
+
+# common profile currently does not have wayland extensions like xdg-shell
+if test "x$enable_profile" != "xCOMMON"; then
+PKG_CHECK_MODULES(WAYLAND_EXTENSION, xdg-shell-client)
+fi
 else
 PKG_CHECK_MODULES(ECORE_X, [ecore-x],
                   [DALI_HAS_ECOREX=yes],
index 38f889f..0217b81 100644 (file)
@@ -74,6 +74,12 @@ BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(ecore-wayland)
 BuildRequires:  pkgconfig(wayland-egl)
 BuildRequires:  pkgconfig(wayland-client)
+BuildRequires:  wayland-devel
+# Currently Tizen Common does not use wayland extensions like xdg-shell
+%if "%{profile}" != "common"
+BuildRequires:  pkgconfig(wayland-extension-client)
+BuildRequires:  wayland-extension-client-devel
+%endif
 %else
 BuildRequires:  pkgconfig(xext)
 BuildRequires:  pkgconfig(xi)