1 /* 2 * windInt.h -- 3 * 4 * Internal definitions for the window package. 5 * 6 * ********************************************************************* 7 * * Copyright (C) 1985, 1990 Regents of the University of California. * 8 * * Permission to use, copy, modify, and distribute this * 9 * * software and its documentation for any purpose and without * 10 * * fee is hereby granted, provided that the above copyright * 11 * * notice appear in all copies. The University of California * 12 * * makes no representations about the suitability of this * 13 * * software for any purpose. It is provided "as is" without * 14 * * express or implied warranty. Export of this software outside * 15 * * of the United States of America may require an export license. * 16 * ********************************************************************* 17 * 18 * rcsid $Header$ 19 * 20 */ 21 22 #ifndef _WINDINT_H 23 #define _WINDINT_H 24 25 #include "windows/windows.h" 26 #include "graphics/glyphs.h" 27 28 /* ----------------- data structures ----------------- */ 29 typedef struct WIND_S3 { 30 char *w_clientName; 31 bool (*w_create)(); 32 bool (*w_delete)(); 33 void (*w_redisplay)(); 34 void (*w_command)(); 35 void (*w_update)(); 36 bool (*w_exit)(); 37 void (*w_reposition)(); /* called when a window moves or changes size */ 38 GrGlyph *w_icon; 39 char **w_commandTable; 40 void (**w_functionTable)(); 41 struct WIND_S3 *w_nextClient; 42 } clientRec; 43 44 /* ----------------- variables ----------------- */ 45 extern MagWindow *windTopWindow; 46 extern MagWindow *windBottomWindow; 47 extern clientRec *windFirstClientRec; 48 extern char *butTable[]; 49 extern char *actTable[]; 50 extern bool windPrintCommands; 51 52 /* ----------------- procedures ----------------- */ 53 extern void windDisplayArea(); 54 extern void windPrintCommand(); 55 extern void windSetPoint(); 56 extern void windDump(); 57 extern void windClientInit(); 58 extern MagWindow *windSearchPoint(); 59 60 /* ----------------- constants ----------------- */ 61 62 /* the width of window borders */ 63 extern int windCaptionPixels; 64 #define THIN_LINE ((((w == NULL) ? WindDefaultFlags \ 65 : (w)->w_flags) & WIND_BORDER) ? 2 : 0) 66 #define TOP_BORDER(w) ((((w == NULL) ? WindDefaultFlags \ 67 : (w)->w_flags) & WIND_CAPTION) \ 68 ? windCaptionPixels : 2*THIN_LINE) 69 #define BOT_BORDER(w) ((((w == NULL) ? WindDefaultFlags \ 70 : (w)->w_flags) & WIND_SCROLLBARS) \ 71 ? 2*THIN_LINE + WindScrollBarWidth : 2*THIN_LINE) 72 #define LEFT_BORDER(w) ((((w == NULL) ? WindDefaultFlags \ 73 : (w)->w_flags) & WIND_SCROLLBARS) \ 74 ? 2*THIN_LINE + WindScrollBarWidth : 2*THIN_LINE) 75 #define RIGHT_BORDER(w) 2*THIN_LINE 76 77 /* Always leave room for the borders plus 25 pixels */ 78 #define WIND_MIN_WIDTH (6*THIN_LINE + 3*WindScrollBarWidth + 25) 79 #define WIND_MIN_HEIGHT (windCaptionPixels + 4*THIN_LINE + \ 80 3*WindScrollBarWidth + 25) 81 82 #define DEFAULT_CLIENT "layout" 83 #define WINDOW_CLIENT "*window" 84 85 /* Default size for new windows. */ 86 87 #define CREATE_HEIGHT 300 88 #define CREATE_WIDTH 300 89 90 #endif /* _WINDINT_H */ 91