1 /* 2 * graphicsInt.h -- 3 * 4 * Internal definitions for the graphics module. 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 * 19 * rcsid "$Header: /usr/cvsroot/magic-8.0/graphics/graphicsInt.h,v 1.3 2010/06/24 12:37:18 tim Exp $" 20 */ 21 22 #ifndef _GRAPHICSINT_H 23 #define _GRAPHICSINT_H 24 25 #include "windows/windows.h" 26 #include "utils/magic.h" 27 28 29 extern int grNumBitPlanes; 30 extern int grBitPlaneMask; 31 32 33 /* procedures */ 34 extern void (*grPutTextPtr)(); 35 extern void (*grFontTextPtr)(); /* Vector-drawn text */ 36 extern void (*grSetSPatternPtr)(); 37 extern void (*grDefineCursorPtr)(); 38 extern void (*grFreeCursorPtr)(); 39 extern bool (*grDrawGridPtr)(); 40 extern void (*grDrawLinePtr)(); 41 extern void (*grSetWMandCPtr)(); 42 extern void (*grFillRectPtr)(); 43 extern void (*grSetStipplePtr)(); 44 extern void (*grSetLineStylePtr)(); 45 extern void (*grSetCharSizePtr)(); 46 extern void (*grFillPolygonPtr)(); 47 48 extern char *grFgets(); 49 extern void grSimpleLock(), grSimpleUnlock(); 50 extern void grNoLock(); 51 #define GR_CHECK_LOCK() {if (grLockedWindow == NULL) grNoLock();} 52 53 /* The size of the crosses drawn for degenerate box outlines: */ 54 #define GR_CROSSSIZE 5 55 56 /* This becomes TRUE if we should quit drawing things and return */ 57 extern bool SigInterruptPending; 58 59 /* clipping stuff from GrLock() */ 60 extern MagWindow *grLockedWindow; 61 extern Rect grCurClip; 62 extern LinkedRect *grCurObscure; 63 64 /* Strings used to generate file names for glyphs, colormaps, and 65 * display styles. 66 */ 67 68 extern char *grDStyleType; 69 extern char *grCMapType; 70 extern char *grCursorType; 71 72 /* 73 * Used to pass display-style information to lower levels 74 * of a graphics driver. 75 */ 76 extern int grCurDStyle; 77 78 /* Number of stipples in the style file */ 79 extern int grNumStipples; 80 81 /* Used to setup current color, etc. */ 82 extern bool grDriverInformed; 83 extern void grInformDriver(); 84 85 /* Macro to check for a bogusly small grid. 86 * Turn off grid if gridlines are less than 4 pixels apart. 87 */ 88 #define GRID_TOO_SMALL(x,y) ( \ 89 (((x) >> SUBPIXELBITS) < 4) || (((y) >> SUBPIXELBITS) < 4) \ 90 ) 91 92 #endif /* _GRAPHICSINT_H */ 93