x11-memdraw.h (1999B)
1 /* 2 * Structure pointed to by X field of Memimage 3 */ 4 5 typedef struct Xmem Xmem; 6 typedef struct Xprivate Xprivate; 7 typedef struct Xwin Xwin; 8 9 enum 10 { 11 PMundef = ~0 12 }; 13 14 struct Xmem 15 { 16 int pixmap; /* pixmap id */ 17 XImage *xi; /* local image */ 18 int dirty; /* is the X server ahead of us? */ 19 Rectangle dirtyr; /* which pixels? */ 20 Rectangle r; /* size of image */ 21 }; 22 23 struct Xprivate { 24 u32int chan; 25 XColormap cmap; 26 XCursor cursor; 27 XDisplay *display; 28 int fd; /* of display */ 29 int depth; /* of screen */ 30 XColor map[256]; 31 XColor map7[128]; 32 uchar map7to8[128][2]; 33 XGC gccopy; 34 XGC gccopy0; 35 XGC gcfill; 36 u32int gcfillcolor; 37 XGC gcfill0; 38 u32int gcfill0color; 39 XGC gcreplsrc; 40 u32int gcreplsrctile; 41 XGC gcreplsrc0; 42 u32int gcreplsrc0tile; 43 XGC gcsimplesrc; 44 u32int gcsimplesrccolor; 45 u32int gcsimplesrcpixmap; 46 XGC gcsimplesrc0; 47 u32int gcsimplesrc0color; 48 u32int gcsimplesrc0pixmap; 49 XGC gczero; 50 u32int gczeropixmap; 51 XGC gczero0; 52 u32int gczero0pixmap; 53 int toplan9[256]; 54 int tox11[256]; 55 int usetable; 56 XVisual *vis; 57 Atom clipboard; 58 Atom utf8string; 59 Atom targets; 60 Atom text; 61 Atom compoundtext; 62 Atom takefocus; 63 Atom losefocus; 64 Atom wmprotos; 65 uint putsnarf; 66 uint assertsnarf; 67 int kbuttons; 68 int kstate; 69 int altdown; 70 71 Xwin* windows; 72 }; 73 74 struct Client; 75 76 struct Xwin 77 { 78 XDrawable drawable; 79 struct Client* client; 80 81 Rectangle newscreenr; 82 Memimage* screenimage; 83 XDrawable screenpm; 84 XDrawable nextscreenpm; 85 Rectangle screenr; 86 Rectangle screenrect; 87 Rectangle windowrect; 88 int fullscreen; 89 int destroyed; 90 91 Xwin* next; 92 }; 93 94 void xlock(void); 95 void xunlock(void); 96 extern Xprivate _x; 97 98 extern Memimage *_xallocmemimage(Rectangle, u32int, int); 99 extern XImage *_xallocxdata(Memimage*, Rectangle); 100 extern void _xdirtyxdata(Memimage*, Rectangle); 101 extern void _xfillcolor(Memimage*, Rectangle, u32int); 102 extern void _xfreexdata(Memimage*); 103 extern XImage *_xgetxdata(Memimage*, Rectangle); 104 extern void _xputxdata(Memimage*, Rectangle); 105