/* Fonctions interface XWindow pour affichage d'images */

#ifndef XDISPIM_SEEN
#define XDISPIM_SEEN


#include <X11/Xlib.h>

#define CMAP_GREY32         0
#define CMAP_COL16          1
#define CMAP_COLRJ32        2
#define CMAP_GREYINV32      3
#define CMAP_COLBR32        4
#define CMAP_COLRV32        5

struct _RzXCMap_
  {
  int typ;
  int nCol;
  unsigned long colpix[256];
  };
typedef struct _RzXCMap_  RzXCMap;

int RzXInitDisplay(int prtl);
int RzXCheckInitDisp(void);

int RzXGetPixDSize(void);
int RzXDispPixMap(Window xw, unsigned char *pix,  int sizx, int sizy, RzXCMap *cmap);

RzXCMap * RzXGetCMap(int cmpaid);
int RzXAllocCMap(RzXCMap *rcmap, int cmapid, int prtl);
int RzXFreeCMap(RzXCMap *rcmap);

Window RzXNewWin(int sx, int sy, char *title, int posx, int posy);

#endif
