From c7138bca7ea7d007198c544b2d8bc27ae414d2e2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Nov 2018 22:49:29 +0100 Subject: Start with gif/image widget --- include/GtkGif.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/GtkGif.hpp') diff --git a/include/GtkGif.hpp b/include/GtkGif.hpp index 91b3a12..a4a28d7 100644 --- a/include/GtkGif.hpp +++ b/include/GtkGif.hpp @@ -1,23 +1,23 @@ #pragma once #include -#include -#include +#include +#include namespace dchat { - class GtkGif : public Gif, public Gtk::DrawingArea + class GtkGif : public Gif { public: GtkGif(StringView fileContent); virtual ~GtkGif(){} + + void draw(const Cairo::RefPtr &cairo, int width, int height); 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; }; -- cgit v1.2.3