From 2fd1414b051cc95d0e0a4cd8c983c92408e67ac8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 29 Nov 2016 19:53:11 +0000 Subject: [PATCH] Clean up includes of user_interface.hh --- src/client.cc | 6 ++++++ src/client.hh | 7 +++++-- src/commands.cc | 1 + src/input_handler.cc | 1 + src/insert_completer.cc | 1 + src/normal.cc | 1 + src/remote.cc | 1 + src/remote.hh | 3 +-- src/user_interface.hh | 3 +-- 9 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/client.cc b/src/client.cc index c95e8281..6400df48 100644 --- a/src/client.cc +++ b/src/client.cc @@ -121,6 +121,12 @@ void Client::print_status(DisplayLine status_line, bool immediate) } } + +DisplayCoord Client::dimensions() const +{ + return m_ui->dimensions(); +} + DisplayLine Client::generate_mode_line() const { DisplayLine modeline; diff --git a/src/client.hh b/src/client.hh index c4633466..d2cf0c3d 100644 --- a/src/client.hh +++ b/src/client.hh @@ -8,16 +8,19 @@ #include "utils.hh" #include "option_manager.hh" #include "enum.hh" -#include "user_interface.hh" namespace Kakoune { class Window; +class UserInterface; class String; struct Key; enum class EventMode; +enum class InfoStyle; +enum class MenuStyle; + class Client : public SafeCountable, public OptionManagerWatcher { @@ -43,7 +46,7 @@ public: void print_status(DisplayLine status_line, bool immediate = false); - DisplayCoord dimensions() const { return m_ui->dimensions(); } + DisplayCoord dimensions() const; void force_redraw(); void redraw_ifn(); diff --git a/src/commands.cc b/src/commands.cc index 6b1025d6..0bb2b11f 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -24,6 +24,7 @@ #include "regex.hh" #include "shell_manager.hh" #include "string.hh" +#include "user_interface.hh" #include "window.hh" #include diff --git a/src/input_handler.cc b/src/input_handler.cc index 32bd322d..6bc186a4 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -10,6 +10,7 @@ #include "regex.hh" #include "register_manager.hh" #include "unordered_map.hh" +#include "user_interface.hh" #include "utf8.hh" #include "window.hh" diff --git a/src/insert_completer.cc b/src/insert_completer.cc index b7de3567..ba06042d 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -11,6 +11,7 @@ #include "window.hh" #include "word_db.hh" #include "utf8_iterator.hh" +#include "user_interface.hh" #include diff --git a/src/normal.cc b/src/normal.cc index affe69c1..c0dabd44 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -16,6 +16,7 @@ #include "selectors.hh" #include "shell_manager.hh" #include "string.hh" +#include "user_interface.hh" #include "window.hh" namespace Kakoune diff --git a/src/remote.cc b/src/remote.cc index 762db191..b86ddc6a 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -8,6 +8,7 @@ #include "event_manager.hh" #include "file.hh" #include "id_map.hh" +#include "user_interface.hh" #include #include diff --git a/src/remote.hh b/src/remote.hh index a79c38b4..7f237258 100644 --- a/src/remote.hh +++ b/src/remote.hh @@ -1,10 +1,8 @@ #ifndef remote_hh_INCLUDED #define remote_hh_INCLUDED -#include "coord.hh" #include "env_vars.hh" #include "exception.hh" -#include "user_interface.hh" #include "utils.hh" #include @@ -20,6 +18,7 @@ struct remote_error : runtime_error }; class FDWatcher; +class UserInterface; // A remote client handle communication between a client running on the server // and a user interface running on the local process. diff --git a/src/user_interface.hh b/src/user_interface.hh index 19d545d9..51f75bbd 100644 --- a/src/user_interface.hh +++ b/src/user_interface.hh @@ -2,7 +2,6 @@ #define user_interface_hh_INCLUDED #include "array_view.hh" -#include "safe_ptr.hh" #include "id_map.hh" #include @@ -36,7 +35,7 @@ enum class EventMode; using InputCallback = std::function; -class UserInterface : public SafeCountable +class UserInterface { public: virtual ~UserInterface() {}