Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_KDE4_CAIRO_GLUE_H
00020 #define GNASH_KDE4_CAIRO_GLUE_H
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "gnashconfig.h"
00025 #endif
00026
00027 #include "Kde4Glue.h"
00028
00029 #include <memory>
00030 #include <QImage>
00031 #include <boost/scoped_array.hpp>
00032 #include <QPainter>
00033 #include "snappingrange.h"
00034
00035 #include <cairo.h>
00036
00037 class QRect;
00038
00039 namespace gnash
00040 {
00041
00042 class Kde4CairoGlue : public Kde4Glue
00043 {
00044 public:
00045 Kde4CairoGlue();
00046 ~Kde4CairoGlue();
00047
00048 bool init(int argc, char **argv[]);
00049 void initBuffer(int width, int height);
00050 void prepDrawingArea(DrawingWidget *drawing_area);
00051 Renderer* createRenderHandler();
00052 void render();
00053 void render(const QRect& updateRect);
00054 void resize(int width, int height);
00055
00056 private:
00057 int _width;
00058 int _height;
00059 boost::scoped_array<unsigned char> _offscreenbuf;
00060 Renderer* _renderer;
00061 std::auto_ptr<QImage> _image;
00062 std::auto_ptr<QPainter> _painter;
00063
00064 cairo_t *_cairo_handle;
00065 cairo_surface_t *_cairo_surface;
00066 };
00067
00068
00069 }
00070
00071 #endif