2 (c) Copyright 1996 Hewlett-Packard Company
3 (c) Copyright 1996 International Business Machines Corp.
4 (c) Copyright 1996 Sun Microsystems, Inc.
5 (c) Copyright 1996 Novell, Inc.
6 (c) Copyright 1996 Digital Equipment Corp.
7 (c) Copyright 1996 Fujitsu Limited
8 (c) Copyright 1996 Hitachi, Ltd.
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 Except as contained in this notice, the names of the copyright holders shall
28 not be used in advertising or otherwise to promote the sale, use or other
29 dealings in this Software without prior written authorization from said
33 #ifdef HAVE_DIX_CONFIG_H
34 #include <dix-config.h>
39 #include <X11/Xproto.h>
40 #include "windowstr.h"
45 *-----------------------------------------------------------------------
47 * If this is built as a print-only server, then we must supply
48 * an InitOutput routine. If a normal server's real ddx InitOutput
49 * is used, then it should call PrinterInitOutput if it so desires.
50 * The ddx-level hook is needed to allow the printer stuff to
51 * create additional screens. An extension can't reliably do
52 * this for two reasons:
54 * 1) If InitOutput doesn't create any screens, then main()
55 * exits before calling InitExtensions().
57 * 2) Other extensions may rely on knowing about all screens
58 * when they initialize, and we can't guarantee the order
59 * of extension initialization.
62 * ScreenInfo filled in, and PrinterInitOutput is called to create
63 * the screens associated with printers.
68 *-----------------------------------------------------------------------
73 ScreenInfo
*pScreenInfo
,
78 pScreenInfo
->imageByteOrder
= IMAGE_BYTE_ORDER
;
79 pScreenInfo
->bitmapScanlineUnit
= BITMAP_SCANLINE_UNIT
;
80 pScreenInfo
->bitmapScanlinePad
= BITMAP_SCANLINE_PAD
;
81 pScreenInfo
->bitmapBitOrder
= BITMAP_BIT_ORDER
;
83 pScreenInfo
->numPixmapFormats
= 0; /* get them in PrinterInitOutput */
84 screenInfo
.numVideoScreens
= 0;
86 #ifdef PRINT_ONLY_SERVER
87 PrinterInitOutput(pScreenInfo
, argc
, argv
);
93 DDXRingBell(int volume
, int pitch
, int duration
)
95 /* dummy func; link fails without */
114 static KeySym printKeyMap
[256];
115 static CARD8 printModMap
[256];
126 keySyms
.minKeyCode
= 8;
127 keySyms
.maxKeyCode
= 8;
128 keySyms
.mapWidth
= 1;
129 keySyms
.map
= printKeyMap
;
134 InitKeyboardDeviceStruct(pKbd
, &keySyms
, printModMap
,
135 (BellProcPtr
)BellProc
,
148 #include "../mi/mipointer.h"
156 #define NUM_BUTTONS 1
157 CARD8 map
[NUM_BUTTONS
];
164 InitPointerDeviceStruct(pPtr
, map
, NUM_BUTTONS
,
166 (PtrCtrlProcPtr
)_XpVoidNoop
,
167 GetMotionHistorySize(), 2);
185 DeviceIntPtr ptr
, kbd
;
187 ptr
= AddInputDevice((DeviceProc
)PointerProc
, TRUE
);
188 kbd
= AddInputDevice((DeviceProc
)KeyboardProc
, TRUE
);
189 RegisterPointerDevice(ptr
);
190 RegisterKeyboardDevice(kbd
);
204 ProcessInputEvents(void)
211 void GlxExtensionInit(void);
212 void GlxWrapInitVisuals(miInitVisualsProcPtr
*procPtr
);
215 DarwinHandleGUI(int argc
, char *argv
[])
219 void DarwinGlxExtensionInit(void)
224 void DarwinGlxWrapInitVisuals(
225 miInitVisualsProcPtr
*procPtr
)
227 GlxWrapInitVisuals(procPtr
);
238 #ifdef DDXOSFATALERROR
240 OsVendorFatalError(void)
245 #ifdef DDXBEFORERESET
253 /* ddxInitGlobals - called by |InitGlobals| from os/util.c */
254 void ddxInitGlobals(void)
256 PrinterInitGlobals();
259 /****************************************
262 * Called my usemsg from os/utils/c
264 *****************************************/
274 void ddxGiveUp(void) /* Called by GiveUp() */
289 #include <X11/extensions/XI.h>
290 #include <X11/extensions/XIproto.h>
292 #include "exglobals.h"
295 ChangePointerDevice (
296 DeviceIntPtr old_dev
,
297 DeviceIntPtr new_dev
,
305 ChangeDeviceControl (
306 register ClientPtr client
,
323 AddOtherInputDevices (void)
337 ChangeKeyboardDevice (
338 DeviceIntPtr old_dev
,
339 DeviceIntPtr new_dev
)
346 register ClientPtr client
,
355 register ClientPtr client
,
369 * This is just to get the server to link on AIX, where some bits
370 * that should be in os/ are instead in hw/ibm.
372 int SelectWaitTime
= 10000; /* usec */