2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014,2019, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
41 /* The altivec extensions for ppc define some stupid overlapping
42 * macros like pixel and vector - turn them off here, we only
43 * need them in the inner loops.
50 #include <X11/Xresource.h>
51 #include <X11/Xutil.h>
52 #include <X11/cursorfont.h>
53 #include <X11/keysym.h>
56 typedef unsigned char bmchar;
61 #define XTextHeight(font) ((font)->max_bounds.ascent + (font)->max_bounds.descent)
62 #define XDrawCircle(disp, win, gc, x, y, rad) \
63 XDrawArc(disp, win, gc, (x) - (rad), (y) - (rad), 2 * (rad), 2 * (rad), 0, 64 * 360)
64 #define XFillCircle(disp, win, gc, x, y, rad) \
65 XFillArc(disp, win, gc, (x) - (rad), (y) - (rad), 2 * (rad), 2 * (rad), 0, 64 * 360)
69 extern void XSelectInput(Display* display, Window w, long event_mask);
70 extern void XChangeWindowAttributes(Display* display,
72 unsigned long valuemask,
73 XSetWindowAttributes* attributes);
74 extern void XSetWindowBackgroundPixmap(Display* disp, Drawable d, Pixmap pm);
75 extern Status XMatchVisualInfo(Display* display, int screen, int depth, int class, XVisualInfo* vinfo_return);
76 extern Status XParseColor(Display* display, Colormap colormap, char* spec, XColor* exact_def_return);
77 extern Status XAllocColor(Display* display, Colormap colormap, XColor* screen_in_out);
78 extern Status XAllocNamedColor(Display* disp, Colormap cmap, char* colorname, XColor* colorcell_def, XColor* rgb_db_def);
79 extern Status XQueryColor(Display* disp, Colormap cmap, XColor* colorcell_def);
80 extern void XDrawArc(Display* display,
89 extern void XFillArc(Display* display,
98 extern void XDrawLine(Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2);
99 extern void XDrawLines(Display* display, Drawable d, GC gc, XPoint* points, int npoints, int mode);
101 extern void XMapWindow(Display* display, Window w);
102 extern void XMapSubwindows(Display* display, Window w);
103 extern void XUnmapSubwindows(Display* display, Window w);
104 extern void XUnmapWindow(Display* display, Window w);
106 extern void XNextEvent(Display* display, XEvent* report);
107 extern Bool XCheckTypedEvent(Display* display, int event_type, XEvent* event_return);
108 extern void XSetForeground(Display* display, GC gc, unsigned long foreground);
109 extern void XClearWindow(Display* disp, Window w);
110 extern void XClearArea(Display* display, Window w, int x, int y, unsigned int width, unsigned int height, Bool exposures);
111 extern void XDrawRectangle(Display* display, Drawable d, GC gc, int x, int y, int width, int height);
112 extern void XDrawRectangles(Display* display, Drawable d, GC gc, XRectangle rectangles[], int nrectangles);
113 extern void XDrawString(Display* display, Drawable d, GC gc, int x, int y, char* string, int length);
114 extern void XDrawLine(Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2);
115 extern void XSetStandardProperties(Display* display,
123 extern int XLookupString(XKeyEvent* event_struct,
126 KeySym* keysym_return,
127 XComposeStatus* status_in_out);
128 extern void XSetGraphicsExposures(Display* display, GC gc, Bool graphics_exposures);
129 extern void XMapRaised(Display* display, Window w);
130 extern void XSync(Display* display, Bool discard);
131 extern void XFlush(Display* display);
132 extern void XSetStandardProperties(Display* display,
140 extern Status XSendEvent(Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send);
141 extern void XFreeGC(Display* display, GC gc);
142 extern void XCloseDisplay(Display* display);
144 extern void XNextEvent(Display* display, XEvent* report);
145 extern Bool XCheckTypedEvent(Display* display, int event_type, XEvent* event_return);
146 extern void XSetForeground(Display* display, GC gc, unsigned long foreground);
147 extern Bool XCheckMaskEvent(Display* display, long event_mask, XEvent* event_return);
149 extern int XResizeWindow(Display* display, Window w, unsigned int width, unsigned int height);
150 extern int XMoveWindow(Display* display, Window w, unsigned int x, unsigned int y);
151 extern void XFreePixmap(Display* display, Pixmap pixmap);
152 extern void XCopyGC(Display* display, GC src, long valuemask, GC dest);
153 extern int XTextWidth(XFontStruct* font_struct, char* string, int count);
154 extern void XSetDashes(Display* display, GC gc, int dash_offset, unsigned char dash_list[], int n);
155 extern void XBell(Display* disp, int volume);
156 extern void XDrawRectangle(Display* disp, Drawable d, GC gc, int x, int y, int w, int h);
157 extern void XFillRectangle(Display* disp, Drawable d, GC gc, int x, int y, int w, int h);
159 extern void XDestroySubwindows(Display* disp, Window Win);
160 extern void XDestroyWindow(Display* disp, Window Win);
161 extern void XQueryPointer(Display* disp,
169 unsigned int* keybut);
170 extern void XWarpPointer(Display* disp,
179 extern void XGetGeometry(Display* disp,
185 unsigned int* height,
186 unsigned int* border_width,
187 unsigned int* depth);
188 #endif /* NEED_XSTUFF */
190 #endif /* _Xstuff_h */