1
/* $Xorg: ddxInit.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */
3
(c) Copyright 1996 Hewlett-Packard Company
4
(c) Copyright 1996 International Business Machines Corp.
5
(c) Copyright 1996 Sun Microsystems, Inc.
6
(c) Copyright 1996 Novell, Inc.
7
(c) Copyright 1996 Digital Equipment Corp.
8
(c) Copyright 1996 Fujitsu Limited
9
(c) Copyright 1996 Hitachi, Ltd.
11
Permission is hereby granted, free of charge, to any person obtaining a copy
12
of this software and associated documentation files (the "Software"), to deal
13
in the Software without restriction, including without limitation the rights
14
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
copies of the Software, and to permit persons to whom the Software is
16
furnished to do so, subject to the following conditions:
18
The above copyright notice and this permission notice shall be included in
19
all copies or substantial portions of the Software.
21
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
Except as contained in this notice, the names of the copyright holders shall
29
not be used in advertising or otherwise to promote the sale, use or other
30
dealings in this Software without prior written authorization from said
34
#ifdef HAVE_DIX_CONFIG_H
35
#include <dix-config.h>
40
#include <X11/Xproto.h>
41
#include "windowstr.h"
46
*-----------------------------------------------------------------------
48
* If this is built as a print-only server, then we must supply
49
* an InitOutput routine. If a normal server's real ddx InitOutput
50
* is used, then it should call PrinterInitOutput if it so desires.
51
* The ddx-level hook is needed to allow the printer stuff to
52
* create additional screens. An extension can't reliably do
53
* this for two reasons:
55
* 1) If InitOutput doesn't create any screens, then main()
56
* exits before calling InitExtensions().
58
* 2) Other extensions may rely on knowing about all screens
59
* when they initialize, and we can't guarantee the order
60
* of extension initialization.
63
* ScreenInfo filled in, and PrinterInitOutput is called to create
64
* the screens associated with printers.
69
*-----------------------------------------------------------------------
74
ScreenInfo *pScreenInfo,
81
pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
82
pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
83
pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
84
pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
86
pScreenInfo->numPixmapFormats = 0; /* get them in PrinterInitOutput */
87
screenInfo.numVideoScreens = 0;
89
#ifdef PRINT_ONLY_SERVER
90
PrinterInitOutput(pScreenInfo, argc, argv);
111
static KeySym printKeyMap[256];
112
static CARD8 printModMap[256];
123
keySyms.minKeyCode = 8;
124
keySyms.maxKeyCode = 8;
125
keySyms.mapWidth = 1;
126
keySyms.map = printKeyMap;
131
InitKeyboardDeviceStruct(pKbd, &keySyms, printModMap,
132
(BellProcPtr)BellProc,
145
#include "../mi/mipointer.h"
153
#define NUM_BUTTONS 1
154
CARD8 map[NUM_BUTTONS];
161
InitPointerDeviceStruct(pPtr, map, NUM_BUTTONS,
162
miPointerGetMotionEvents,
163
(PtrCtrlProcPtr)_XpVoidNoop,
164
miPointerGetMotionBufferSize());
184
ptr = AddInputDevice((DeviceProc)PointerProc, TRUE);
185
kbd = AddInputDevice((DeviceProc)KeyboardProc, TRUE);
186
RegisterPointerDevice(ptr);
187
RegisterKeyboardDevice(kbd);
201
ProcessInputEvents(void)
208
void GlxExtensionInit(void);
209
void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr);
212
DarwinHandleGUI(int argc, char *argv[])
216
void DarwinGlxExtensionInit(void)
221
void DarwinGlxWrapInitVisuals(
222
miInitVisualsProcPtr *procPtr)
224
GlxWrapInitVisuals(procPtr);
235
#ifdef DDXOSFATALERROR
237
OsVendorFatalError(void)
250
GetTimeInMillis(void)
255
return(tp.tv_sec * 1000) + (tp.tv_usec / 1000);
259
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
260
void ddxInitGlobals(void)
262
PrinterInitGlobals();
265
/****************************************
268
* Called my usemsg from os/utils/c
270
*****************************************/
280
void ddxGiveUp(void) /* Called by GiveUp() */
295
#include <X11/extensions/XI.h>
296
#include <X11/extensions/XIproto.h>
299
extern int BadDevice;
302
ChangePointerDevice (
303
DeviceIntPtr old_dev,
304
DeviceIntPtr new_dev,
312
ChangeDeviceControl (
313
register ClientPtr client,
330
AddOtherInputDevices (void)
344
ChangeKeyboardDevice (
345
DeviceIntPtr old_dev,
346
DeviceIntPtr new_dev)
353
register ClientPtr client,
362
register ClientPtr client,
377
XTestJumpPointer(int x, int y, int dev)
383
XTestGetPointerPos(int x, int y)
389
XTestGenerateEvent(int dev, int keycode, int keystate, int x, int y)
394
#endif /* XTESTEXT1 */
398
* This is just to get the server to link on AIX, where some bits
399
* that should be in os/ are instead in hw/ibm.
401
int SelectWaitTime = 10000; /* usec */