1 /* $Xorg: dsimple.h,v 1.4 2001/02/09 02:05:54 xorgcvs Exp $ */
4 Copyright 1993, 1998 The Open Group
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of The Open Group shall
24 not be used in advertising or otherwise to promote the sale, use or
25 other dealings in this Software without prior written authorization
29 /* $XFree86: xc/programs/xlsfonts/dsimple.h,v 1.8 2002/12/24 17:43:01 tsi Exp $ */
32 * Just_display.h: This file contains the definitions needed to use the
33 * functions in just_display.c. It also declares the global
34 * variables dpy, screen, and program_name which are needed to
37 * Written by Mark Lillibridge. Last updated 7/1/87
39 * Send bugs, etc. to chariot@athena.mit.edu.
42 /* Simple helper macros */
44 #define MAX(a,b) (((a)>(b))?(a):(b))
47 #define MIN(a,b) (((a)<(b))?(a):(b))
50 /* Global variables used by routines in just_display.c */
52 extern char *program_name; /* Name of this program */
53 extern Display *dpy; /* The current display */
54 extern int screen; /* The current screen */
55 extern Bool printer_output; /* Video or printer output ? */
56 #ifdef BUILD_PRINTSUPPORT
57 extern XPContext pcontext; /* The current print context */
58 #endif /* BUILD_PRINTSUPPORT */
60 #define INIT_NAME program_name=argv[0] /* use this in main to setup
63 /* Declaritions for functions in just_display.c */
65 char *Malloc(unsigned);
66 char *Realloc(char *, int);
67 char *Get_Display_Name(int *, char **);
68 #ifdef BUILD_PRINTSUPPORT
69 char *Get_Printer_Name(int *, char **);
70 #endif /* BUILD_PRINTSUPPORT */
71 Display *Open_Display(char *);
72 void Setup_Display_And_Screen(int *, char **);
73 void Close_Display(void);
74 XFontStruct *Open_Font(char *);
76 Pixmap ReadBitmapFile(Drawable, char *, int *, int *, int *, int *);
77 void WriteBitmapFile(char *, Pixmap, int, int, int, int);
78 Window Select_Window_Args(int *, char **);
81 #define X_USAGE "[host:display]" /* X arguments handled by
85 * Other_stuff.h: Definitions of routines in other_stuff.
87 * Written by Mark Lillibridge. Last updated 7/1/87
89 * Send bugs, etc. to chariot@athena.mit.edu.
92 unsigned long Resolve_Color(Window, char *);
93 Pixmap Bitmap_To_Pixmap(Display *, Drawable, GC, Pixmap, int, int);
94 Window Select_Window(Display *);
96 Window Window_With_Name(Display *, Window, char *);
98 void Fatal_Error(char *, ...) __attribute__((__noreturn__));
100 void Fatal_Error(char *, ...);
102 void outl(char *, ...);