Debian Codegraph @

install/unix/test/testx11.c

raw symbols SCIP
1 /*===========================================================================
2 Copyright (C) 1995-2008 European Southern Observatory (ESO)
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public
15 License along with this program; if not, write to the Free
16 Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
17 MA 02139, USA.
18
19 Correspondence concerning ESO-MIDAS should be addressed as follows:
20 Internet e-mail: [email protected]
21 Postal address: European Southern Observatory
22 Data Management Division
23 Karl-Schwarzschild-Strasse 2
24 D 85748 Garching bei Muenchen
25 GERMANY
26 ===========================================================================*/
27
28 # include <stdlib.h>
29 # include <stdio.h>
30
31 # include <X11/Xlib.h>
32 # include <X11/Xutil.h>
33 # include <X11/cursorfont.h>
34 # include <X11/keysym.h>
35 /* this is for the Xt toolkit... not needed here
36 # include <X11/Intrinsic.h> */
37
38 main()
39 {
40 /* see above: printf("%d\n",XtSpecificationRelease); */
41 printf("%d\n",XlibSpecificationRelease);
42 exit(0);
43 }
44
45 #ifndef ONLY_INCLUDES
46 int routine()
47 {
48 /*
49 * Some X11 functions extracted from module:
50 * $MIDASHOME/$MIDVERS/system/idiserv/x11/Xtest.c
51 */
52 XOpenDisplay((char*)0);
53 XDefaultVisual((Display*)0,(int)0);
54 XMatchVisualInfo( (Display*)0, (int)0, (int)0, (int)0, (XVisualInfo*)0);
55 XCreateColormap((Display*)0,(Window)0,(Visual*)0,(int)0);
56 XAllocNamedColor((Display*)0,(Colormap)0,(char*)0,(XColor*)0,(XColor*)0);
57 XAllocColorCells( (Display*)0, (Colormap)0, (Bool)0, (unsigned long*)0, (unsigned int)0, (unsigned long*)0, (unsigned int)0 );
58 XQueryColors((Display*)0, (Colormap)0, (XColor*)0, (int)0 );
59
60 XStoreColors((Display*)0,(Colormap)0,(XColor*)0,(int)0 );
61 XFlush((Display*)0);
62 XSetStandardProperties( (Display*)0, (Window)0, (char*)0, (char*)0, (Pixmap)0, (char**)0, (int)0, (XSizeHints*)0);
63 XSetBackground((Display*)0,(GC)0,(unsigned long)0);
64 XSetForeground((Display*)0,(GC)0,(unsigned long)0);
65 XSetPlaneMask((Display*)0,(GC)0,(unsigned long)0);
66 XSetFunction((Display*)0,(GC)0,(int)0);
67 XSync((Display*)0,(Bool)0);
68 XSelectInput((Display*)0,(Window)0,(long)0);
69 XMapRaised ((Display*)0,(Window)0);
70 XWindowEvent((Display*)0, (Window)0, (long)0, (XEvent*)0);
71 XFlush ((Display*)0);
72 XCreateImage( (Display*)0, (Visual*)0, (unsigned int)0, (int)0, (int)0, (char*)0, (unsigned int)0, (unsigned int)0, (int)0, (int)0);
73 XPutImage( (Display*)0, (Drawable)0, (GC)0, (XImage*)0, (int)0, (int)0, (int)0, (int)0, (unsigned int)0, (unsigned int)0 );
74 XCreateGC( (Display*)0, (Drawable)0, (unsigned long)0, (XGCValues*)0 );
75 XInstallColormap( (Display*)0,(Colormap)0);
76 XRecolorCursor( (Display*)0, (Cursor)0, (XColor*)0, (XColor*)0 );
77 XDefineCursor( (Display*)0, (Window)0, (Cursor)0 );
78 XSelectInput( (Display*)0, (Window)0, (long)0 );
79 return 0;
80 }
81 #endif /* ONLY_INCLUDES */