diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a917f9..c0da816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ find_package(Qt6 REQUIRED COMPONENTS ${QT_FPDEPS}) qt_standard_project_setup(REQUIRES 6.6) add_subdirectory(src/core) +add_subdirectory(src/io) if (WAYLAND) add_subdirectory(src/wayland) diff --git a/docs b/docs index 5aaacb9..7957922 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5aaacb9a1eea9086d6da9e21eed6e30456c6c5d6 +Subproject commit 79579222a31dc1f6355e0c3020917c29165f766c diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 3442405..a41f52c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -15,17 +15,8 @@ qt_add_executable(quickshell windowinterface.cpp floatingwindow.cpp panelinterface.cpp - datastream.cpp ) qt_add_qml_module(quickshell URI Quickshell) -if (SOCKETS) - target_sources(quickshell PRIVATE socket.cpp) -endif() - target_link_libraries(quickshell PRIVATE ${QT_DEPS}) - -if (TESTS) - add_subdirectory(test) -endif() diff --git a/src/core/module.md b/src/core/module.md index b94d491..70b2c8c 100644 --- a/src/core/module.md +++ b/src/core/module.md @@ -12,7 +12,5 @@ headers = [ "windowinterface.hpp", "panelinterface.hpp", "floatingwindow.hpp", - "datastream.hpp", - "socket.hpp", ] ----- diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt new file mode 100644 index 0000000..b3b2c77 --- /dev/null +++ b/src/io/CMakeLists.txt @@ -0,0 +1,16 @@ +qt_add_library(quickshell-io STATIC + datastream.cpp +) + +if (SOCKETS) + target_sources(quickshell-io PRIVATE socket.cpp) +endif() + +qt_add_qml_module(quickshell-io URI Quickshell.Io) +target_link_libraries(quickshell-io PRIVATE ${QT_DEPS}) + +target_link_libraries(quickshell PRIVATE quickshell-ioplugin) + +if (TESTS) + add_subdirectory(test) +endif() diff --git a/src/core/datastream.cpp b/src/io/datastream.cpp similarity index 100% rename from src/core/datastream.cpp rename to src/io/datastream.cpp diff --git a/src/core/datastream.hpp b/src/io/datastream.hpp similarity index 100% rename from src/core/datastream.hpp rename to src/io/datastream.hpp diff --git a/src/io/module.md b/src/io/module.md new file mode 100644 index 0000000..cbcd322 --- /dev/null +++ b/src/io/module.md @@ -0,0 +1,7 @@ +name = "Quickshell.Io" +description = "Io types" +headers = [ + "datastream.hpp", + "socket.hpp", +] +----- diff --git a/src/core/socket.cpp b/src/io/socket.cpp similarity index 100% rename from src/core/socket.cpp rename to src/io/socket.cpp diff --git a/src/core/socket.hpp b/src/io/socket.hpp similarity index 99% rename from src/core/socket.hpp rename to src/io/socket.hpp index 6a390b0..4fcf16b 100644 --- a/src/core/socket.hpp +++ b/src/io/socket.hpp @@ -9,7 +9,7 @@ #include #include "datastream.hpp" -#include "reload.hpp" +#include "../core/reload.hpp" ///! Unix socket listener. class Socket: public DataStream { diff --git a/src/core/test/CMakeLists.txt b/src/io/test/CMakeLists.txt similarity index 100% rename from src/core/test/CMakeLists.txt rename to src/io/test/CMakeLists.txt diff --git a/src/core/test/datastream.cpp b/src/io/test/datastream.cpp similarity index 100% rename from src/core/test/datastream.cpp rename to src/io/test/datastream.cpp