1 #ifndef _MISC_H_ 2 #define _MISC_H_ 3 4 /* 5 * XBoing - An X11 blockout style computer game 6 * 7 * (c) Copyright 1993, 1994, 1995, Justin C. Kibell, All Rights Reserved 8 * 9 * The X Consortium, and any party obtaining a copy of these files from 10 * the X Consortium, directly or indirectly, is granted, free of charge, a 11 * full and unrestricted irrevocable, world-wide, paid up, royalty-free, 12 * nonexclusive right and license to deal in this software and 13 * documentation files (the "Software"), including without limitation the 14 * rights to use, copy, modify, merge, publish, distribute, sublicense, 15 * and/or sell copies of the Software, and to permit persons who receive 16 * copies from any such party to do so. This license includes without 17 * limitation a license to do the foregoing actions under any patents of 18 * the party supplying this software to the X Consortium. 19 * 20 * In no event shall the author be liable to any party for direct, indirect, 21 * special, incidental, or consequential damages arising out of the use of 22 * this software and its documentation, even if the author has been advised 23 * of the possibility of such damage. 24 * 25 * The author specifically disclaims any warranties, including, but not limited 26 * to, the implied warranties of merchantability and fitness for a particular 27 * purpose. The software provided hereunder is on an "AS IS" basis, and the 28 * author has no obligation to provide maintenance, support, updates, 29 * enhancements, or modifications. 30 */ 31 32 /* 33 * ========================================================================= 34 * 35 * $Id: misc.h,v 1.1.1.1 1994/12/16 01:36:53 jck Exp $ 36 * $Source: /usr5/legends/jck/xb/master/xboing/include/misc.h,v $ 37 * $Revision: 1.1.1.1 $ 38 * $Date: 1994/12/16 01:36:53 $ 39 * 40 * $Log: misc.h,v $ 41 * Revision 1.1.1.1 1994/12/16 01:36:53 jck 42 * The XBoing distribution requires configuration management. This is why the 43 * cvs utility is being used. This is the initial import of all source etc.. 44 * 45 * 46 * ========================================================================= 47 */ 48 49 /* 50 * Dependencies on other include files: 51 */ 52 53 #include <X11/Xlib.h> 54 55 /* 56 * Constants and macros: 57 */ 58 59 /* 60 * Type declarations: 61 */ 62 63 /* 64 * Function prototypes: 65 */ 66 67 #if NeedFunctionPrototypes 68 void DrawText(Display *display, Window window, int x, int y, 69 XFontStruct *font, int colour, char *text, int numChar); 70 void DrawTextFast(Display *display, Window window, int x, int y, 71 XFontStruct *font, int colour, char *text, int numChar); 72 void DrawLine(Display *display, Window window, int x, int y, int x2, int y2, 73 int colour, int width); 74 void RenderShape(Display *display, Window window, Pixmap pixmap, 75 Pixmap mask, int x, int y, int w, int h, int clear); 76 void DrawShadowCentredText(Display *display, Window window, 77 XFontStruct *font, char *string, int y, int colour, int width); 78 void DrawShadowText(Display *display, Window window, XFontStruct *font, 79 char *string, int x, int y, int colour); 80 int ColourNameToPixel(Display *display, Colormap colormap, 81 char *colourName); 82 void FreeMisc(Display *display); 83 char *getUsersFullName(void); 84 char *GetHomeDir(void); 85 int ResizeMainWindow(Display *display, Window window, int width, 86 int height); 87 int ObtainWindowWidthHeight(Display *display, Window window, 88 int *width, int *height); 89 void sleepSync(Display *display, unsigned long ms); 90 #ifdef NEED_USLEEP 91 void usleep(unsigned long usec); 92 #endif 93 int ObtainMousePosition(Display *display, Window window, int *x, int *y); 94 int YesNoDialogue(Display *display, char *message); 95 Pixmap ScalePixmap(Display *display, Window window, Pixmap source, 96 int swidth, int sheight, int dwidth, int dheight); 97 void Draw4PointCurve(Display *display, Window window, XPoint *p, 98 int num_steps); 99 #else 100 void Draw4PointCurve(); 101 Pixmap ScalePixmap(); 102 int YesNoDialogue(); 103 int ObtainMousePosition(); 104 void sleepSync(); 105 #ifdef NEED_USLEEP 106 void usleep(); 107 #endif 108 int ObtainWindowWidthHeight(); 109 int ResizeMainWindow(); 110 char *GetHomeDir(); 111 char *getUsersFullName(); 112 void FreeMisc(); 113 int ColourNameToPixel(); 114 void DrawText(); 115 void DrawTextFast(); 116 void DrawLine(); 117 void RenderShape(); 118 void DrawShadowCentredText(); 119 void DrawShadowText(); 120 #endif 121 122 #endif 123