changed reading hint
[gromacs/adressmacs.git] / src / ngmx / xutil.h
blob77631263bb0c901509a17744685f85bcb078eb74
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Great Red Oystrich Makes All Chemists Sane
30 #ifndef _xutil_h
31 #define _xutil_h
33 static char *SRCID_xutil_h = "$Id$";
35 #ifdef HAVE_IDENT
36 #ident "@(#) xutil.h 1.5 11/11/92"
37 #endif /* HAVE_IDENT */
39 #include "typedefs.h"
40 #include "writeps.h"
41 #include "Xstuff.h"
42 #include "x11.h"
44 #define OFFS_X 4
45 #define OFFS_Y 4
47 typedef struct {
48 Window self,Parent;
49 unsigned long color;
50 char *text;
51 bool bFocus;
52 int x,y,width,height,bwidth;
53 Cursor cursor;
54 } t_windata;
56 extern int CheckWin(Window win,char *file, int line);
58 #define CheckWindow(win) CheckWin(win,__FILE__,__LINE__)
60 extern void LightBorder(Display *disp, Window win, unsigned long color);
62 extern void SpecialTextInRect(t_x11 *x11,XFontStruct *font,Drawable win,
63 char *s,int x,int y,int width,int height,
64 eXPos eX,eYPos eY);
66 extern void TextInRect(t_x11 *x11, Drawable win,
67 char *s, int x, int y, int width, int height,
68 eXPos eX, eYPos eY);
70 extern void TextInWin(t_x11 *x11, t_windata *win, char *s, eXPos eX, eYPos eY);
72 extern void InitWin(t_windata *win, int x0,int y0, int w, int h, int bw, char *text);
74 extern void FreeWin(Display *disp, t_windata *win);
76 extern void ExposeWin(Display *disp,Window win);
78 extern void RectWin(Display *disp, GC gc, t_windata *win, unsigned long color);
80 extern void XDrawRoundRect(Display *disp, Window win, GC gc,
81 int x, int y, int w, int h);
83 extern void RoundRectWin(Display *disp, GC gc, t_windata *win,
84 int offsx, int offsy,unsigned long color);
86 extern void PushMouse(Display *disp, Window dest, int x, int y);
88 extern void PopMouse(Display *disp);
90 extern bool HelpPressed(XEvent *event);
92 extern bool GrabOK(FILE *out, int err);
93 /* Return TRUE if grab succeeded, prints a message to out
94 * and returns FALSE otherwise.
97 #endif /* _xutil_h */