diff options
Diffstat (limited to 'src/components')
35 files changed, 132 insertions, 18 deletions
diff --git a/src/components/cellrenderermemberlist.cpp b/src/components/cellrenderermemberlist.cpp index ee1ea3e..0265447 100644 --- a/src/components/cellrenderermemberlist.cpp +++ b/src/components/cellrenderermemberlist.cpp @@ -1,4 +1,5 @@ #include "cellrenderermemberlist.hpp" +#include <gdkmm/general.h> CellRendererMemberList::CellRendererMemberList() : Glib::ObjectBase(typeid(CellRendererMemberList)) diff --git a/src/components/cellrenderermemberlist.hpp b/src/components/cellrenderermemberlist.hpp index 79d32e3..1ecbcb8 100644 --- a/src/components/cellrenderermemberlist.hpp +++ b/src/components/cellrenderermemberlist.hpp @@ -1,5 +1,7 @@ #pragma once +#include <glibmm/property.h> #include <gtkmm/cellrenderer.h> +#include <gtkmm/cellrenderertext.h> #include "discord/activity.hpp" enum class MemberListRenderType : uint8_t { diff --git a/src/components/cellrendererpixbufanimation.cpp b/src/components/cellrendererpixbufanimation.cpp index d6f1f01..7983e0a 100644 --- a/src/components/cellrendererpixbufanimation.cpp +++ b/src/components/cellrendererpixbufanimation.cpp @@ -1,4 +1,6 @@ #include "cellrendererpixbufanimation.hpp" +#include <gdkmm/general.h> +#include <glibmm/main.h> CellRendererPixbufAnimation::CellRendererPixbufAnimation() : Glib::ObjectBase(typeid(CellRendererPixbufAnimation)) diff --git a/src/components/cellrendererpixbufanimation.hpp b/src/components/cellrendererpixbufanimation.hpp index e7949c8..a9186bd 100644 --- a/src/components/cellrendererpixbufanimation.hpp +++ b/src/components/cellrendererpixbufanimation.hpp @@ -1,5 +1,8 @@ #pragma once #include <unordered_map> +#include <gdkmm/pixbufanimation.h> +#include <glibmm/property.h> +#include <gtkmm/cellrenderer.h> // handles both static and animated class CellRendererPixbufAnimation : public Gtk::CellRenderer { diff --git a/src/components/channels.cpp b/src/components/channels.cpp index 6ed3ca4..cafb8e0 100644 --- a/src/components/channels.cpp +++ b/src/components/channels.cpp @@ -3,6 +3,8 @@ #include <algorithm> #include <map> #include <unordered_map> +#include "abaddon.hpp" +#include "util.hpp" ChannelList::ChannelList() : Glib::ObjectBase(typeid(ChannelList)) diff --git a/src/components/channelscellrenderer.cpp b/src/components/channelscellrenderer.cpp index bf84a9b..35494ab 100644 --- a/src/components/channelscellrenderer.cpp +++ b/src/components/channelscellrenderer.cpp @@ -1,4 +1,6 @@ #include "channelscellrenderer.hpp" +#include <gdkmm/general.h> +#include "abaddon.hpp" constexpr static int MentionsRightPad = 7; #ifndef M_PI diff --git a/src/components/channelscellrenderer.hpp b/src/components/channelscellrenderer.hpp index 934ce5b..e142b2a 100644 --- a/src/components/channelscellrenderer.hpp +++ b/src/components/channelscellrenderer.hpp @@ -1,7 +1,10 @@ #pragma once +#include <map> +#include <optional> #include <gdkmm/pixbufanimation.h> #include <glibmm/property.h> -#include <map> +#include <gtkmm/cellrendererpixbuf.h> +#include <gtkmm/cellrenderertext.h> #include "discord/snowflake.hpp" #include "discord/voicestateflags.hpp" #include "misc/bitwise.hpp" diff --git a/src/components/channeltabswitcherhandy.cpp b/src/components/channeltabswitcherhandy.cpp index 14c5c49..fa4fccc 100644 --- a/src/components/channeltabswitcherhandy.cpp +++ b/src/components/channeltabswitcherhandy.cpp @@ -1,6 +1,11 @@ #ifdef WITH_LIBHANDY - #include "channeltabswitcherhandy.hpp" +// clang-format off + +#include "channeltabswitcherhandy.hpp" +#include "abaddon.hpp" + +// clang-format on void selected_page_notify_cb(HdyTabView *view, GParamSpec *pspec, ChannelTabSwitcherHandy *switcher) { auto *page = hdy_tab_view_get_selected_page(view); diff --git a/src/components/channeltabswitcherhandy.hpp b/src/components/channeltabswitcherhandy.hpp index f5a31fa..86d1e73 100644 --- a/src/components/channeltabswitcherhandy.hpp +++ b/src/components/channeltabswitcherhandy.hpp @@ -1,10 +1,16 @@ #pragma once // perhaps this should be conditionally included within cmakelists? #ifdef WITH_LIBHANDY - #include <unordered_map> - #include <handy.h> - #include "discord/snowflake.hpp" - #include "state.hpp" + +// clang-format off + +#include <unordered_map> +#include <gtkmm/box.h> +#include <handy.h> +#include "discord/snowflake.hpp" +#include "state.hpp" + +// clang-format off class ChannelData; diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp index 1db03ed..1fcf628 100644 --- a/src/components/chatinput.cpp +++ b/src/components/chatinput.cpp @@ -1,7 +1,11 @@ #include "chatinput.hpp" +#include <filesystem> +#include <gtkmm/dialog.h> +#include <gtkmm/filechoosernative.h> +#include "abaddon.hpp" #include "constants.hpp" #include "misc/events.hpp" -#include <filesystem> +#include "util.hpp" ChatInputText::ChatInputText() { get_style_context()->add_class("message-input"); diff --git a/src/components/chatinput.hpp b/src/components/chatinput.hpp index 231d67c..e5555fc 100644 --- a/src/components/chatinput.hpp +++ b/src/components/chatinput.hpp @@ -1,5 +1,14 @@ #pragma once +#include <gtkmm/box.h> +#include <gtkmm/button.h> +#include <gtkmm/eventbox.h> +#include <gtkmm/image.h> +#include <gtkmm/menu.h> +#include <gtkmm/revealer.h> +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/textview.h> #include "discord/chatsubmitparams.hpp" +#include "discord/message.hpp" #include "discord/permissions.hpp" class ChatInputAttachmentItem : public Gtk::EventBox { diff --git a/src/components/chatinputindicator.cpp b/src/components/chatinputindicator.cpp index 0611e71..51d2142 100644 --- a/src/components/chatinputindicator.cpp +++ b/src/components/chatinputindicator.cpp @@ -1,5 +1,8 @@ -#include <filesystem> #include "chatinputindicator.hpp" +#include <filesystem> +#include <gdkmm/pixbufloader.h> +#include "abaddon.hpp" +#include "util.hpp" constexpr static const int MaxUsersInIndicator = 4; diff --git a/src/components/chatinputindicator.hpp b/src/components/chatinputindicator.hpp index 5688393..0c070b2 100644 --- a/src/components/chatinputindicator.hpp +++ b/src/components/chatinputindicator.hpp @@ -1,5 +1,8 @@ #pragma once #include <unordered_map> +#include <gtkmm/box.h> +#include <gtkmm/image.h> +#include <gtkmm/label.h> #include "discord/message.hpp" #include "discord/user.hpp" diff --git a/src/components/chatlist.cpp b/src/components/chatlist.cpp index a656a43..3e22d72 100644 --- a/src/components/chatlist.cpp +++ b/src/components/chatlist.cpp @@ -1,4 +1,5 @@ #include "chatlist.hpp" +#include "abaddon.hpp" #include "chatmessage.hpp" #include "constants.hpp" diff --git a/src/components/chatlist.hpp b/src/components/chatlist.hpp index 9f12df9..21ead4c 100644 --- a/src/components/chatlist.hpp +++ b/src/components/chatlist.hpp @@ -1,6 +1,10 @@ #pragma once #include <map> #include <vector> +#include <glibmm/timer.h> +#include <gtkmm/listbox.h> +#include <gtkmm/menu.h> +#include <gtkmm/scrolledwindow.h> #include "discord/message.hpp" #include "discord/snowflake.hpp" diff --git a/src/components/chatmessage.cpp b/src/components/chatmessage.cpp index 05954da..8f2f519 100644 --- a/src/components/chatmessage.cpp +++ b/src/components/chatmessage.cpp @@ -1,8 +1,11 @@ #include "chatmessage.hpp" +#include <unordered_map> +#include <gtkmm/flowbox.h> +#include "abaddon.hpp" #include "constants.hpp" #include "lazyimage.hpp" #include "misc/chatutil.hpp" -#include <unordered_map> +#include "util.hpp" ChatMessageItemContainer::ChatMessageItemContainer() : m_main(Gtk::ORIENTATION_VERTICAL) { diff --git a/src/components/chatmessage.hpp b/src/components/chatmessage.hpp index 99fc872..8deea73 100644 --- a/src/components/chatmessage.hpp +++ b/src/components/chatmessage.hpp @@ -1,4 +1,10 @@ #pragma once +#include <gdkmm/pixbufanimation.h> +#include <gtkmm/box.h> +#include <gtkmm/eventbox.h> +#include <gtkmm/image.h> +#include <gtkmm/listboxrow.h> +#include <gtkmm/textview.h> #include "discord/discord.hpp" class ChatMessageItemContainer : public Gtk::EventBox { diff --git a/src/components/chatwindow.cpp b/src/components/chatwindow.cpp index 9a2493d..6a44d84 100644 --- a/src/components/chatwindow.cpp +++ b/src/components/chatwindow.cpp @@ -1,4 +1,5 @@ #include "chatwindow.hpp" +#include "abaddon.hpp" #include "chatinputindicator.hpp" #include "ratelimitindicator.hpp" #include "chatinput.hpp" diff --git a/src/components/chatwindow.hpp b/src/components/chatwindow.hpp index b3c9d41..f7493cd 100644 --- a/src/components/chatwindow.hpp +++ b/src/components/chatwindow.hpp @@ -1,6 +1,7 @@ #pragma once #include <string> #include <set> +#include <gtkmm/eventbox.h> #include "discord/discord.hpp" #include "discord/chatsubmitparams.hpp" #include "completer.hpp" diff --git a/src/components/completer.cpp b/src/components/completer.cpp index f6f0906..b858b5e 100644 --- a/src/components/completer.cpp +++ b/src/components/completer.cpp @@ -1,6 +1,8 @@ #include <unordered_set> #include <utility> #include "completer.hpp" +#include "abaddon.hpp" +#include "util.hpp" constexpr const int CompleterHeight = 150; constexpr const int MaxCompleterEntries = 30; diff --git a/src/components/completer.hpp b/src/components/completer.hpp index d1b1d5f..ef801a2 100644 --- a/src/components/completer.hpp +++ b/src/components/completer.hpp @@ -1,5 +1,12 @@ #pragma once #include <functional> +#include <gdkmm/pixbuf.h> +#include <gtkmm/box.h> +#include <gtkmm/listbox.h> +#include <gtkmm/listboxrow.h> +#include <gtkmm/revealer.h> +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/textview.h> #include "lazyimage.hpp" #include "discord/snowflake.hpp" diff --git a/src/components/draglistbox.cpp b/src/components/draglistbox.cpp index 50bb5b0..208b5de 100644 --- a/src/components/draglistbox.cpp +++ b/src/components/draglistbox.cpp @@ -1,4 +1,6 @@ #include "draglistbox.hpp" +#include <glibmm/main.h> +#include <gtkmm/adjustment.h> DragListBox::DragListBox() { drag_dest_set(m_entries, Gtk::DEST_DEFAULT_MOTION | Gtk::DEST_DEFAULT_DROP, Gdk::ACTION_MOVE); diff --git a/src/components/draglistbox.hpp b/src/components/draglistbox.hpp index 8890792..dc9e9f3 100644 --- a/src/components/draglistbox.hpp +++ b/src/components/draglistbox.hpp @@ -1,4 +1,5 @@ #pragma once +#include <gtkmm/listbox.h> class DragListBox : public Gtk::ListBox { public: diff --git a/src/components/friendslist.cpp b/src/components/friendslist.cpp index 99fbafa..a1fab8d 100644 --- a/src/components/friendslist.cpp +++ b/src/components/friendslist.cpp @@ -1,5 +1,9 @@ #include "friendslist.hpp" +#include <gtkmm/messagedialog.h> +#include <gtkmm/radiobutton.h> +#include "abaddon.hpp" #include "lazyimage.hpp" +#include "util.hpp" using namespace std::string_literals; diff --git a/src/components/friendslist.hpp b/src/components/friendslist.hpp index c4056f0..9f2c025 100644 --- a/src/components/friendslist.hpp +++ b/src/components/friendslist.hpp @@ -1,4 +1,13 @@ #pragma once +#include <gtkmm/box.h> +#include <gtkmm/button.h> +#include <gtkmm/buttonbox.h> +#include <gtkmm/entry.h> +#include <gtkmm/label.h> +#include <gtkmm/listbox.h> +#include <gtkmm/radiobuttongroup.h> +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/window.h> #include "discord/objects.hpp" class FriendsListAddComponent : public Gtk::Box { diff --git a/src/components/lazyimage.cpp b/src/components/lazyimage.cpp index 90b8f28..e1e873c 100644 --- a/src/components/lazyimage.cpp +++ b/src/components/lazyimage.cpp @@ -1,6 +1,8 @@ #include "lazyimage.hpp" #include <utility> +#include "abaddon.hpp" +#include "util.hpp" LazyImage::LazyImage(int w, int h, bool use_placeholder) : m_width(w) diff --git a/src/components/lazyimage.hpp b/src/components/lazyimage.hpp index 50db425..abf0120 100644 --- a/src/components/lazyimage.hpp +++ b/src/components/lazyimage.hpp @@ -1,4 +1,5 @@ #pragma once +#include <gtkmm/image.h> // loads an image only when the widget is drawn for the first time class LazyImage : public Gtk::Image { diff --git a/src/components/memberlist.cpp b/src/components/memberlist.cpp index 7046b52..18048f5 100644 --- a/src/components/memberlist.cpp +++ b/src/components/memberlist.cpp @@ -1,5 +1,8 @@ #include "memberlist.hpp" +#include "abaddon.hpp" +#include "util.hpp" + constexpr static int MemberListUserLimit = 200; MemberList::MemberList() diff --git a/src/components/memberlist.hpp b/src/components/memberlist.hpp index 1c4aaf4..b134699 100644 --- a/src/components/memberlist.hpp +++ b/src/components/memberlist.hpp @@ -1,12 +1,14 @@ #pragma once +#include <unordered_map> + #include <gdkmm/pixbuf.h> +#include <gtkmm/scrolledwindow.h> #include <gtkmm/treemodel.h> #include <gtkmm/treestore.h> #include <gtkmm/treeview.h> -#include <unordered_map> - #include "cellrenderermemberlist.hpp" +#include "discord/user.hpp" #include "discord/snowflake.hpp" class MemberList { diff --git a/src/components/progressbar.cpp b/src/components/progressbar.cpp index 65abfae..d6e28c4 100644 --- a/src/components/progressbar.cpp +++ b/src/components/progressbar.cpp @@ -1,5 +1,7 @@ #include "progressbar.hpp" +#include "abaddon.hpp" + MessageUploadProgressBar::MessageUploadProgressBar() { get_style_context()->add_class("message-progress"); auto &discord = Abaddon::Get().GetDiscordClient(); diff --git a/src/components/progressbar.hpp b/src/components/progressbar.hpp index 8efb87a..a9f8099 100644 --- a/src/components/progressbar.hpp +++ b/src/components/progressbar.hpp @@ -1,5 +1,6 @@ #pragma once #include <string> +#include <gtkmm/progressbar.h> class MessageUploadProgressBar : public Gtk::ProgressBar { public: diff --git a/src/components/ratelimitindicator.cpp b/src/components/ratelimitindicator.cpp index 426f18e..1eff305 100644 --- a/src/components/ratelimitindicator.cpp +++ b/src/components/ratelimitindicator.cpp @@ -1,6 +1,10 @@ #include "ratelimitindicator.hpp" + #include <filesystem> +#include "abaddon.hpp" +#include "util.hpp" + RateLimitIndicator::RateLimitIndicator() : Gtk::Box(Gtk::ORIENTATION_HORIZONTAL) { m_label.set_text(""); diff --git a/src/components/ratelimitindicator.hpp b/src/components/ratelimitindicator.hpp index c9b6d6e..9993317 100644 --- a/src/components/ratelimitindicator.hpp +++ b/src/components/ratelimitindicator.hpp @@ -1,6 +1,11 @@ #pragma once #include <unordered_map> #include <chrono> + +#include <gtkmm/box.h> +#include <gtkmm/image.h> +#include <gtkmm/label.h> + #include "discord/message.hpp" class RateLimitIndicator : public Gtk::Box { diff --git a/src/components/voiceinfobox.cpp b/src/components/voiceinfobox.cpp index cecaa7d..b514cdc 100644 --- a/src/components/voiceinfobox.cpp +++ b/src/components/voiceinfobox.cpp @@ -1,8 +1,12 @@ #ifdef WITH_VOICE - #include "voiceinfobox.hpp" - #include "abaddon.hpp" - #include "util.hpp" +// clang-format off + +#include "voiceinfobox.hpp" +#include "abaddon.hpp" +#include "util.hpp" + +// clang-format on VoiceInfoBox::VoiceInfoBox() : Gtk::Box(Gtk::ORIENTATION_HORIZONTAL) diff --git a/src/components/voiceinfobox.hpp b/src/components/voiceinfobox.hpp index 9988c63..feeada7 100644 --- a/src/components/voiceinfobox.hpp +++ b/src/components/voiceinfobox.hpp @@ -2,10 +2,14 @@ #ifdef WITH_VOICE - #include <gtkmm/box.h> - #include <gtkmm/eventbox.h> - #include <gtkmm/image.h> - #include <gtkmm/label.h> +// clang-format off + +#include <gtkmm/box.h> +#include <gtkmm/eventbox.h> +#include <gtkmm/image.h> +#include <gtkmm/label.h> + +// clang-format on class VoiceInfoBox : public Gtk::Box { public: |