2 * XaoS, a fast portable realtime fractal zoomer
3 * Copyright (C) 1996,1997 by
5 * Jan Hubicka (hubicka@paru.cas.cz)
6 * Thomas Marsh (tmarsh@austin.ibm.com)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <X11/Xutil.h>
27 #include <X11/keysym.h>
28 #include <X11/keysymdef.h>
33 #include <sys/types.h>
36 #include <X11/extensions/XShm.h>
52 Colormap defaultcolormap
;
59 unsigned int width
, height
;
60 unsigned int border_width
;
61 unsigned long background
;
65 unsigned long valuemask
;
66 XSetWindowAttributes
*attributes
;
67 unsigned long attr_mask
;
76 XFontStruct
*font_struct
;
80 unsigned int mouse_buttons
;
84 XShmSegmentInfo xshminfo
[2];
88 unsigned long pixels
[256];
99 extern int alloc_shm_image(xdisplay
* d
);
100 extern void free_shm_image(xdisplay
* d
);
101 extern int alloc_image(xdisplay
* d
);
102 extern void free_image(xdisplay
* d
);
103 extern int xupdate_size(xdisplay
* d
);
104 extern void xflip_buffers(xdisplay
* d
);
105 extern xdisplay
*xalloc_display(char *n
, int x
, int y
, int width
,int height
, xlibparam
* p
);
106 extern void xfree_display(xdisplay
* d
);
107 extern void xsetcolor(xdisplay
* d
, int col
);
108 extern int xsetfont(xdisplay
* d
, char *font_name
);
109 extern int xalloc_color(xdisplay
* d
, int r
, int g
, int b
, int readwrite
);
110 extern void xfree_colors(xdisplay
* d
);
111 extern void xline(xdisplay
* d
, int x1
, int y1
, int x2
, int y2
);
112 extern void xmoveto(xdisplay
* d
, int x
, int y
);
113 extern void xlineto(xdisplay
* d
, int x
, int y
);
114 extern void xrect(xdisplay
* d
, int x1
, int y1
, int x2
, int y2
);
115 extern void xfillrect(xdisplay
* d
, int x1
, int y1
, int x2
, int y2
);
116 extern void xarc(xdisplay
* d
, int x
, int y
, unsigned int w
,
117 unsigned int h
, int a1
, int a2
);
118 extern void xfillarc(xdisplay
* d
, int x
, int y
, unsigned int w
,
119 unsigned int h
, int a1
, int a2
);
120 extern void xpoint(xdisplay
* d
, int x
, int y
);
121 extern void xflush(xdisplay
* d
);
122 extern void xclear_screen(xdisplay
* d
);
123 extern void xrotate_palette(xdisplay
* d
, int direction
, unsigned char c
[3][256], int ncolors
);
124 extern void draw_screen(xdisplay
* d
);
125 extern void xouttext(xdisplay
* d
, char *string
);
126 extern void xresize(xdisplay
* d
, XEvent
* ev
);
127 extern void xsize_set(xdisplay
*d
, int width
, int height
);
128 extern int xsize_update(xdisplay
*d
,int *width
,int *height
);
129 extern int xmouse_x(xdisplay
* d
);
130 extern int xmouse_y(xdisplay
* d
);
131 extern void xmouse_update(xdisplay
* d
);
132 extern char xkeyboard_query(xdisplay
* d
);
133 extern unsigned int xmouse_buttons(xdisplay
* d
);
135 #endif /* XAOS_X11_H */