From 72e787a706d372c9a92e424e9b13ece929cb2bce Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 24 Aug 2025 00:44:00 +0200 Subject: Remove the stale legacy-cpp implementation The Rust rewrite (crates/) has fully superseded it - keeping both around was actively misleading (main looked like it still shipped a C++ build), and nothing here still depends on it. --- legacy-cpp/src/layouts/layout_engine.h | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 legacy-cpp/src/layouts/layout_engine.h (limited to 'legacy-cpp/src/layouts/layout_engine.h') diff --git a/legacy-cpp/src/layouts/layout_engine.h b/legacy-cpp/src/layouts/layout_engine.h deleted file mode 100644 index d23033c..0000000 --- a/legacy-cpp/src/layouts/layout_engine.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef SRDWM_LAYOUT_ENGINE_H -#define SRDWM_LAYOUT_ENGINE_H - -#include "layout.h" -#include "tiling_layout.h" -#include "dynamic_layout.h" -#include -#include -#include -#include - -class SRDWindow; // Forward declaration to avoid circular dependency - -enum class LayoutType { - TILING, - DYNAMIC, - FLOATING - // Add other layout types here later -}; - -class LayoutEngine { -public: - LayoutEngine(); - ~LayoutEngine(); - - // Layout management - bool set_layout(int monitor_id, LayoutType layout_type); - bool set_layout(int monitor_id, const std::string& layout_name); - LayoutType get_layout(int monitor_id) const; - std::string get_layout_name(int monitor_id) const; - - // Layout configuration - bool configure_layout(const std::string& layout_name, const std::map& config); - bool register_custom_layout(const std::string& name, std::function&, const Monitor&)> layout_func); - - // SRDWindow management - void add_window(SRDWindow* window); - void remove_window(SRDWindow* window); - void update_window(SRDWindow* window); - - // Monitor management - void add_monitor(const Monitor& monitor); - void remove_monitor(int monitor_id); - void update_monitor(const Monitor& monitor); - - // Arrangement - void arrange_on_monitor(const Monitor& monitor); - void arrange_all_monitors(); - - // Utility - std::vector get_available_layouts() const; - std::vector get_windows_on_monitor(int monitor_id) const; - -private: - // Member variables for layout state - std::vector monitors_; - std::vector windows_; - TilingLayout tiling_layout_; - DynamicLayout dynamic_layout_; - std::map active_layouts_; // Map monitor ID to active layout type - std::map&, const Monitor&)>> custom_layouts_; - std::map> layout_configs_; - - // Helper methods - LayoutType string_to_layout_type(const std::string& name) const; - std::string layout_type_to_string(LayoutType type) const; - bool is_window_on_monitor(const SRDWindow* window, const Monitor& monitor) const; -}; - -#endif // SRDWM_LAYOUT_ENGINE_H -- cgit v1.2.3