00001 #ifndef __JBXL_OPEN_X11_H_
00002 #define __JBXL_OPEN_X11_H_
00003
00004
00005 #include "gdata.h"
00006
00007
00008 #ifdef X_DISPLAY_MISSING
00009 #ifndef DISABLE_X11
00010 #define DISABLE_X11
00011 #endif
00012 #endif
00013
00014 #ifdef DISABLE_X11
00015 #undef ENABLE_X11
00016 #endif
00017
00018
00019 #ifndef DISABLE_X11
00020
00028 #include <X11/Xlib.h>
00029 #include <X11/Xutil.h>
00030
00031
00032
00033
00034 #define COLOR_DEPTH 32
00035
00036 typedef struct {
00037 int id;
00038 Display* display;
00039 Window window;
00040 GC gc;
00041 int screen;
00042 unsigned long* color_index;
00043 } openX;
00044
00045
00046
00047 #define MONOC 0
00048 #define COLOR 1
00049 #define COLOR_NUM 125
00050
00051
00052 openX disp_image(WSGraph gd, int lc, int hc, int cflg);
00053 void displayClose(openX xid);
00054
00055 void set_color(openX xid, double r, double g, double b);
00056 openX displayOpen(int xs, int ys, int cflg);
00057
00058 #define disp_close(xd) displayClose(xd)
00059 #define check_image(vp) {openX x;x=disp_image((vp),0,0,0);getchar();displayClose(x);}
00060
00061
00062
00063 #endif // DISABLE_X11
00064 #endif // __JBXL_OPEN_X11_H_
00065