00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef RL_IMAGEFRAME_H
00017 #define RL_IMAGEFRAME_H
00018
00019 #include <libglademm/xml.h>
00020 #include <gtkmm.h>
00021 #include <gtkmm/drawingarea.h>
00022 #include <glibmm/refptr.h>
00023 #include <cairomm/surface.h>
00024 #include <iostream>
00025 #include <fstream>
00026 #include <cstring>
00027
00029 class RL_ImageFrame : public Gtk::DrawingArea
00030 {
00031 public:
00032
00033 RL_ImageFrame(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
00034
00035
00036 RL_ImageFrame();
00037
00038
00039 virtual ~RL_ImageFrame();
00040
00041
00042 void Initialize(unsigned int width, unsigned int height);
00043
00044
00045
00046 void SetFlip(bool set);
00047
00048
00049
00050 bool UpdateBuffer(unsigned char* data);
00051
00052 protected:
00053
00054 bool ExposeEvent(GdkEventExpose* e);
00055
00056
00057 bool Timeout();
00058
00059 guint8 *buf;
00060 Glib::RefPtr< Gdk::Pixbuf > pixbuf;
00061 Gtk::Container* parent;
00063 private:
00064 Glib::Mutex imageMutex;
00066 int imageWidth;
00067 int imageHeight;
00068 int steps;
00071 bool isInitialized;
00072 bool isFlip;
00073 std::list<Glib::RefPtr<Gdk::Pixbuf> > buf_list;
00075 };
00076
00077 #endif