First import
[xorg_rtime.git] / xorg-server-1.4 / hw / darwin / iokit / xfIOKitStartup.c
blob07e8c2181e5bb073a65d6d3a47ae56ef190bb8eb
1 /**************************************************************
3 * Startup code for the IOKit Darwin X Server
5 **************************************************************/
6 /*
7 * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
27 * Except as contained in this notice, the name(s) of the above copyright
28 * holders shall not be used in advertising or otherwise to promote the sale,
29 * use or other dealings in this Software without prior written authorization.
33 #if HAVE_XORG_CONFIG_H
34 #include <xorg-config.h>
35 #endif
37 #include "darwin.h"
38 #include "darwinKeyboard.h"
39 #include "micmap.h"
41 void GlxExtensionInit(void);
42 void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr);
46 * DarwinHandleGUI
47 * This function is called first from main().
48 * It does nothing for the IOKit X server.
50 void DarwinHandleGUI(
51 int argc,
52 char *argv[],
53 char *envp[] )
59 * DarwinGlxExtensionInit
60 * Initialize the GLX extension.
61 * Mesa is linked into the IOKit mode X server so we just call directly.
63 void DarwinGlxExtensionInit(void)
65 #ifdef GLXEXT
66 GlxExtensionInit();
67 #endif
72 * DarwinGlxWrapInitVisuals
74 void DarwinGlxWrapInitVisuals(
75 miInitVisualsProcPtr *procPtr)
77 #ifdef GLXEXT
78 GlxWrapInitVisuals(procPtr);
79 #endif
84 * DarwinModeProcessArgument
85 * Process IOKit specific command line arguments.
87 int DarwinModeProcessArgument(
88 int argc,
89 char *argv[],
90 int i)
92 #ifdef DARWIN_WITH_QUARTZ
93 // XDarwinStartup uses these arguments to indicate which X server
94 // should be started. Ignore them here.
95 if (!strcmp( argv[i], "-fullscreen" ) ||
96 !strcmp( argv[i], "-rootless" ) ||
97 !strcmp( argv[i], "-quartz" ))
99 return 1;
101 #else
102 if (!strcmp( argv[i], "-fullscreen" ) ||
103 !strcmp( argv[i], "-rootless" ) ||
104 !strcmp( argv[i], "-quartz" ))
106 FatalError("Command line option %s is not available without Quartz "
107 "support.\n", argv[i]);
109 #endif
111 return 0;
116 * DarwinModeSystemKeymapSeed
117 * Changes to NXKeyMapping are not tracked.
119 unsigned int
120 DarwinModeSystemKeymapSeed(void)
122 return 0;
127 * DarwinModeReadSystemKeymap
128 * IOKit has no alternative to NXKeyMapping API.
130 Bool DarwinModeReadSystemKeymap(
131 darwinKeyboardInfo *info)
133 return FALSE;