#ifndef MGIMAGE_H
#define MGIMAGE_H

//
// This File contains the declaration of the MGImage-class
//
//   Author: Thomas Bretz
//   Version: V1.0 (1-8-2000)

#ifndef ROOT_TGFrame
#include <TGFrame.h>
#endif
#ifndef ROOT_TGX11
#include <TGX11.h>
#endif

class TTimer;

typedef unsigned char byte;

class MGImage : public TGFrame
{
    XImage *fImage;

    GContext_t fDefGC;
    Pixmap_t   fPixmap;

    UInt_t fWidth;
    UInt_t fHeight;

    void *fMuxPixmap; //! test

    TTimer *fTimer;

    enum { kNeedRedraw = BIT(17) };

public:
    MGImage(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kSunkenFrame, ULong_t back = fgDefaultFrameBackground);
    ~MGImage();

    void DoRedraw();

    void DrawImg(const byte *buffer);
    void DrawColImg(const byte *gbuf, const byte *cbuf);

    ClassDef(MGImage, 0)
};

#endif // MGIMAGE_H
