diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-16 01:45:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-16 01:45:49 +0100 |
commit | 1394677528c62bd05f487d16921f2d0b693d28e6 (patch) | |
tree | 455a6b52d7fc4b6e8e1e3f7f98750f571cc0d4c8 /Applications/IRCClient/IRCClient.h | |
parent | fc7f700c201f1202fd9534d626b423b4e09f44a0 (diff) | |
download | serenity-1394677528c62bd05f487d16921f2d0b693d28e6.zip |
IRCClient: Refactor window creation responsibilities.
IRCChannel and IRCQuery objects now create their own windows with the
help of an aid_create_window callback provided by IRCAppWindow.
There's still a bit of murk but this is already an improvement.
Diffstat (limited to 'Applications/IRCClient/IRCClient.h')
-rw-r--r-- | Applications/IRCClient/IRCClient.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Applications/IRCClient/IRCClient.h b/Applications/IRCClient/IRCClient.h index 44f4c85bcd..87a3935387 100644 --- a/Applications/IRCClient/IRCClient.h +++ b/Applications/IRCClient/IRCClient.h @@ -5,10 +5,10 @@ #include <AK/CircularQueue.h> #include <AK/Function.h> #include "IRCLogBuffer.h" +#include "IRCWindow.h" class IRCChannel; class IRCQuery; -class IRCWindow; class IRCWindowListModel; class GNotifier; @@ -32,11 +32,10 @@ public: Function<void()> on_connect; Function<void()> on_disconnect; - Function<void(const String& channel)> on_channel_message; - Function<void(const String& name)> on_query_message; - Function<void(const String& channel)> on_join; Function<void()> on_server_message; + Function<IRCWindow*(void*, IRCWindow::Type, const String&)> aid_create_window; + void register_subwindow(IRCWindow&); void unregister_subwindow(IRCWindow&); |