1b3307321Smrg/* 2b3307321Smrg 3b3307321SmrgCopyright 1993, 1998 The Open Group 4b3307321Smrg 5b3307321SmrgPermission to use, copy, modify, distribute, and sell this software and its 6b3307321Smrgdocumentation for any purpose is hereby granted without fee, provided that 7b3307321Smrgthe above copyright notice appear in all copies and that both that 8b3307321Smrgcopyright notice and this permission notice appear in supporting 9b3307321Smrgdocumentation. 10b3307321Smrg 11b3307321SmrgThe above copyright notice and this permission notice shall be included 12b3307321Smrgin all copies or substantial portions of the Software. 13b3307321Smrg 14b3307321SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15b3307321SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16b3307321SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17b3307321SmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18b3307321SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19b3307321SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20b3307321SmrgOTHER DEALINGS IN THE SOFTWARE. 21b3307321Smrg 22b3307321SmrgExcept as contained in this notice, the name of The Open Group shall 23b3307321Smrgnot be used in advertising or otherwise to promote the sale, use or 24b3307321Smrgother dealings in this Software without prior written authorization 25b3307321Smrgfrom The Open Group. 26b3307321Smrg 27b3307321Smrg*/ 28b3307321Smrg 29b3307321Smrg/* 30b3307321Smrg * Just_display.h: This file contains the definitions needed to use the 31b3307321Smrg * functions in just_display.c. It also declares the global 32b3307321Smrg * variables dpy, screen, and program_name which are needed to 33b3307321Smrg * use just_display.c. 34b3307321Smrg * 35b3307321Smrg * Written by Mark Lillibridge. Last updated 7/1/87 36b3307321Smrg * 37b3307321Smrg * Send bugs, etc. to chariot@athena.mit.edu. 38b3307321Smrg */ 39b3307321Smrg 40b3307321Smrg /* Simple helper macros */ 41b3307321Smrg#ifndef MAX 42b3307321Smrg#define MAX(a,b) (((a)>(b))?(a):(b)) 43b3307321Smrg#endif /* MAX */ 44b3307321Smrg#ifndef MIN 45b3307321Smrg#define MIN(a,b) (((a)<(b))?(a):(b)) 46b3307321Smrg#endif /* MIN */ 47b3307321Smrg 48b3307321Smrg /* Global variables used by routines in just_display.c */ 49b3307321Smrg 5074a3f230Smrgextern const char *program_name; /* Name of this program */ 51b3307321Smrgextern Display *dpy; /* The current display */ 52b3307321Smrgextern int screen; /* The current screen */ 53b3307321Smrg 5474b97a6cSmrg#define INIT_NAME program_name=argv[0] /* use this in main to setup 5574b97a6cSmrg program_name */ 56b3307321Smrg 5774b97a6cSmrg /* Declarations for functions in just_display.c */ 58b3307321Smrg 59b3307321Smrgchar *Get_Display_Name(int *, char **); 60afe13c8eSmrgDisplay *Open_Display(const char *); 61b3307321Smrgvoid Setup_Display_And_Screen(int *, char **); 62b3307321Smrgvoid Close_Display(void); 63b3307321SmrgWindow Select_Window_Args(int *, char **); 646728f30eSmrgvoid usage(const char *errmsg, int exitval) _X_NORETURN _X_COLD; 65b3307321Smrg 6674b97a6cSmrg#define X_USAGE "[host:display]" /* X arguments handled by 6774b97a6cSmrg Get_Display_Name */ 68b3307321Smrg 69b3307321Smrg/* 70b3307321Smrg * Other_stuff.h: Definitions of routines in other_stuff. 71b3307321Smrg * 72b3307321Smrg * Written by Mark Lillibridge. Last updated 7/1/87 73b3307321Smrg * 74b3307321Smrg * Send bugs, etc. to chariot@athena.mit.edu. 75b3307321Smrg */ 76b3307321Smrg 77afe13c8eSmrgWindow Select_Window(Display *, int); 78afe13c8eSmrgWindow Window_With_Name(Display *, Window, const char *); 7974b97a6cSmrgvoid Fatal_Error(const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) 8074b97a6cSmrg _X_COLD; 8174a3f230Smrgvoid outl(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2); 82