1 /* Copyright (C) 1992-1998 The Geometry Center 2 * Copyright (C) 1998-2000 Stuart Levy, Tamara Munzner, Mark Phillips 3 * 4 * This file is part of Geomview. 5 * 6 * Geomview is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published 8 * by the Free Software Foundation; either version 2, or (at your option) 9 * any later version. 10 * 11 * Geomview is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with Geomview; see the file COPYING. If not, write 18 * to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 19 * USA, or visit http://www.gnu.org. 20 */ 21 22 23 /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */ 24 25 #ifndef WINDOWPDEF 26 #define WINDOWPDEF 27 28 #include <stdarg.h> 29 #include "window.h" 30 31 /* Private definitions for Window package */ 32 33 /* 34 * Private flag bits: 35 * "flag" indicates whether corresponding field valid, 36 * "changed" indicates whether changed since someone last unset "changed". 37 */ 38 #define WNF_ENLARGE 0x01 /* Allow window to be enlarged from pref size*/ 39 #define WNF_SHRINK 0x02 /* Allow window to be shrunk */ 40 #define WNF_NOBORDER 0x04 /* Draw window without frame */ 41 42 #define WNF_HASPREF 0x10 /* Requested position */ 43 #define WNF_HASSIZE 0x20 /* Requested size */ 44 #define WNF_HASVP 0x40 /* Drawing viewport within window */ 45 #define WNF_HASCUR 0x80 /* Window's "current position" */ 46 #define WNF_HASNAME 0x100 /* Window's title */ 47 #define WNF_HASPIXASPECT 0x200 /* pixel aspect ratio? */ 48 49 struct WnWindow { 50 REFERENCEFIELDS; 51 int flag; /* Which fields are set? */ 52 int xsize, ysize; /* Window size */ 53 WnPosition pref; /* Requested abs win position */ 54 WnPosition cur; /* Current position */ 55 WnPosition viewport; /* Relative viewport in win */ 56 char *win_name; /* Window title */ 57 float aspect; /* X/Y Aspect ratio (of cur pos) */ 58 float pixaspect; /* Aspect ratio of hardware pixels */ 59 int changed; /* These fields changed */ 60 }; 61 62 extern WnWindow *_WnSet(WnWindow *, int firstattr, va_list *alist); 63 64 #define WINDOWMAGIC OOGLMagic('w', 1) 65 66 #endif /* WINDOWPDEF */ 67 68 /* 69 * Local Variables: *** 70 * mode: c *** 71 * c-basic-offset: 4 *** 72 * End: *** 73 */ 74