#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; }; }