diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index 7736c8664b..f1201b4fd7 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -9,6 +9,7 @@ set(SERVER_LIB_SRCS ) add_library(KF5WaylandServer ${SERVER_LIB_SRCS}) +generate_export_header(KF5WaylandServer BASE_NAME KWaylandServer) add_library(KF5::WaylandServer ALIAS KF5WaylandServer) target_link_libraries(KF5WaylandServer diff --git a/src/wayland/autotests/client/CMakeLists.txt b/src/wayland/autotests/client/CMakeLists.txt index 5acc7abbf6..7a5cce242e 100644 --- a/src/wayland/autotests/client/CMakeLists.txt +++ b/src/wayland/autotests/client/CMakeLists.txt @@ -5,17 +5,9 @@ set_source_files_properties(${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client ######################################################## set( testWaylandConnectionThread_SRCS test_wayland_connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandConnectionThread ${testWaylandConnectionThread_SRCS}) -target_link_libraries( testWaylandConnectionThread Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandConnectionThread Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandConnectionThread testWaylandConnectionThread) ecm_mark_as_test(testWaylandConnectionThread) @@ -24,20 +16,9 @@ ecm_mark_as_test(testWaylandConnectionThread) ######################################################## set( testWaylandRegistry_SRCS test_wayland_registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandRegistry ${testWaylandRegistry_SRCS}) -add_dependencies(testWaylandRegistry wayland-client-fullscreen-shell) -target_link_libraries( testWaylandRegistry Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandRegistry Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandRegistry testWaylandRegistry) ecm_mark_as_test(testWaylandRegistry) @@ -47,14 +28,9 @@ ecm_mark_as_test(testWaylandRegistry) if(Wayland_VERSION VERSION_GREATER "1.4.0") set( testWaylandFullscreenShell_SRCS test_wayland_fullscreen_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/fullscreen_shell.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c ) add_executable(testWaylandFullscreenShell ${testWaylandFullscreenShell_SRCS}) - add_dependencies(testWaylandFullscreenShell wayland-client-fullscreen-shell) - target_link_libraries( testWaylandFullscreenShell Qt5::Test Wayland::Client) + target_link_libraries( testWaylandFullscreenShell Qt5::Test KF5::WaylandClient Wayland::Client) add_test(kwin-testWaylandFullscreenShell testWaylandFullscreenShell) ecm_mark_as_test(testWaylandFullscreenShell) endif() @@ -64,22 +40,9 @@ endif() ######################################################## set( testWaylandOutput_SRCS test_wayland_output.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/fullscreen_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/output.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandOutput ${testWaylandOutput_SRCS}) -add_dependencies(testWaylandOutput wayland-client-fullscreen-shell) -target_link_libraries( testWaylandOutput Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandOutput Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandOutput testWaylandOutput) ecm_mark_as_test(testWaylandOutput) @@ -88,24 +51,9 @@ ecm_mark_as_test(testWaylandOutput) ######################################################## set( testWaylandShell_SRCS test_wayland_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/compositor.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/fullscreen_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/surface.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandShell ${testWaylandShell_SRCS}) -add_dependencies(testWaylandShell wayland-client-fullscreen-shell) -target_link_libraries( testWaylandShell Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandShell Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandShell testWaylandShell) ecm_mark_as_test(testWaylandShell) @@ -114,25 +62,9 @@ ecm_mark_as_test(testWaylandShell) ######################################################## set( testWaylandSurface_SRCS test_wayland_surface.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/buffer.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/compositor.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/fullscreen_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/shm_pool.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/surface.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandSurface ${testWaylandSurface_SRCS}) -add_dependencies(testWaylandSurface wayland-client-fullscreen-shell) -target_link_libraries( testWaylandSurface Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandSurface Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandSurface testWaylandSurface) ecm_mark_as_test(testWaylandSurface) @@ -141,27 +73,8 @@ ecm_mark_as_test(testWaylandSurface) ######################################################## set( testWaylandSeat_SRCS test_wayland_seat.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/buffer.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/compositor.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/connection_thread.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/registry.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/fullscreen_shell.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/keyboard.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/pointer.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/seat.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/shm_pool.cpp - ${KWAYLAND_SOURCE_DIR}/src/client/surface.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandSeat ${testWaylandSeat_SRCS}) -add_dependencies(testWaylandSeat wayland-client-fullscreen-shell) -target_link_libraries( testWaylandSeat Qt5::Test Qt5::Gui Wayland::Client Wayland::Server) +target_link_libraries( testWaylandSeat Qt5::Test Qt5::Gui KF5::WaylandClient KF5::WaylandServer Wayland::Client Wayland::Server) add_test(kwin-testWaylandSeat testWaylandSeat) ecm_mark_as_test(testWaylandSeat) diff --git a/src/wayland/autotests/server/CMakeLists.txt b/src/wayland/autotests/server/CMakeLists.txt index 0ad3316d1d..400fc4ab42 100644 --- a/src/wayland/autotests/server/CMakeLists.txt +++ b/src/wayland/autotests/server/CMakeLists.txt @@ -3,16 +3,9 @@ ######################################################## set( testWaylandServerDisplay_SRCS test_display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandServerDisplay ${testWaylandServerDisplay_SRCS}) -target_link_libraries( testWaylandServerDisplay Qt5::Test Qt5::Gui Wayland::Server) +target_link_libraries( testWaylandServerDisplay Qt5::Test Qt5::Gui KF5::WaylandServer Wayland::Server) add_test(kwin-testWaylandServerDisplay testWaylandServerDisplay) ecm_mark_as_test(testWaylandServerDisplay) @@ -21,15 +14,8 @@ ecm_mark_as_test(testWaylandServerDisplay) ######################################################## set( testWaylandServerSeat_SRCS test_seat.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/buffer_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/compositor_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/display.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/output_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/seat_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/shell_interface.cpp - ${KWAYLAND_SOURCE_DIR}/src/server/surface_interface.cpp ) add_executable(testWaylandServerSeat ${testWaylandServerSeat_SRCS}) -target_link_libraries( testWaylandServerSeat Qt5::Test Qt5::Gui Wayland::Server) +target_link_libraries( testWaylandServerSeat Qt5::Test Qt5::Gui KF5::WaylandServer Wayland::Server) add_test(kwin-testWaylandServerSeat testWaylandServerSeat) ecm_mark_as_test(testWaylandServerSeat) diff --git a/src/wayland/compositor_interface.h b/src/wayland/compositor_interface.h index 476883c12e..7fba196025 100644 --- a/src/wayland/compositor_interface.h +++ b/src/wayland/compositor_interface.h @@ -26,6 +26,8 @@ along with this program. If not, see . #include +#include + namespace KWin { namespace WaylandServer @@ -34,7 +36,7 @@ namespace WaylandServer class Display; class SurfaceInterface; -class CompositorInterface : public QObject +class KWAYLANDSERVER_EXPORT CompositorInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/display.h b/src/wayland/display.h index 28ac0bcbea..c727c2f779 100644 --- a/src/wayland/display.h +++ b/src/wayland/display.h @@ -23,6 +23,8 @@ along with this program. If not, see . #include #include +#include + struct wl_display; struct wl_event_loop; @@ -36,7 +38,7 @@ class OutputInterface; class SeatInterface; class ShellInterface; -class Display : public QObject +class KWAYLANDSERVER_EXPORT Display : public QObject { Q_OBJECT Q_PROPERTY(QString socketName READ socketName WRITE setSocketName NOTIFY socketNameChanged) diff --git a/src/wayland/output_interface.h b/src/wayland/output_interface.h index b13410de51..a7949bb378 100644 --- a/src/wayland/output_interface.h +++ b/src/wayland/output_interface.h @@ -24,6 +24,8 @@ along with this program. If not, see . #include #include +#include + struct wl_global; struct wl_client; struct wl_resource; @@ -35,7 +37,7 @@ namespace WaylandServer class Display; -class OutputInterface : public QObject +class KWAYLANDSERVER_EXPORT OutputInterface : public QObject { Q_OBJECT Q_PROPERTY(QSize physicalSize READ physicalSize WRITE setPhysicalSize NOTIFY physicalSizeChanged) diff --git a/src/wayland/seat_interface.h b/src/wayland/seat_interface.h index 256163336a..9f9224c031 100644 --- a/src/wayland/seat_interface.h +++ b/src/wayland/seat_interface.h @@ -26,6 +26,8 @@ along with this program. If not, see . #include +#include + namespace KWin { namespace WaylandServer @@ -36,7 +38,7 @@ class KeyboardInterface; class PointerInterface; class SurfaceInterface; -class SeatInterface : public QObject +class KWAYLANDSERVER_EXPORT SeatInterface : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) @@ -111,7 +113,7 @@ private: static const struct wl_seat_interface s_interface; }; -class PointerInterface : public QObject +class KWAYLANDSERVER_EXPORT PointerInterface : public QObject { Q_OBJECT Q_PROPERTY(QPoint globalPos READ globalPos WRITE setGlobalPos NOTIFY globalPosChanged) @@ -188,7 +190,7 @@ private: static const struct wl_pointer_interface s_interface; }; -class KeyboardInterface : public QObject +class KWAYLANDSERVER_EXPORT KeyboardInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/server/buffer_interface.h b/src/wayland/server/buffer_interface.h index 41531c4c93..9062e2804f 100644 --- a/src/wayland/server/buffer_interface.h +++ b/src/wayland/server/buffer_interface.h @@ -23,6 +23,8 @@ along with this program. If not, see . #include #include +#include + struct wl_resource; struct wl_shm_buffer; @@ -33,7 +35,7 @@ namespace WaylandServer class SurfaceInterface; -class BufferInterface : public QObject +class KWAYLANDSERVER_EXPORT BufferInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/server/shell_interface.h b/src/wayland/server/shell_interface.h index 82b6221332..bf64867e91 100644 --- a/src/wayland/server/shell_interface.h +++ b/src/wayland/server/shell_interface.h @@ -24,6 +24,8 @@ along with this program. If not, see . #include +#include + class QSize; class QTimer; struct wl_global; @@ -37,7 +39,7 @@ class Display; class SurfaceInterface; class ShellSurfaceInterface; -class ShellInterface : public QObject +class KWAYLANDSERVER_EXPORT ShellInterface : public QObject { Q_OBJECT public: @@ -70,7 +72,7 @@ private: QList m_surfaces; }; -class ShellSurfaceInterface : public QObject +class KWAYLANDSERVER_EXPORT ShellSurfaceInterface : public QObject { Q_OBJECT Q_PROPERTY(QString title READ title NOTIFY titleChanged) diff --git a/src/wayland/surface_interface.h b/src/wayland/surface_interface.h index 75e5cdc82c..c422c8f624 100644 --- a/src/wayland/surface_interface.h +++ b/src/wayland/surface_interface.h @@ -27,6 +27,8 @@ along with this program. If not, see . #include +#include + namespace KWin { namespace WaylandServer @@ -34,7 +36,7 @@ namespace WaylandServer class BufferInterface; class CompositorInterface; -class SurfaceInterface : public QObject +class KWAYLANDSERVER_EXPORT SurfaceInterface : public QObject { Q_OBJECT Q_PROPERTY(QRegion damage READ damage NOTIFY damaged)