aboutsummaryrefslogtreecommitdiff
path: root/include/Window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Window.hpp')
-rw-r--r--include/Window.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/Window.hpp b/include/Window.hpp
index 29ec285..236affa 100644
--- a/include/Window.hpp
+++ b/include/Window.hpp
@@ -6,6 +6,8 @@
#include <gtkmm/stack.h>
#include <odhtdb/Database.hpp>
#include <mutex>
+#include <random>
+#include <vector>
namespace dchat
{
@@ -15,10 +17,30 @@ namespace dchat
Window();
virtual ~Window();
private:
+ bool drawBackground(const Cairo::RefPtr<Cairo::Context> &cairo);
+ private:
std::unique_ptr<odhtdb::Database> database;
std::mutex databaseCallbackMutex;
Gtk::Stack stack;
LoginWindow loginWindow;
ChatWindow chatWindow;
+
+ struct Node
+ {
+ double radius;
+ double originalPosX;
+ double originalPosY;
+
+ double currentPosX;
+ double currentPosY;
+
+ double targetPosX;
+ double targetPosY;
+ };
+
+ std::mt19937 backgroundRng;
+ std::vector<Node> backgroundNodes;
+ int prevTimeMillis;
+ sigc::connection drawBackgroundConnection;
};
} \ No newline at end of file