minor fixes in ditribution files
[gromacs/qmmm-gamess-us.git] / src / ngmx / Xstuff.h
blob2d3eb5e7dbb9560e2bf5e7dd32ffb74263a828f2
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * VERSION 3.2.0
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * Gyas ROwers Mature At Cryogenic Speed
36 #ifndef _Xstuff_h
37 #define _Xstuff_h
39 /* The altivec extensions for ppc define some stupid overlapping
40 * macros like pixel and vector - turn them off here, we only
41 * need them in the inner loops.
43 #ifdef __VEC__
44 #undef pixel
45 #endif
47 #include <X11/Xlib.h>
48 #include <X11/Xutil.h>
49 #include <X11/keysym.h>
50 #include <X11/cursorfont.h>
51 #include <X11/Xresource.h>
53 #ifdef _acc_
54 typedef unsigned char bmchar;
55 #else
56 typedef char bmchar;
57 #endif /* _acc */
59 #define XTextHeight(font) ((font)->max_bounds.ascent+(font)->max_bounds.descent)
60 #define XDrawCircle(disp,win,gc,x,y,rad) \
61 XDrawArc(disp,win,gc,x-rad,y-rad,2*rad,2*rad,0,64*360)
62 #define XFillCircle(disp,win,gc,x,y,rad) \
63 XFillArc(disp,win,gc,x-rad,y-rad,2*rad,2*rad,0,64*360)
65 #ifdef NEED_XSTUFF
67 extern void XSelectInput(Display *display,Window w,long event_mask);
68 extern void XChangeWindowAttributes(Display *display,Window w,
69 unsigned long valuemask,
70 XSetWindowAttributes *attributes);
71 extern void XSetWindowBackgroundPixmap(Display *disp,Drawable d,Pixmap pm);
72 extern Status XMatchVisualInfo(Display *display,int screen,int depth,
73 int class,XVisualInfo *vinfo_return);
74 extern Status XParseColor(Display *display,Colormap colormap,char *spec,
75 XColor *exact_def_return);
76 extern Status XAllocColor(Display *display,Colormap colormap,
77 XColor *screen_in_out);
78 extern Status XAllocNamedColor(Display *disp, Colormap cmap, char *colorname,
79 XColor *colorcell_def, XColor *rgb_db_def);
80 extern Status XQueryColor(Display *disp, Colormap cmap,
81 XColor *colorcell_def);
82 extern void XDrawArc(Display *display,Drawable d,GC gc,int x,int y,
83 unsigned int width,unsigned int height,int angle1,
84 int angle2);
85 extern void XFillArc(Display *display,Drawable d,GC gc,int x,int y,
86 unsigned int width,unsigned int height,int angle1,
87 int angle2);
88 extern void XDrawLine(Display *display,Drawable d,GC gc,int x1,int y1,
89 int x2,int y2);
90 extern void XDrawLines(Display *display,Drawable d,GC gc,XPoint *points,
91 int npoints, int mode);
93 extern void XMapWindow(Display *display,Window w);
94 extern void XMapSubwindows(Display *display,Window w);
95 extern void XUnmapSubwindows(Display *display, Window w);
96 extern void XUnmapWindow(Display *display, Window w);
98 extern void XNextEvent(Display *display,XEvent *report);
99 extern Bool XCheckTypedEvent(Display *display,int event_type,
100 XEvent *event_return);
101 extern void XSetForeground(Display *display,GC gc,
102 unsigned long foreground);
103 extern void XClearWindow(Display *disp,Window w);
104 extern void XClearArea(Display *display,Window w,int x,int y,
105 unsigned int width,unsigned int height,
106 Bool exposures);
107 extern void XDrawRectangle(Display *display,Drawable d,GC gc,
108 int x, int y, int width, int height);
109 extern void XDrawRectangles(Display *display,Drawable d,GC gc,
110 XRectangle rectangles[],int nrectangles);
111 extern void XDrawString(Display *display,Drawable d,GC gc,int x,int y,
112 char *string,int length);
113 extern void XDrawLine(Display *display,Drawable d,GC gc,
114 int x1,int y1,int x2,int y2);
115 extern void XSetStandardProperties(Display *display,Window w,
116 char *window_name,char *icon_name,
117 Pixmap icon_pixmap,char **argv,int argc,
118 XSizeHints *hints);
119 extern int XLookupString(XKeyEvent *event_struct,char *buffer_return,
120 int bytes_buffer,KeySym *keysym_return,
121 XComposeStatus *status_in_out);
122 extern void XSetGraphicsExposures(Display *display,GC gc,
123 Bool graphics_exposures);
124 extern void XMapRaised(Display *display,Window w);
125 extern void XSync(Display *display,Bool discard);
126 extern void XFlush(Display *display);
127 extern void XSetStandardProperties(Display *display,Window w,
128 char *window_name,char *icon_name,
129 Pixmap icon_pixmap,char **argv,int argc,
130 XSizeHints *hints);
131 extern Status XSendEvent(Display *display,Window w,Bool propagate,
132 long event_mask,XEvent *event_send);
133 extern void XFreeGC(Display *display,GC gc);
134 extern void XCloseDisplay(Display *display);
136 extern void XNextEvent(Display *display,XEvent *report);
137 extern Bool XCheckTypedEvent(Display *display,int event_type,
138 XEvent *event_return);
139 extern void XSetForeground(Display *display,GC gc,
140 unsigned long foreground);
141 extern Bool XCheckMaskEvent(Display *display,long event_mask,
142 XEvent *event_return);
144 extern int XResizeWindow(Display *display, Window w,
145 unsigned int width, unsigned int height);
146 extern int XMoveWindow(Display *display, Window w,
147 unsigned int x, unsigned int y);
148 extern void XFreePixmap(Display *display,Pixmap pixmap);
149 extern void XCopyGC(Display *display, GC src, long valuemask,
150 GC dest);
151 extern int XTextWidth(XFontStruct *font_struct, char *string, int count);
152 extern void XSetDashes(Display *display, GC gc, int dash_offset,
153 unsigned char dash_list[], int n);
154 extern void XBell(Display *disp,int volume);
155 extern void XDrawRectangle(Display *disp,Drawable d, GC gc,
156 int x,int y, int w,int h);
157 extern void XFillRectangle(Display *disp,Drawable d, GC gc,
158 int x,int y, int w,int h);
160 extern void XDestroySubwindows(Display *disp, Window Win);
161 extern void XDestroyWindow(Display *disp, Window Win);
162 extern void XQueryPointer(Display *disp,Window Win,Window *root,
163 Window *child,int *root_x,int *root_y,
164 int *win_x,int *win_y, unsigned int *keybut);
165 extern void XWarpPointer(Display *disp, Window src, Window dest,
166 int src_x, int src_y, unsigned int src_w, unsigned int src_h,
167 int dest_x, int dest_y);
168 extern void XGetGeometry(Display *disp, Window w,Window *root,
169 int *x, int *y, unsigned int *width, unsigned int *height,
170 unsigned int *border_width, unsigned int *depth);
171 #endif /* NEED_XSTUFF */
173 #endif /* _Xstuff_h */