home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************/
- /** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
- /** Salt Lake City, Utah **/
- /** **/
- /** All Rights Reserved **/
- /** **/
- /** Permission to use, copy, modify, and distribute this software and **/
- /** its documentation for any purpose and without fee is hereby **/
- /** granted, provided that the above copyright notice appear in all **/
- /** copies and that both that copyright notice and this permis- **/
- /** sion notice appear in supporting documentation, and that the **/
- /** name of Evans & Sutherland not be used in advertising or publi- **/
- /** city pertaining to distribution of the software without specif- **/
- /** ic, written prior permission. **/
- /** **/
- /** EVANS & SUTHERLAND DISCLAIMS ALL WARRANTIES WITH REGARD TO **/
- /** THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILI- **/
- /** TY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND BE LIABLE **/
- /** FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAM- **/
- /** AGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, **/
- /** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS **/
- /** ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER- **/
- /** FORMANCE OF THIS SOFTWARE. **/
- /*****************************************************************************/
-
- /***********************************************************************
- *
- * $Header: twm.h,v 1.14 88/04/15 07:09:40 tlastran Exp $
- *
- * twm include file
- *
- * 28-Oct-87 Thomas E. LaStrange File created
- *
- ***********************************************************************/
-
- #ifndef _TWM_
- #define _TWM_
-
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- #include <X11/cursorfont.h>
-
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
-
- #define BW 2 /* border width */
-
- #define MAX_BUTTONS 5 /* max mouse buttons supported */
-
- #define TITLE_BAR_SPACE 1 /* 2 pixel space bordering chars */
- #define TITLE_BAR_FONT_HEIGHT 15 /* max of 15 pixel high chars */
- #define TITLE_BAR_HEIGHT (TITLE_BAR_FONT_HEIGHT+(2*TITLE_BAR_SPACE))
-
- /* for each window that is on the display, one of these structures
- * is allocated and linked into a list
- */
- typedef struct TwmWindow
- {
- struct TwmWindow *next; /* next twm window */
- struct TwmWindow *prev; /* previous twm window */
- Window w; /* the child window */
- Window frame; /* the frame window */
- Window title_w; /* the title bar window */
- Window iconify_w; /* the iconify button */
- Window resize_w; /* the resize button */
- Window focus_w; /* the focus window */
- Window hilite_w; /* the hilite window */
- Window icon_w; /* the icon window */
- int frame_x; /* x position of frame */
- int frame_y; /* y position of frame */
- int icon_x; /* icon text x coordinate */
- int icon_y; /* icon text y coordiante */
- int title_height; /* height of the title bar */
- char *full_name; /* full name of the window */
- char *name; /* name of the window */
- char *icon_name; /* name of the icon */
- int name_width; /* width of name text */
- XWindowAttributes attr; /* the child window attributes */
- XSizeHints hints; /* normal hints */
- XWMHints *wmhints; /* WM hints */
- short xterm; /* boolean indicating xterm */
- short iconified; /* has the window ever been iconified? */
- short icon; /* is the window an icon now ? */
- short mapped; /* is the window mapped ? */
- short auto_raise; /* should we auto-raise this window ? */
- } TwmWindow;
-
- extern TwmWindow TwmRoot;
-
- extern Display *dpy;
-
- extern Window Root;
- extern Window VersionWindow;
- extern Window SizeWindow;
- extern Window ResizeWindow;
-
- extern XFontStruct *TitleBarFont;
- extern XFontStruct *MenuFont;
- extern XFontStruct *IconFont;
- extern XFontStruct *SizeFont;
- extern XFontStruct *VersionFont;
-
- extern char *TitleBarFontName;
- extern char *MenuFontName;
- extern char *IconFontName;
- extern char *SizeFontName;
- extern char *VersionFontName;
-
- extern int TitleBarFontHeight;
- extern int MenuFontHeight;
- extern int IconFontHeight;
- extern int SizeFontHeight;
- extern int VersionFontHeight;
-
- extern Cursor ArrowCursor;
- extern Cursor ButtonCursor;
- extern Cursor MoveCursor;
- extern Cursor ClockCursor;
- extern Cursor RightArrowCursor;
-
- extern GC TitleNormalGC;
- extern GC MenuNormalGC;
- extern GC MenuReverseGC;
- extern GC MenuXorGC;
- extern GC IconNormalGC;
- extern GC VersionNormalGC;
- extern GC SizeNormalGC;
- extern GC DrawGC;
-
- extern XContext TwmContext;
- extern XContext MenuContext;
-
- extern int BorderWidth;
- extern unsigned long Foreground;
- extern unsigned long Background;
-
- extern char Version[100];
- extern Pixmap UnknownPm;
- extern int UnknownWidth;
- extern int UnknownHeight;
- extern int FirstTime;
- extern int ReverseVideo;
- extern int FocusRoot;
- extern TwmWindow *Focus;
- extern int WarpCursor;
- extern int ParseError;
-
- extern int TitleButton[MAX_BUTTONS + 1];
-
- extern int TitleBarY;
- extern int TitleBarX;
- extern int MenuY;
-
- extern Window JunkRoot;
- extern Window JunkChild;
- extern int JunkX;
- extern int JunkY;
- extern int JunkWidth;
- extern int JunkHeight;
- extern int JunkDepth;
- extern int JunkBW;
- extern int JunkMask;
-
-
- extern void Done();
- extern void Error();
- extern void Other();
-
- #endif _TWM_
-