1/*
2
3Copyright 1989, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included
12in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall
23not be used in advertising or otherwise to promote the sale, use or
24other dealings in this Software without prior written authorization
25from The Open Group.
26
27*/
28
29/*
30 *
31 *                                 Global data
32 *
33 * This file should contain only those objects which must be predefined.
34 */
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38#include <X11/Xlibint.h>
39
40/*
41 * Error handlers; used to be in XlibInt.c
42 */
43XErrorHandler   _XErrorFunction;
44XIOErrorHandler _XIOErrorFunction;
45_XQEvent *      _qfree;
46
47
48/*
49 * Debugging information and display list; used to be in XOpenDis.c
50 */
51#ifndef WIN32
52int      _Xdebug;
53#endif
54Display *_XHeadOfDisplayList;
55
56
57#ifdef XTEST1
58/*
59 * Stuff for input synthesis extension:
60 */
61/*
62 * Holds the two event type codes for this extension.  The event type codes
63 * for this extension may vary depending on how many extensions are installed
64 * already, so the initial values given below will be added to the base event
65 * code that is acquired when this extension is installed.
66 *
67 * These two variables must be available to programs that use this extension.
68 */
69int			XTestInputActionType = 0;
70int			XTestFakeAckType   = 1;
71#endif
72
73#ifdef USE_THREAD_SAFETY_CONSTRUCTOR
74__attribute__((constructor)) static void
75xlib_ctor(void)
76{
77    XInitThreads();
78}
79
80__attribute__((destructor)) static void
81xlib_dtor(void)
82{
83    XFreeThreads();
84}
85#endif
86