From a535703add6bf29878845cb270997514489cfc16 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 31 Oct 2018 18:12:49 +0100 Subject: Start with images/gif, resize chat input --- include/GtkGif.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/GtkGif.hpp (limited to 'include/GtkGif.hpp') diff --git a/include/GtkGif.hpp b/include/GtkGif.hpp new file mode 100644 index 0000000..91b3a12 --- /dev/null +++ b/include/GtkGif.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include + +namespace dchat +{ + class GtkGif : public Gif, public Gtk::DrawingArea + { + public: + GtkGif(StringView fileContent); + virtual ~GtkGif(){} + protected: + // Return false if texture creation failed + bool createTexture(int width, int height) override; + // Size of texture data is same as the size that the texture was created with (also same size returned by @getSize function) + void updateTexture(void *textureData) override; + private: + bool on_draw(const Cairo::RefPtr &cairo) override; + private: + Cairo::RefPtr surface; + }; +} \ No newline at end of file -- cgit v1.2.3