aboutsummaryrefslogtreecommitdiff
path: root/include/GtkGif.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-03 22:49:29 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-03 22:49:32 +0100
commitc7138bca7ea7d007198c544b2d8bc27ae414d2e2 (patch)
treeb27752bc5e4e452a9a4c047e884b8952a22a0f0a /include/GtkGif.hpp
parent405459e93be718b0e6aad26746036105dd3f3226 (diff)
Start with gif/image widget
Diffstat (limited to 'include/GtkGif.hpp')
-rw-r--r--include/GtkGif.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/GtkGif.hpp b/include/GtkGif.hpp
index 91b3a12..a4a28d7 100644
--- a/include/GtkGif.hpp
+++ b/include/GtkGif.hpp
@@ -1,24 +1,24 @@
#pragma once
#include <dchat/Gif.hpp>
-#include <gtkmm/drawingarea.h>
-#include <gdkmm/pixbuf.h>
+#include <cairomm/context.h>
+#include <cairomm/surface.h>
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::Context> &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::Context> &cairo) override;
- private:
Cairo::RefPtr<Cairo::ImageSurface> surface;
};
} \ No newline at end of file