1ff7e0accSmrg/* 2ff7e0accSmrg 3ff7e0accSmrgCopyright 1993, 1998 The Open Group 4ff7e0accSmrg 5ff7e0accSmrgPermission to use, copy, modify, distribute, and sell this software and its 6ff7e0accSmrgdocumentation for any purpose is hereby granted without fee, provided that 7ff7e0accSmrgthe above copyright notice appear in all copies and that both that 8ff7e0accSmrgcopyright notice and this permission notice appear in supporting 9ff7e0accSmrgdocumentation. 10ff7e0accSmrg 11ff7e0accSmrgThe above copyright notice and this permission notice shall be included 12ff7e0accSmrgin all copies or substantial portions of the Software. 13ff7e0accSmrg 14ff7e0accSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15ff7e0accSmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16ff7e0accSmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17ff7e0accSmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18ff7e0accSmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19ff7e0accSmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20ff7e0accSmrgOTHER DEALINGS IN THE SOFTWARE. 21ff7e0accSmrg 22ff7e0accSmrgExcept as contained in this notice, the name of The Open Group shall 23ff7e0accSmrgnot be used in advertising or otherwise to promote the sale, use or 24ff7e0accSmrgother dealings in this Software without prior written authorization 25ff7e0accSmrgfrom The Open Group. 26ff7e0accSmrg 27ff7e0accSmrg*/ 28ff7e0accSmrg 29ff7e0accSmrg/* 30863f95b1Smrg * dsimple.h: This file contains the definitions needed to use the 31863f95b1Smrg * functions in dsimple.c. It also declares the global 32863f95b1Smrg * variable program_name which is needed to use dsimple.c. 33ff7e0accSmrg * 34863f95b1Smrg * Written by Mark Lillibridge for Xlib. Last updated 7/1/87 35863f95b1Smrg * Ported to XCB over two decades later. 36ff7e0accSmrg */ 37ff7e0accSmrg 38863f95b1Smrg#include <X11/Xfuncproto.h> 39863f95b1Smrg#include <xcb/xcb.h> 40863f95b1Smrg#include <xcb/xproto.h> 41863f95b1Smrg 42863f95b1Smrgtypedef enum { False = 0, True } Bool; 43ff7e0accSmrg 44ff7e0accSmrg /* Global variables used by routines in dsimple.c */ 45ff7e0accSmrg 4605bee9bcSmrgextern const char *program_name; /* Name of this program */ 47ff7e0accSmrg 48863f95b1Smrg /* Declarations for functions in dsimple.c */ 49ff7e0accSmrg 50863f95b1Smrgconst char *Get_Display_Name (const char *displayname); 51863f95b1Smrgvoid Setup_Display_And_Screen (const char *displayname, 52863f95b1Smrg xcb_connection_t **dpy, xcb_screen_t **screen); 53ff7e0accSmrg 54863f95b1Smrgxcb_window_t Select_Window (xcb_connection_t *, const xcb_screen_t *, int); 55863f95b1Smrgxcb_window_t Window_With_Name (xcb_connection_t *, xcb_window_t, const char *); 56ff7e0accSmrg 570c91c449Smrgvoid Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) _X_COLD; 58ff7e0accSmrg 59863f95b1Smrgvoid Print_X_Error (xcb_connection_t *, xcb_generic_error_t *); 60ff7e0accSmrg 61863f95b1Smrgstruct atom_cache_entry *Intern_Atom (xcb_connection_t *, const char *); 62863f95b1Smrgxcb_atom_t Get_Atom (xcb_connection_t *, const char *); 63863f95b1Smrgconst char *Get_Atom_Name (xcb_connection_t *, xcb_atom_t); 64