00001 #ifndef GTKMGR_H_
00002 #define GTKMGR_H_
00003
00004 #include <X11/Xlib.h>
00005 #include "splash/SplashBitmap.h"
00006 #include "splash/SplashTypes.h"
00007 #include <gtk/gtk.h>
00008
00009
00010 class GtkMgr
00011 {
00012 public:
00013 GtkWidget * window;
00014 GdkGC * gc;
00015 GdkDrawable * pixmap;
00016 Display * display;
00017 Visual * visual;
00018 int screenNum;
00019
00021 int depth;
00022 GdkColor lineColor;
00023 int bkColor;
00024
00026 unsigned char* fb_mem;
00027 int fb;
00028 void dfb_copyImage(unsigned char *mem, SplashBitmap * bitmap,
00029 int xSrc = 0, int ySrc = 0,
00030 int xDest = 0, int yDest = 0,
00031 int width = -1, int height = -1);
00032
00033 public:
00034 GtkMgr(void);
00035 ~GtkMgr(void);
00036
00037 void setupWindow();
00038 void clearBkground();
00039 void drawImage(SplashBitmap * bitmap,
00040 int xSrc = 0, int ySrc = 0,
00041 int xDest = 0, int yDest = 0,
00042 int width = -1, int height = -1,
00043 GBool bDrawBorder = gTrue);
00044 void setLineColor(const int color);
00045 void setLineAttributes(const int width, const int style = LineSolid);
00046 void drawLine(const int x1, const int y1, const int x2, const int y2);
00047 };
00048 #endif
00049