summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-03 17:04:54 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-03 17:04:54 +1030
commit8da83836b60f7cdb75d08482f4311fa0e2ab4e1d (patch)
tree092efcfc39e3e293baaf04c4c84027ee453d3e13 /hw
parenteace88989c3b65d5c20e9f37ea9b23c7c8e19335 (diff)
parentae869fc7669764729e13fdd70149ed636753f2a3 (diff)
Merge branch 'master' into mpx
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
Diffstat (limited to 'hw')
-rw-r--r--hw/Makefile.am16
-rw-r--r--hw/darwin/Makefile.am290
-rw-r--r--hw/darwin/README.apple35
-rw-r--r--hw/darwin/XDarwin.man203
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/entries65
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/format1
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base5
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base318
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base18
-rw-r--r--hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-basebin30865 -> 0 bytes
-rw-r--r--hw/darwin/apple/X11.xcodeproj/project.pbxproj320
-rw-r--r--hw/darwin/apple/bundle-main.c901
-rw-r--r--hw/darwin/bundle/Dutch.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/Dutch.lproj/Localizable.stringsbin1426 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nibbin22024 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Dutch.lproj/Makefile.am35
-rw-r--r--hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp101
-rw-r--r--hw/darwin/bundle/English.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp4
-rw-r--r--hw/darwin/bundle/English.lproj/Localizable.strings22
-rw-r--r--hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nibbin20829 -> 0 bytes
-rw-r--r--hw/darwin/bundle/English.lproj/Makefile.am35
-rw-r--r--hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp94
-rw-r--r--hw/darwin/bundle/French.lproj/Credits.rtf166
-rw-r--r--hw/darwin/bundle/French.lproj/Localizable.stringsbin1492 -> 0 bytes
-rw-r--r--hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nibbin21114 -> 0 bytes
-rw-r--r--hw/darwin/bundle/French.lproj/Makefile.am38
-rw-r--r--hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp99
-rw-r--r--hw/darwin/bundle/German.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/German.lproj/Localizable.stringsbin1458 -> 0 bytes
-rw-r--r--hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nibbin21182 -> 0 bytes
-rw-r--r--hw/darwin/bundle/German.lproj/Makefile.am36
-rw-r--r--hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp94
-rw-r--r--hw/darwin/bundle/Info.plist66
-rw-r--r--hw/darwin/bundle/Japanese.lproj/Credits.rtf193
-rw-r--r--hw/darwin/bundle/Japanese.lproj/Localizable.stringsbin1152 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nibbin21854 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Japanese.lproj/Makefile.am37
-rw-r--r--hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp141
-rw-r--r--hw/darwin/bundle/Makefile.am38
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/Credits.rtf171
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/Localizable.stringsbin1504 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nibbin21112 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/Makefile.am36
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp209
-rw-r--r--hw/darwin/bundle/Spanish.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/Spanish.lproj/Localizable.stringsbin1480 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nibbin20952 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Spanish.lproj/Makefile.am36
-rw-r--r--hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp109
-rw-r--r--hw/darwin/bundle/Swedish.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/Swedish.lproj/Localizable.stringsbin1464 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nibbin20858 -> 0 bytes
-rw-r--r--hw/darwin/bundle/Swedish.lproj/Makefile.am36
-rw-r--r--hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp101
-rw-r--r--hw/darwin/bundle/XDarwin.icnsbin69465 -> 0 bytes
-rw-r--r--hw/darwin/bundle/ko.lproj/Credits.rtf168
-rw-r--r--hw/darwin/bundle/ko.lproj/Localizable.stringsbin1332 -> 0 bytes
-rw-r--r--hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib72
-rw-r--r--hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nibbin21433 -> 0 bytes
-rw-r--r--hw/darwin/bundle/ko.lproj/Makefile.am37
-rw-r--r--hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp94
-rw-r--r--hw/darwin/bundle/startXClients.cpp22
-rw-r--r--hw/darwin/iokit/Makefile.am17
-rw-r--r--hw/darwin/iokit/xfIOKit.c773
-rw-r--r--hw/darwin/iokit/xfIOKit.h56
-rw-r--r--hw/darwin/iokit/xfIOKitCursor.c736
-rw-r--r--hw/darwin/iokit/xfIOKitStartup.c131
-rw-r--r--hw/darwin/quartz/Makefile.am54
-rw-r--r--hw/darwin/quartz/Preferences.h137
-rw-r--r--hw/darwin/quartz/Preferences.m598
-rw-r--r--hw/darwin/quartz/XApplication.h46
-rw-r--r--hw/darwin/quartz/XApplication.m46
-rw-r--r--hw/darwin/quartz/XDarwin.pbproj/project.pbxproj2519
-rw-r--r--hw/darwin/quartz/XDarwinStartup.c163
-rw-r--r--hw/darwin/quartz/XDarwinStartup.man74
-rw-r--r--hw/darwin/quartz/XServer.h136
-rw-r--r--hw/darwin/quartz/XServer.m1538
-rw-r--r--hw/darwin/quartz/cr/XView.m74
-rw-r--r--hw/darwin/quartz/cr/cr.h61
-rw-r--r--hw/darwin/quartz/cr/crAppleWM.m157
-rw-r--r--hw/darwin/quartz/cr/crFrame.m438
-rw-r--r--hw/darwin/quartz/cr/crScreen.m380
-rw-r--r--hw/darwin/quartz/fullscreen/fullscreen.c569
-rw-r--r--hw/darwin/quartz/fullscreen/quartzCursor.c654
-rw-r--r--hw/darwin/quartz/quartzStartup.c353
-rw-r--r--hw/darwin/quartz/xpr/Xplugin.h589
-rw-r--r--hw/darwin/utils/Makefile.am11
-rw-r--r--hw/darwin/utils/README.txt111
-rw-r--r--hw/darwin/utils/dumpkeymap.c1453
-rw-r--r--hw/darwin/utils/dumpkeymap.man1004
-rw-r--r--hw/dmx/dmxcmap.c14
-rw-r--r--hw/dmx/dmxcmap.h9
-rw-r--r--hw/dmx/dmxcursor.c8
-rw-r--r--hw/dmx/dmxcursor.h7
-rw-r--r--hw/dmx/dmxdpms.c9
-rw-r--r--hw/dmx/dmxfont.c7
-rw-r--r--hw/dmx/dmxgc.c6
-rw-r--r--hw/dmx/dmxgc.h4
-rw-r--r--hw/dmx/dmxpict.c3
-rw-r--r--hw/dmx/dmxpict.h10
-rw-r--r--hw/dmx/dmxpixmap.c6
-rw-r--r--hw/dmx/dmxpixmap.h4
-rw-r--r--hw/dmx/dmxscrinit.c46
-rw-r--r--hw/dmx/dmxscrinit.h2
-rw-r--r--hw/dmx/dmxwindow.c3
-rw-r--r--hw/dmx/dmxwindow.h6
-rw-r--r--hw/dmx/input/dmxconsole.c13
-rw-r--r--hw/dmx/input/dmxeq.c4
-rw-r--r--hw/kdrive/ati/ati_stub.c9
-rw-r--r--hw/kdrive/ephyr/Makefile.am62
-rw-r--r--hw/kdrive/ephyr/ephyr.c4
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c43
-rw-r--r--hw/kdrive/fbdev/fbinit.c12
-rw-r--r--hw/kdrive/savage/s3draw.c17
-rw-r--r--hw/kdrive/savage/s3draw.h18
-rw-r--r--hw/kdrive/src/kaa.c24
-rw-r--r--hw/kdrive/src/kaa.h13
-rw-r--r--hw/kdrive/src/kdrive.c20
-rw-r--r--hw/kdrive/src/kdrive.h8
-rw-r--r--hw/kdrive/src/kxv.c44
-rw-r--r--hw/kdrive/vesa/vesainit.c10
-rw-r--r--hw/kdrive/vxworks/vxkbd.c2
-rw-r--r--hw/vfb/InitOutput.c2
-rw-r--r--hw/xfree86/common/Makefile.am7
-rw-r--r--hw/xfree86/common/modeline2c.awk97
-rw-r--r--hw/xfree86/common/modeline2c.pl107
-rw-r--r--hw/xfree86/common/xf86.h11
-rw-r--r--hw/xfree86/common/xf86AutoConfig.c22
-rw-r--r--hw/xfree86/common/xf86Bus.c29
-rw-r--r--hw/xfree86/common/xf86Bus.h1
-rw-r--r--hw/xfree86/common/xf86Config.c32
-rw-r--r--hw/xfree86/common/xf86Configure.c29
-rw-r--r--hw/xfree86/common/xf86DGA.c44
-rw-r--r--hw/xfree86/common/xf86DPMS.c48
-rw-r--r--hw/xfree86/common/xf86DefModes.c155
-rw-r--r--hw/xfree86/common/xf86Events.c6
-rw-r--r--hw/xfree86/common/xf86Globals.c8
-rw-r--r--hw/xfree86/common/xf86Helper.c17
-rw-r--r--hw/xfree86/common/xf86Init.c32
-rw-r--r--hw/xfree86/common/xf86Mode.c48
-rw-r--r--hw/xfree86/common/xf86Module.h4
-rw-r--r--hw/xfree86/common/xf86PM.c2
-rw-r--r--hw/xfree86/common/xf86Priv.h2
-rw-r--r--hw/xfree86/common/xf86RandR.c20
-rw-r--r--hw/xfree86/common/xf86VidMode.c27
-rw-r--r--hw/xfree86/common/xf86Xinput.c1
-rw-r--r--hw/xfree86/common/xf86cmap.c122
-rw-r--r--hw/xfree86/common/xf86fbman.c148
-rw-r--r--hw/xfree86/common/xf86sbusBus.c13
-rw-r--r--hw/xfree86/common/xf86str.h1
-rw-r--r--hw/xfree86/common/xf86xv.c45
-rw-r--r--hw/xfree86/common/xf86xvmc.c20
-rw-r--r--hw/xfree86/common/xf86xvpriv.h3
-rw-r--r--hw/xfree86/ddc/ddcProperty.c1
-rw-r--r--hw/xfree86/dixmods/extmod/modinit.h5
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga2.c30
-rw-r--r--hw/xfree86/dixmods/extmod/xf86misc.c40
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c43
-rw-r--r--hw/xfree86/dixmods/extmod/xvmod.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xvmodproc.h2
-rw-r--r--hw/xfree86/dixmods/xkbKillSrv.c4
-rw-r--r--hw/xfree86/doc/man/xorg.conf.man.pre4
-rw-r--r--hw/xfree86/dri/dri.c52
-rw-r--r--hw/xfree86/dri/dristruct.h22
-rw-r--r--hw/xfree86/exa/exa.man.pre6
-rw-r--r--hw/xfree86/exa/examodule.c26
-rw-r--r--hw/xfree86/loader/dixsym.c64
-rw-r--r--hw/xfree86/loader/loadmod.c2
-rw-r--r--hw/xfree86/loader/misym.c4
-rw-r--r--hw/xfree86/loader/xf86sym.c195
-rw-r--r--hw/xfree86/modes/xf86Crtc.c82
-rw-r--r--hw/xfree86/modes/xf86Cursors.c5
-rw-r--r--hw/xfree86/modes/xf86EdidModes.c9
-rw-r--r--hw/xfree86/modes/xf86Modes.c69
-rw-r--r--hw/xfree86/modes/xf86Modes.h5
-rw-r--r--hw/xfree86/modes/xf86RandR12.c60
-rw-r--r--hw/xfree86/os-support/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bsd/Makefile.am1
-rw-r--r--hw/xfree86/os-support/bsd/alpha_video.c2
-rw-r--r--hw/xfree86/os-support/bsd/arm_video.c2
-rw-r--r--hw/xfree86/os-support/bsd/i386_video.c2
-rw-r--r--hw/xfree86/os-support/bus/Pci.h2
-rw-r--r--hw/xfree86/os-support/bus/Sbus.c4
-rw-r--r--hw/xfree86/os-support/bus/sparcPci.c2
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.c2
-rw-r--r--hw/xfree86/os-support/hurd/Makefile.am1
-rw-r--r--hw/xfree86/os-support/hurd/hurd_video.c4
-rw-r--r--hw/xfree86/os-support/linux/Makefile.am1
-rw-r--r--hw/xfree86/os-support/misc/Delay.c2
-rw-r--r--hw/xfree86/os-support/shared/bios_mmap.c4
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c2123
-rw-r--r--hw/xfree86/os-support/solaris/Makefile.am1
-rw-r--r--hw/xfree86/os-support/solaris/sun_bios.c6
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c11
-rw-r--r--hw/xfree86/os-support/solaris/sun_mouse.c14
-rw-r--r--hw/xfree86/os-support/solaris/sun_vid.c12
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h21
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h314
-rw-r--r--hw/xfree86/os-support/xf86_libc.h721
-rw-r--r--hw/xfree86/parser/Flags.c3
-rw-r--r--hw/xfree86/parser/Screen.c13
-rw-r--r--hw/xfree86/parser/cpconfig.c2
-rw-r--r--hw/xfree86/parser/scan.c12
-rw-r--r--hw/xfree86/parser/xf86Parser.h1
-rw-r--r--hw/xfree86/rac/xf86RAC.c68
-rw-r--r--hw/xfree86/ramdac/xf86Cursor.c78
-rw-r--r--hw/xfree86/ramdac/xf86CursorPriv.h2
-rw-r--r--hw/xfree86/ramdac/xf86HWCurs.c20
-rw-r--r--hw/xfree86/shadowfb/shadow.c20
-rw-r--r--hw/xfree86/utils/xorgcfg/Makefile.am1
-rw-r--r--hw/xfree86/utils/xorgcfg/config.h1
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c2
-rw-r--r--hw/xfree86/xaa/xaaDashLine.c3
-rw-r--r--hw/xfree86/xaa/xaaGC.c3
-rw-r--r--hw/xfree86/xaa/xaaGCmisc.c3
-rw-r--r--hw/xfree86/xaa/xaaInit.c45
-rw-r--r--hw/xfree86/xaa/xaaLineMisc.c3
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c15
-rw-r--r--hw/xfree86/xaa/xaaStateChange.c15
-rw-r--r--hw/xfree86/xaa/xaaWrapper.c31
-rw-r--r--hw/xfree86/xaa/xaalocal.h22
-rw-r--r--hw/xfree86/xaa/xaawrap.h14
-rw-r--r--hw/xfree86/xf4bpp/mfbfillarc.c3
-rw-r--r--hw/xfree86/xf4bpp/mfbimggblt.c3
-rw-r--r--hw/xfree86/xf4bpp/mfbzerarc.c3
-rw-r--r--hw/xfree86/xf4bpp/ppcArea.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcGC.c10
-rw-r--r--hw/xfree86/xf4bpp/ppcPixFS.c24
-rw-r--r--hw/xfree86/xf4bpp/ppcPixmap.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcPolyPnt.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcWinFS.c24
-rw-r--r--hw/xfree86/xf4bpp/vgaGC.c2
-rw-r--r--hw/xfree86/xf8_32bpp/cfb8_32.h14
-rw-r--r--hw/xfree86/xf8_32bpp/cfbscrinit.c33
-rw-r--r--hw/xfree86/xf8_32bpp/xf86overlay.c35
-rw-r--r--hw/xgl/egl/kinput.c2
-rw-r--r--hw/xgl/egl/xegl.c20
-rw-r--r--hw/xgl/egl/xegl.h6
-rw-r--r--hw/xgl/glx/xglx.c26
-rw-r--r--hw/xgl/xgl.h33
-rw-r--r--hw/xgl/xglinput.c2
-rw-r--r--hw/xgl/xglpixmap.c2
-rw-r--r--hw/xgl/xglscreen.c3
-rw-r--r--hw/xgl/xglxv.c8
-rw-r--r--hw/xnest/Cursor.c6
-rw-r--r--hw/xnest/GC.c2
-rw-r--r--hw/xnest/Init.c4
-rw-r--r--hw/xnest/Makefile.am3
-rw-r--r--hw/xnest/Pixmap.c9
-rw-r--r--hw/xnest/Screen.c20
-rw-r--r--hw/xnest/Window.c2
-rw-r--r--hw/xnest/XNCursor.h9
-rw-r--r--hw/xnest/XNGC.h6
-rw-r--r--hw/xnest/XNPixmap.h6
-rw-r--r--hw/xnest/XNWindow.h6
-rw-r--r--hw/xprint/Makefile.am2
-rw-r--r--hw/xprint/attributes.c29
-rw-r--r--hw/xprint/ddxInit.c2
-rw-r--r--hw/xprint/pcl/Pcl.h8
-rw-r--r--hw/xprint/pcl/PclArc.c2
-rw-r--r--hw/xprint/pcl/PclColor.c28
-rw-r--r--hw/xprint/pcl/PclGC.c15
-rw-r--r--hw/xprint/pcl/PclInit.c62
-rw-r--r--hw/xprint/pcl/PclLine.c4
-rw-r--r--hw/xprint/pcl/PclPixel.c8
-rw-r--r--hw/xprint/pcl/PclPolygon.c6
-rw-r--r--hw/xprint/pcl/PclPrint.c20
-rw-r--r--hw/xprint/pcl/PclText.c4
-rw-r--r--hw/xprint/pcl/PclWindow.c7
-rw-r--r--hw/xprint/pcl/Pclmap.h10
-rw-r--r--hw/xprint/ps/Ps.h8
-rw-r--r--hw/xprint/ps/PsGC.c14
-rw-r--r--hw/xprint/ps/PsInit.c48
-rw-r--r--hw/xprint/ps/PsPixmap.c3
-rw-r--r--hw/xprint/ps/PsPrint.c33
-rw-r--r--hw/xprint/ps/PsWindow.c7
-rw-r--r--hw/xprint/raster/Raster.c44
-rw-r--r--hw/xquartz/Makefile.am54
-rw-r--r--hw/xquartz/X11Application.h (renamed from hw/darwin/apple/X11Application.h)52
-rw-r--r--hw/xquartz/X11Application.m (renamed from hw/darwin/apple/X11Application.m)326
-rw-r--r--hw/xquartz/X11Controller.h (renamed from hw/darwin/apple/X11Controller.h)6
-rw-r--r--hw/xquartz/X11Controller.m (renamed from hw/darwin/apple/X11Controller.m)20
-rw-r--r--hw/xquartz/applewm.c (renamed from hw/darwin/quartz/applewm.c)26
-rw-r--r--hw/xquartz/applewmExt.h (renamed from hw/darwin/quartz/applewmExt.h)0
-rw-r--r--hw/xquartz/bundle/Dutch.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/Dutch.lproj/Localizable.stringsbin0 -> 1084 bytes
-rw-r--r--hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nibbin0 -> 32654 bytes
-rw-r--r--hw/xquartz/bundle/English.lproj/InfoPlist.strings (renamed from hw/darwin/apple/English.lproj/InfoPlist.strings)bin276 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/English.lproj/Localizable.stringsbin0 -> 1094 bytes
-rw-r--r--hw/xquartz/bundle/English.lproj/main.nib/classes.nib (renamed from hw/darwin/apple/English.lproj/main.nib/classes.nib)0
-rw-r--r--hw/xquartz/bundle/English.lproj/main.nib/info.nib (renamed from hw/darwin/apple/English.lproj/main.nib/info.nib)0
-rw-r--r--hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib (renamed from hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib)bin30865 -> 30865 bytes
-rw-r--r--hw/xquartz/bundle/French.lproj/InfoPlist.stringsbin0 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/French.lproj/Localizable.stringsbin0 -> 1168 bytes
-rw-r--r--hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nibbin0 -> 36404 bytes
-rw-r--r--hw/xquartz/bundle/German.lproj/InfoPlist.stringsbin0 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/German.lproj/Localizable.stringsbin0 -> 1096 bytes
-rw-r--r--hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nibbin0 -> 34995 bytes
-rw-r--r--hw/xquartz/bundle/Info.plist (renamed from hw/darwin/apple/Info.plist)34
-rw-r--r--hw/xquartz/bundle/Italian.lproj/InfoPlist.stringsbin0 -> 278 bytes
-rw-r--r--hw/xquartz/bundle/Italian.lproj/Localizable.stringsbin0 -> 1146 bytes
-rw-r--r--hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nibbin0 -> 33677 bytes
-rw-r--r--hw/xquartz/bundle/Japanese.lproj/InfoPlist.stringsbin0 -> 272 bytes
-rw-r--r--hw/xquartz/bundle/Japanese.lproj/Localizable.stringsbin0 -> 916 bytes
-rw-r--r--hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nibbin0 -> 33095 bytes
-rw-r--r--hw/xquartz/bundle/Makefile.am28
-rw-r--r--hw/xquartz/bundle/Spanish.lproj/InfoPlist.stringsbin0 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/Spanish.lproj/Localizable.stringsbin0 -> 1134 bytes
-rw-r--r--hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nibbin0 -> 35294 bytes
-rw-r--r--hw/xquartz/bundle/X11.icns (renamed from hw/darwin/apple/X11.icns)bin65908 -> 65908 bytes
-rw-r--r--hw/xquartz/bundle/X11.xcodeproj/project.pbxproj458
-rw-r--r--hw/xquartz/bundle/Xquartz.plist27
-rw-r--r--hw/xquartz/bundle/bundle-main.c129
-rw-r--r--hw/xquartz/bundle/da.lproj/InfoPlist.stringsbin0 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/da.lproj/Localizable.stringsbin0 -> 1090 bytes
-rw-r--r--hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nibbin0 -> 34164 bytes
-rw-r--r--hw/xquartz/bundle/fi.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/fi.lproj/Localizable.stringsbin0 -> 1102 bytes
-rw-r--r--hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nibbin0 -> 34765 bytes
-rw-r--r--hw/xquartz/bundle/ko.lproj/InfoPlist.stringsbin0 -> 266 bytes
-rw-r--r--hw/xquartz/bundle/ko.lproj/Localizable.stringsbin0 -> 916 bytes
-rw-r--r--hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nibbin0 -> 32690 bytes
-rw-r--r--hw/xquartz/bundle/no.lproj/InfoPlist.stringsbin0 -> 276 bytes
-rw-r--r--hw/xquartz/bundle/no.lproj/Localizable.stringsbin0 -> 1084 bytes
-rw-r--r--hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nibbin0 -> 33581 bytes
-rw-r--r--hw/xquartz/bundle/pl.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/pl.lproj/Localizable.stringsbin0 -> 1116 bytes
-rw-r--r--hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nibbin0 -> 35113 bytes
-rw-r--r--hw/xquartz/bundle/pt.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/pt.lproj/Localizable.stringsbin0 -> 1192 bytes
-rw-r--r--hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nibbin0 -> 34533 bytes
-rw-r--r--hw/xquartz/bundle/pt_PT.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/pt_PT.lproj/Localizable.stringsbin0 -> 1140 bytes
-rw-r--r--hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nibbin0 -> 35485 bytes
-rw-r--r--hw/xquartz/bundle/ru.lproj/InfoPlist.stringsbin0 -> 274 bytes
-rw-r--r--hw/xquartz/bundle/ru.lproj/Localizable.stringsbin0 -> 1122 bytes
-rw-r--r--hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nibbin0 -> 36593 bytes
-rw-r--r--hw/xquartz/bundle/sv.lproj/InfoPlist.stringsbin0 -> 260 bytes
-rw-r--r--hw/xquartz/bundle/sv.lproj/Localizable.stringsbin0 -> 1106 bytes
-rw-r--r--hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nibbin0 -> 35017 bytes
-rw-r--r--hw/xquartz/bundle/zh_CN.lproj/InfoPlist.stringsbin0 -> 260 bytes
-rw-r--r--hw/xquartz/bundle/zh_CN.lproj/Localizable.stringsbin0 -> 884 bytes
-rw-r--r--hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nibbin0 -> 31481 bytes
-rw-r--r--hw/xquartz/bundle/zh_TW.lproj/InfoPlist.stringsbin0 -> 266 bytes
-rw-r--r--hw/xquartz/bundle/zh_TW.lproj/Localizable.stringsbin0 -> 890 bytes
-rw-r--r--hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nibbin0 -> 31748 bytes
-rw-r--r--hw/xquartz/darwin.c (renamed from hw/darwin/darwin.c)133
-rw-r--r--hw/xquartz/darwin.h (renamed from hw/darwin/darwin.h)60
-rw-r--r--hw/xquartz/darwinClut8.h (renamed from hw/darwin/darwinClut8.h)0
-rw-r--r--hw/xquartz/darwinEvents.c (renamed from hw/darwin/darwinEvents.c)22
-rw-r--r--hw/xquartz/darwinEvents.h (renamed from hw/darwin/quartz/quartzCursor.h)27
-rw-r--r--hw/xquartz/darwinKeyboard.c (renamed from hw/darwin/darwinKeyboard.c)197
-rw-r--r--hw/xquartz/darwinKeyboard.h (renamed from hw/darwin/quartz/cr/XView.h)28
-rw-r--r--hw/xquartz/darwinXinput.c (renamed from hw/darwin/darwinXinput.c)4
-rw-r--r--hw/xquartz/keysym2ucs.c (renamed from hw/darwin/quartz/keysym2ucs.c)0
-rw-r--r--hw/xquartz/keysym2ucs.h (renamed from hw/darwin/quartz/keysym2ucs.h)0
-rw-r--r--hw/xquartz/pseudoramiX.c (renamed from hw/darwin/quartz/pseudoramiX.c)7
-rw-r--r--hw/xquartz/pseudoramiX.h (renamed from hw/darwin/quartz/pseudoramiX.h)0
-rw-r--r--hw/xquartz/quartz.c (renamed from hw/darwin/quartz/quartz.c)265
-rw-r--r--hw/xquartz/quartz.h (renamed from hw/darwin/quartz/quartz.h)10
-rw-r--r--hw/xquartz/quartzAudio.c (renamed from hw/darwin/quartz/quartzAudio.c)6
-rw-r--r--hw/xquartz/quartzAudio.h (renamed from hw/darwin/quartz/quartzAudio.h)0
-rw-r--r--hw/xquartz/quartzCocoa.m (renamed from hw/darwin/quartz/quartzCocoa.m)78
-rw-r--r--hw/xquartz/quartzCommon.h (renamed from hw/darwin/quartz/quartzCommon.h)11
-rw-r--r--hw/xquartz/quartzCursor.c (renamed from hw/darwin/quartz/quartzCursor.c)32
-rw-r--r--hw/xquartz/quartzCursor.h (renamed from hw/darwin/quartz/fullscreen/quartzCursor.h)0
-rw-r--r--hw/xquartz/quartzForeground.c45
-rw-r--r--hw/xquartz/quartzForeground.h37
-rw-r--r--hw/xquartz/quartzKeyboard.c (renamed from hw/darwin/quartz/quartzKeyboard.c)195
-rw-r--r--hw/xquartz/quartzKeyboard.h (renamed from hw/darwin/darwinKeyboard.h)12
-rw-r--r--hw/xquartz/quartzPasteboard.c (renamed from hw/darwin/quartz/quartzPasteboard.c)3
-rw-r--r--hw/xquartz/quartzPasteboard.h (renamed from hw/darwin/quartz/quartzPasteboard.h)0
-rw-r--r--hw/xquartz/quartzStartup.c111
-rw-r--r--hw/xquartz/xpr/Makefile.am78
-rw-r--r--hw/xquartz/xpr/Xquartz.man.pre (renamed from hw/darwin/apple/Xquartz.man)30
-rw-r--r--hw/xquartz/xpr/appledri.c (renamed from hw/darwin/quartz/xpr/appledri.c)4
-rw-r--r--hw/xquartz/xpr/appledri.h (renamed from hw/darwin/quartz/xpr/appledri.h)0
-rw-r--r--hw/xquartz/xpr/appledristr.h (renamed from hw/darwin/quartz/xpr/appledristr.h)0
-rw-r--r--hw/xquartz/xpr/dri.c (renamed from hw/darwin/quartz/xpr/dri.c)54
-rw-r--r--hw/xquartz/xpr/dri.h (renamed from hw/darwin/quartz/xpr/dri.h)0
-rw-r--r--hw/xquartz/xpr/dristruct.h (renamed from hw/darwin/quartz/xpr/dristruct.h)21
-rw-r--r--hw/xquartz/xpr/x-hash.c (renamed from hw/darwin/quartz/xpr/x-hash.c)2
-rw-r--r--hw/xquartz/xpr/x-hash.h (renamed from hw/darwin/quartz/xpr/x-hash.h)0
-rw-r--r--hw/xquartz/xpr/x-hook.c (renamed from hw/darwin/quartz/xpr/x-hook.c)3
-rw-r--r--hw/xquartz/xpr/x-hook.h (renamed from hw/darwin/quartz/xpr/x-hook.h)0
-rw-r--r--hw/xquartz/xpr/x-list.c (renamed from hw/darwin/quartz/xpr/x-list.c)2
-rw-r--r--hw/xquartz/xpr/x-list.h (renamed from hw/darwin/quartz/xpr/x-list.h)0
-rw-r--r--hw/xquartz/xpr/xpr.h (renamed from hw/darwin/quartz/xpr/xpr.h)6
-rw-r--r--hw/xquartz/xpr/xprAppleWM.c (renamed from hw/darwin/quartz/xpr/xprAppleWM.c)7
-rw-r--r--hw/xquartz/xpr/xprCursor.c (renamed from hw/darwin/quartz/xpr/xprCursor.c)26
-rw-r--r--hw/xquartz/xpr/xprFrame.c (renamed from hw/darwin/quartz/xpr/xprFrame.c)40
-rw-r--r--hw/xquartz/xpr/xprScreen.c (renamed from hw/darwin/quartz/xpr/xprScreen.c)92
-rw-r--r--hw/xwin/win.h40
-rw-r--r--hw/xwin/winallpriv.c18
-rwxr-xr-xhw/xwin/winclipboardwrappers.c1
-rw-r--r--hw/xwin/winconfig.c1
-rw-r--r--hw/xwin/wincursor.c3
-rw-r--r--hw/xwin/winfillsp.c9
-rw-r--r--hw/xwin/winglobals.c10
-rw-r--r--hw/xwin/winmultiwindowwndproc.c2
-rw-r--r--hw/xwin/winpixmap.c8
-rw-r--r--hw/xwin/winscrinit.c3
-rw-r--r--hw/xwin/winsetsp.c9
-rwxr-xr-xhw/xwin/winwin32rootless.c2
413 files changed, 3278 insertions, 25001 deletions
diff --git a/hw/Makefile.am b/hw/Makefile.am
index 30662ccdd..c2b9571b9 100644
--- a/hw/Makefile.am
+++ b/hw/Makefile.am
@@ -1,10 +1,6 @@
if DMX
-if XDARWIN
-# Darwin does not need the dmx subdir
-else
DMX_SUBDIRS = dmx
endif
-endif
if XORG
XORG_SUBDIRS = xfree86
@@ -34,22 +30,22 @@ if XPRINT
XPRINT_SUBDIRS = xprint
endif
-if XDARWIN
-XDARWIN_SUBDIRS = darwin
+if XQUARTZ
+XQUARTZ_SUBDIRS = xquartz
endif
SUBDIRS = \
$(XORG_SUBDIRS) \
$(XGL_SUBDIRS) \
$(XWIN_SUBDIRS) \
- $(XDARWIN_SUBDIRS) \
$(XVFB_SUBDIRS) \
$(XNEST_SUBDIRS) \
- $(DMX_SUBDIRS) \
- $(KDRIVE_SUBDIRS) \
+ $(DMX_SUBDIRS) \
+ $(KDRIVE_SUBDIRS) \
+ $(XQUARTZ_SUBDIRS) \
$(XPRINT_SUBDIRS)
-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint
+DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint
relink:
for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done
diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
deleted file mode 100644
index 71b976777..000000000
--- a/hw/darwin/Makefile.am
+++ /dev/null
@@ -1,290 +0,0 @@
-noinst_LIBRARIES = libdarwinShared.a
-libdarwin_XINPUT_SRCS = darwinXinput.c
-
-AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
-AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
-INCLUDES = @XORG_INCS@ -I../../miext/rootless
-
-DEFS = @DEFS@ -DUSE_NEW_CLUT
-
-if XQUARTZ
-XQUARTZ_SUBDIRS = quartz
-XQUARTZ_PROGS = Xquartz
-XQUARTZ_HOOK = xquartz-install-hook
-endif
-
-if XDARWINAPP
-XDARWINAPP_SUBDIRS = bundle
-XDARWINAPP_HOOK = xdarwinapp-install-hook
-endif
-
-SUBDIRS = \
- iokit \
- $(XQUARTZ_SUBDIRS) \
- $(XDARWINAPP_SUBDIRS) \
- utils \
- .
-
-libdarwinShared_a_SOURCES = darwin.c \
- darwinEvents.c \
- darwinKeyboard.c \
- $(darwin_XINPUT_SRCS)
-
-# bin_PROGRAMS = XDarwin Xquartz
-bin_PROGRAMS = $(XQUARTZ_PROGS)
-
-#XDarwin_SOURCES = \
-# $(top_srcdir)/fb/fbcmap_mi.c \
-# $(top_srcdir)/mi/miinitext.c \
-# $(top_srcdir)/Xi/stubs.c
-
-Xquartz_SOURCES = \
- $(top_srcdir)/fb/fbcmap_mi.c \
- $(top_srcdir)/mi/miinitext.c \
- $(top_srcdir)/Xi/stubs.c \
- apple/X11Application.m \
- apple/X11Controller.m \
- quartz/Preferences.m \
- quartz/applewm.c \
- quartz/keysym2ucs.c \
- quartz/pseudoramiX.c \
- quartz/quartz.c \
- quartz/quartzAudio.c \
- quartz/quartzCocoa.m \
- quartz/quartzKeyboard.c \
- quartz/quartzPasteboard.c \
- quartz/quartzStartup.c \
- quartz/xpr/appledri.c \
- quartz/xpr/dri.c \
- quartz/xpr/xprAppleWM.c \
- quartz/xpr/xprCursor.c \
- quartz/xpr/xprFrame.c \
- quartz/xpr/xprScreen.c \
- quartz/xpr/x-hash.c \
- quartz/xpr/x-hook.c \
- quartz/xpr/x-list.c
-
-DARWIN_LIBS = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- @DARWIN_LIBS@ \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- ./libdarwinShared.a \
- $(XSERVER_LIBS)
-
-#XDARWIN_LIBS = \
-# $(DARWIN_LIBS) \
-# ./iokit/libiokit.a
-XQUARTZ_LIBS = \
- $(DARWIN_LIBS)
-
-#XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
-#XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
-
-Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
-Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
-
-#XDarwin_LDFLAGS = \
-# -XCClinker -Objc \
-# -Wl,-u,_miDCInitialize \
-# -Wl,-framework,IOKit
-
-Xquartz_LDFLAGS = \
- -XCClinker -Objc \
- -Wl,-u,_miDCInitialize \
- -Wl,-framework,Carbon \
- -Wl,-framework,OpenGL \
- -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib \
- -Wl,-framework,Cocoa \
- -Wl,-framework,CoreAudio \
- -Wl,-framework,IOKit
-
-#XDarwin_CFLAGS = -DINXDARWIN
-Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H
-
-if XQUARTZ
-DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
-
-bin_SCRIPTS = x11app
-
-x11app:
- cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
-endif
-
-if XDARWINAPP
-macosdir = $(darwinappdir)/Contents/MacOS
-
-macos_PROGRAMS = XDarwinApp
-darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
-
-XDarwinApp_SOURCES = \
- $(top_srcdir)/fb/fbcmap_mi.c \
- $(top_srcdir)/mi/miinitext.c \
- $(top_srcdir)/Xi/stubs.c
-
-XDARWINAPP_LIBS = \
- $(DARWIN_LIBS) \
- ./quartz/XApplication.o \
- ./libdarwinShared.a \
- ./quartz/libXQuartz.a \
- $(XSERVER_LIBS)
-
-XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS)
-XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS)
-
-XDarwinApp_LDFLAGS = \
- -XCClinker -Objc \
- -Wl,-u,_miDCInitialize \
- -Wl,-framework,Carbon \
- -Wl,-framework,ApplicationServices \
- -Wl,-framework,Cocoa \
- -Wl,-framework,CoreAudio \
- -Wl,-framework,IOKit
-
-XDarwinApp_CFLAGS = -DINXDARWINAPP
-
-crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
-crplugin_LTLIBRARIES = cr.la
-cr_la_SOURCES = \
- quartz/cr/crAppleWM.m \
- quartz/cr/crFrame.m \
- quartz/cr/crScreen.m \
- quartz/fullscreen/quartzCursor.c \
- quartz/cr/XView.m
-
-cr_la_LIBADD = \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la
-
-cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
- -lpixman-1 \
- -Wl,-framework,Cocoa \
- -Wl,-framework,Carbon \
- -XCClinker -ObjC \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-cr_la_DEPENDENCIES = XDarwinApp
-
-fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS
-fullscreenplugin_LTLIBRARIES = fullscreen.la
-fullscreen_la_SOURCES = \
- quartz/fullscreen/fullscreen.c \
- quartz/fullscreen/quartzCursor.c
-
-fullscreen_la_LIBADD = \
- $(top_builddir)/miext/shadow/libshadow.la
-
-fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-fullscreen_la_DEPENDENCIES = XDarwinApp
-
-if GLX
-glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS
-glxMesaplugin_LTLIBRARIES = glxMesa.la
-glxMesa_la_SOURCES =
-glxMesa_la_LIBADD = \
- $(top_builddir)/GL/glx/libglx.la \
- $(top_builddir)/GL/mesa/libGLcore.la
-glxMesa_la_LDFLAGS = -shrext '' \
- -Wl,-framework,AGL \
- -Wl,-framework,OpenGL \
- -XCClinker -ObjC \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-glxMesa_la_DEPENDENCIES = XDarwinApp
-endif
-
-if HAVE_XPLUGIN
-
-xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
-xprplugin_LTLIBRARIES = xpr.la
-xpr_la_SOURCES = \
- quartz/xpr/appledri.c \
- quartz/xpr/dri.c \
- quartz/xpr/xprAppleWM.c \
- quartz/xpr/xprCursor.c \
- quartz/xpr/xprFrame.c \
- quartz/xpr/xprScreen.c \
- quartz/xpr/x-hash.c \
- quartz/xpr/x-hook.c \
- quartz/xpr/x-list.c
-
-xpr_la_LIBADD = \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la
-
-xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
- -lpixman-1 \
- -lXplugin \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-xpr_la_DEPENDENCIES = XDarwinApp
-
-endif
-
-if HAVE_AGL_FRAMEWORK
-glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS
-glxCGLplugin_LTLIBRARIES = glxCGL.la
-glxCGL_la_SOURCES =
-glxCGL_la_LIBADD = \
- $(top_builddir)/GL/glx/glxext.o \
- $(top_builddir)/GL/glx/libglx.a \
- $(top_builddir)/GL/apple/libAGLcore.a
-glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
- -Wl,-framework,AGL \
- -Wl,-framework,OpenGL \
- -XCClinker -ObjC \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-glxCGL_la_DEPENDENCIES = XDarwinApp
-
-
-glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS
-glxAGLplugin_LTLIBRARIES = glxAGL.la
-glxAGL_la_SOURCES =
-glxAGL_la_LIBADD = \
- $(top_builddir)/GL/glx/glxext.o \
- $(top_builddir)/GL/glx/libglx.a \
- $(top_builddir)/GL/apple/libAGLcore.a
-glxAGL_la_LDFLAGS = -shrext '' \
- -Wl,-framework,AGL \
- -Wl,-framework,OpenGL \
- -XCClinker -ObjC \
- -XCClinker -bundle_loader -XCClinker XDarwinApp \
- -module -avoid-version -no-undefined
-glxAGL_la_DEPENDENCIES = XDarwinApp
-
-
-
-endif
-endif
-
-#man1_MANS = XDarwin.man
-
-#uninstall-hook:
-# rm -rf $(DESTDIR)$(macosdir)/XDarwin
-
-install-data-hook: $(XQUARTZ_HOOK) $(XDARWINAPP_HOOK)
-
-xquartz-install-hook::
- cd apple && xcodebuild install CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
-
-xdarwinapp-install hook:
- mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
-
-EXTRA_DIST = \
- darwin.c \
- darwinClut8.h \
- darwinEvents.c \
- darwin.h \
- darwinKeyboard.c \
- darwinKeyboard.h \
- darwinXinput.c \
- XDarwin.man
diff --git a/hw/darwin/README.apple b/hw/darwin/README.apple
deleted file mode 100644
index 229ab17ad..000000000
--- a/hw/darwin/README.apple
+++ /dev/null
@@ -1,35 +0,0 @@
-This directory contains a port of the XDarwin code to the modular X.org
-codebase to be compiled on Darwin/OS X; this would not have been possible
-without the help of Torrey Lyons and Peter O'Gorman, to whom I am
-grateful for their patches, time and moral support.
-
-The server builds 4 targets:
-
-* XDarwin: this server runs on Darwin systems without Quartz
- (i.e. non-OS X); it has not been well-tested.
-
-* XDarwinApp: this builds XDarwin.app, which is a full X server using
- Quartz. It has loadable module support for AGL and CGL, and well as
- fullscreen and rootless support.
-
-* Xquartz: this server runs on Quartz-based systems, and is meant to
- work with X11.app
-
-* x11app: this builds a version of Apple's X11.app using patches by
- Torrey Lyons; most, but not all, functionality of Apple's original
- X11.app is present in this release.
-
-Known issues:
-
-* AGL and CGL support for 3D indirect acceleration does not work;
- indirect.c has been rewritten, but not yet integrated into this source tree.
-
-* Fullscreen mode does not work; I don't know why.
-
-* Some features in X11.app are not yet implemented; these are marked
- with #ifdef DARWIN_DDX_MISSING in the code.
-
-* The build system code could probably be cleaned up slightly.
-
-Any patches or code contributions would be most welcome and may be
-sent to me at bbyer@apple.com.
diff --git a/hw/darwin/XDarwin.man b/hw/darwin/XDarwin.man
deleted file mode 100644
index 6fc9aec0f..000000000
--- a/hw/darwin/XDarwin.man
+++ /dev/null
@@ -1,203 +0,0 @@
-.TH XDARWIN 1 __vendorversion__
-.SH NAME
-XDarwin \- X window system server for Darwin operating system
-.SH SYNOPSIS
-.B XDarwin
-[ options ] ...
-.SH DESCRIPTION
-#ifdef DARWIN_WITH_QUARTZ
-.I XDarwin
-is the X window server for Mac OS X and the Darwin operating system
-provided by the X.Org Foundation.
-.I XDarwin
-can run in three different modes. On Mac OS X,
-.I XDarwin
-runs in parallel with Aqua in full screen or rootless modes. These modes
-are called Quartz modes, named after the Quartz 2D compositing engine used
-by Aqua. XDarwin can also be run from the Darwin text console in IOKit mode.
-.PP
-When running from the console,
-.I XDarwin
-acts as the window server and uses IOKit services to access the display
-framebuffer, mouse and keyboard and to provide a layer of hardware
-abstraction. In console mode,
-.I XDarwin
-will normally be started by the \fIxdm(1)\fP display manager or by a script
-that runs the program \fIxinit(1)\fP.
-.PP
-When running with the Mac OS X Aqua GUI,
-.I XDarwin
-will normally be started by launching from the Finder, but it may also be
-started from the command line with the \fB\-quartz\fP, \fB\-fullscreen\fP, or
-\fB\-rootless\fP options. Note that the defaults for various command line
-options are set by the
-.I XDarwin
-application preferences in the Quartz modes.
-.PP
-In full screen Quartz mode, when the X Window System is active, it takes over
-the entire screen. CoreGraphics is used to capture and draw to the screen. The
-.I XDarwin
-application allows easy switching between the Mac OS X and X window
-desktops. More information is available in the Help menu of the
-.I XDarwin
-application.
-.PP
-In rootless mode, the X window system and Aqua share your display. The root
-window of the X11 display is the size of the screen and contains all the
-other windows. The X11 root window is not displayed in rootless mode as Aqua
-handles the desktop background.
-#else
-.I XDarwin
-is the X window server for Mac OS X and the Darwin operating system
-provided by the X.Org Foundation. This version of
-.I XDarwin
-can only be started from the Darwin text console. The Mac OS X Aqua GUI, if
-present, must be shut down.
-.I XDarwin
-uses IOKit services to access the display
-framebuffer, mouse and keyboard and to provide a layer of hardware
-abstraction.
-.I XDarwin
-will normally be started by the \fIxdm(1)\fP display manager or by a script
-that runs the program \fIxinit(1)\fP.
-#endif
-.SH OPTIONS
-.PP
-In addition to the normal server options described in the \fIXserver(1)\fP
-manual page, \fIXDarwin\fP accepts the following command line switches:
-.TP 8
-.B \-fakebuttons
-Emulates a 3 button mouse using modifier keys. By default, the Command modifier
-is used to emulate button 2 and Option is used for button 3. Thus, clicking the
-first mouse button while holding down Command will act like clicking
-button 2. Holding down Option will simulate button 3.
-.TP 8
-.B \-nofakebuttons
-Do not emulate a 3 button mouse. This is the default.
-.TP 8
-.B "\-fakemouse2 \fImodifiers\fP"
-Change the modifier keys used to emulate the second mouse button. By default,
-Command is used to emulate the second button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse2 """Option,Shift""
-will set holding Option, Shift and clicking on button one as equivalent to
-clicking the second mouse button.
-.TP 8
-.B "\-fakemouse3 \fImodifiers\fP"
-Change the modifier keys used to emulate the third mouse button. By default,
-Option is used to emulate the third button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse3 """Control,Shift""
-will set holding Control, Shift and clicking on button one as equivalent to
-clicking the third mouse button.
-.TP 8
-.B "\-keymap \fIfile\fP"
-On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap.
-The default is to read this keymapping from USA.keymapping. With this option
-the keymapping will be read from \fIfile\fP instead. If the file's path is
-not specified, it will be searched for in Library/Keyboards/ underneath the
-following directories (in order): ~, /, /Network, /System.
-.TP 8
-.B \-nokeymap
-On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap.
-With this option XDarwin queries the kernel for the current keymapping
-instead of reading it from a file. This will often fail on newer kernels.
-#ifdef DARWIN_WITH_QUARTZ
-.TP 8
-.B "\-size \fIwidth\fP \fIheight\fP"
-Sets the screen resolution for the X server to use.
-Ignored in rootless mode.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits
-per pixel are supported.
-Ignored in rootless mode.
-.TP 8
-.B "\-refresh \fIrate\fP"
-Gives the refresh rate to use in Hz. For LCD displays this should be 0.
-Ignored in rootless mode.
-.TP 8
-.B \-fullscreen
-Run full screen in parallel with Mac OS X Aqua GUI.
-.TP 8
-.B \-rootless
-Run rootless inside Mac OS X Aqua GUI.
-.TP 8
-.B \-quartz
-Run in parallel with the Mac OS X Aqua GUI using the default mode.
-#else
-.TP 8
-.B "\-size \fIwidth\fP \fIheight\fP"
-Sets the screen resolution for the X server to use.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits
-per pixel are supported.
-.TP 8
-.B "\-refresh \fIrate\fP"
-Gives the refresh rate to use in Hz. For LCD displays this should be 0.
-#endif
-.TP 8
-.B \-showconfig
-Print out the server version and patchlevel.
-.TP 8
-.B \-version
-Same as \fB\-showconfig\fP.
-.SH "SEE ALSO"
-.PP
-X(__miscmansuffix__), Xorg(1), Xserver(1), xdm(1), xinit(1)
-.SH BUGS
-.I XDarwin
-and this man page still have many limitations. Some of the more obvious
-ones are:
-.br
-- The display mode cannot be changed once the X server has started.
-.br
-- A screen saver is not supported.
-.PP
-.SH AUTHORS
-XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
-Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
-Torrey T. Lyons improved and integrated this code into the XFree86
-Project's mainline for the 4.0.2 release.
-.PP
-The following members of the XonX Team contributed to the following
-releases (in alphabetical order):
-.TP 4
-XFree86 4.1.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - Cocoa version of XDarwin front end
-.br
-Gregory Robert Parker - Original Quartz implementation
-.br
-Christoph Pfisterer - Dynamic shared X libraries
-.br
-Toshimitsu Tanaka - Japanese localization
-.TP 4
-XFree86 4.2.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Pablo Di Noto - Spanish localization
-.br
-Paul Edens - Dutch localization
-.br
-Kyunghwan Kim - Korean localization
-.br
-Mario Klebsch - Non-US keyboard support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - German localization
-.br
-Patrik Montgomery - Swedish localization
-.br
-Greg Parker - Rootless support
-.br
-Toshimitsu Tanaka - Japanese localization
-.br
-Olivier Verdier - French localization
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/entries b/hw/darwin/apple/English.lproj/main.nib/.svn/entries
deleted file mode 100644
index 95a15f220..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/entries
+++ /dev/null
@@ -1,65 +0,0 @@
-8
-
-dir
-29110
-svn+ssh://src.apple.com/svn/BSD/X11server/trunk/darwin/apple/English.lproj/main.nib
-svn+ssh://src.apple.com/svn/BSD
-
-
-
-2007-02-03T03:06:20.842932Z
-28761
-bbyer
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-e92bca22-270c-0410-9cea-e3f1106b6a1c
-
-info.nib
-file
-
-
-
-
-2007-02-27T01:00:07.000000Z
-456347804c516786b1d1339ce2ef50a2
-2007-02-03T03:06:20.842932Z
-28761
-bbyer
-
-keyedobjects.nib
-file
-
-
-
-
-2007-02-27T01:00:07.000000Z
-eb3010372b09768c846df0d996cfdd8d
-2007-02-03T03:06:20.842932Z
-28761
-bbyer
-has-props
-
-classes.nib
-file
-
-
-
-
-2007-02-27T01:00:07.000000Z
-0ae2660c3afabbd5aa02fc34712c96e6
-2007-02-03T03:06:20.842932Z
-28761
-bbyer
-
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/format b/hw/darwin/apple/English.lproj/main.nib/.svn/format
deleted file mode 100644
index 45a4fb75d..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base
deleted file mode 100644
index 5e9587e65..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base
deleted file mode 100644
index a82159bd5..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base
+++ /dev/null
@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBClasses</key>
- <array>
- <dict>
- <key>CLASS</key>
- <string>IBLibraryObjectTemplate</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>OUTLETS</key>
- <dict>
- <key>draggedView</key>
- <string>NSView</string>
- <key>representedObject</key>
- <string>NSObject</string>
- </dict>
- <key>SUPERCLASS</key>
- <string>NSView</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>IBInspector</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>OUTLETS</key>
- <dict>
- <key>inspectorView</key>
- <string>NSView</string>
- </dict>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSDateFormatter</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSFormatter</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>apps_table_cancel</key>
- <string>id</string>
- <key>apps_table_delete</key>
- <string>id</string>
- <key>apps_table_done</key>
- <string>id</string>
- <key>apps_table_duplicate</key>
- <string>id</string>
- <key>apps_table_new</key>
- <string>id</string>
- <key>apps_table_show</key>
- <string>id</string>
- <key>bring_to_front</key>
- <string>id</string>
- <key>close_window</key>
- <string>id</string>
- <key>enable_fullscreen_changed</key>
- <string>id</string>
- <key>minimize_window</key>
- <string>id</string>
- <key>next_window</key>
- <string>id</string>
- <key>prefs_changed</key>
- <string>id</string>
- <key>prefs_show</key>
- <string>id</string>
- <key>previous_window</key>
- <string>id</string>
- <key>toggle_fullscreen</key>
- <string>id</string>
- <key>x11_help</key>
- <string>id</string>
- <key>zoom_window</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>X11Controller</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>OUTLETS</key>
- <dict>
- <key>apps_separator</key>
- <string>id</string>
- <key>apps_table</key>
- <string>id</string>
- <key>depth</key>
- <string>id</string>
- <key>dock_apps_menu</key>
- <string>id</string>
- <key>dock_menu</key>
- <string>id</string>
- <key>dock_window_separator</key>
- <string>id</string>
- <key>enable_auth</key>
- <string>id</string>
- <key>enable_fullscreen</key>
- <string>id</string>
- <key>enable_keyequivs</key>
- <string>id</string>
- <key>enable_tcp</key>
- <string>id</string>
- <key>fake_buttons</key>
- <string>id</string>
- <key>prefs_panel</key>
- <string>id</string>
- <key>sync_keymap</key>
- <string>id</string>
- <key>toggle_fullscreen_item</key>
- <string>id</string>
- <key>use_sysbeep</key>
- <string>id</string>
- <key>window_separator</key>
- <string>id</string>
- <key>x11_about_item</key>
- <string>id</string>
- </dict>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSNumberFormatter</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSFormatter</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSFormatter</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>alignCenter:</key>
- <string>id</string>
- <key>alignJustified:</key>
- <string>id</string>
- <key>alignLeft:</key>
- <string>id</string>
- <key>alignRight:</key>
- <string>id</string>
- <key>arrangeInFront:</key>
- <string>id</string>
- <key>centerSelectionInVisibleArea:</key>
- <string>id</string>
- <key>changeFont:</key>
- <string>id</string>
- <key>checkSpelling:</key>
- <string>id</string>
- <key>clear:</key>
- <string>id</string>
- <key>clearRecentDocuments:</key>
- <string>id</string>
- <key>complete:</key>
- <string>id</string>
- <key>copy:</key>
- <string>id</string>
- <key>copyFont:</key>
- <string>id</string>
- <key>copyRuler:</key>
- <string>id</string>
- <key>cut:</key>
- <string>id</string>
- <key>delete:</key>
- <string>id</string>
- <key>deminiaturize:</key>
- <string>id</string>
- <key>fax:</key>
- <string>id</string>
- <key>hide:</key>
- <string>id</string>
- <key>hideOtherApplications:</key>
- <string>id</string>
- <key>loosenKerning:</key>
- <string>id</string>
- <key>lowerBaseline:</key>
- <string>id</string>
- <key>makeKeyAndOrderFront:</key>
- <string>id</string>
- <key>miniaturize:</key>
- <string>id</string>
- <key>newDocument:</key>
- <string>id</string>
- <key>openDocument:</key>
- <string>id</string>
- <key>orderBack:</key>
- <string>id</string>
- <key>orderFront:</key>
- <string>id</string>
- <key>orderFrontColorPanel:</key>
- <string>id</string>
- <key>orderFrontHelpPanel:</key>
- <string>id</string>
- <key>orderOut:</key>
- <string>id</string>
- <key>outline:</key>
- <string>id</string>
- <key>paste:</key>
- <string>id</string>
- <key>pasteAsPlainText:</key>
- <string>id</string>
- <key>pasteAsRichText:</key>
- <string>id</string>
- <key>pasteFont:</key>
- <string>id</string>
- <key>pasteRuler:</key>
- <string>id</string>
- <key>pause:</key>
- <string>id</string>
- <key>performClose:</key>
- <string>id</string>
- <key>performFindPanelAction:</key>
- <string>id</string>
- <key>performMiniaturize:</key>
- <string>id</string>
- <key>performZoom:</key>
- <string>id</string>
- <key>play:</key>
- <string>id</string>
- <key>print:</key>
- <string>id</string>
- <key>printDocument:</key>
- <string>id</string>
- <key>raiseBaseline:</key>
- <string>id</string>
- <key>record:</key>
- <string>id</string>
- <key>redo:</key>
- <string>id</string>
- <key>resume:</key>
- <string>id</string>
- <key>revertDocumentToSaved:</key>
- <string>id</string>
- <key>run:</key>
- <string>id</string>
- <key>runPageLayout:</key>
- <string>id</string>
- <key>runToolbarCustomizationPalette:</key>
- <string>id</string>
- <key>saveAllDocuments:</key>
- <string>id</string>
- <key>saveDocument:</key>
- <string>id</string>
- <key>saveDocumentAs:</key>
- <string>id</string>
- <key>saveDocumentTo:</key>
- <string>id</string>
- <key>selectAll:</key>
- <string>id</string>
- <key>selectText:</key>
- <string>id</string>
- <key>showGuessPanel:</key>
- <string>id</string>
- <key>showHelp:</key>
- <string>id</string>
- <key>start:</key>
- <string>id</string>
- <key>startSpeaking:</key>
- <string>id</string>
- <key>stop:</key>
- <string>id</string>
- <key>stopSpeaking:</key>
- <string>id</string>
- <key>subscript:</key>
- <string>id</string>
- <key>superscript:</key>
- <string>id</string>
- <key>terminate:</key>
- <string>id</string>
- <key>tightenKerning:</key>
- <string>id</string>
- <key>toggleContinuousSpellChecking:</key>
- <string>id</string>
- <key>toggleRuler:</key>
- <string>id</string>
- <key>toggleToolbarShown:</key>
- <string>id</string>
- <key>turnOffKerning:</key>
- <string>id</string>
- <key>turnOffLigatures:</key>
- <string>id</string>
- <key>underline:</key>
- <string>id</string>
- <key>undo:</key>
- <string>id</string>
- <key>unhideAllApplications:</key>
- <string>id</string>
- <key>unscript:</key>
- <string>id</string>
- <key>useAllLigatures:</key>
- <string>id</string>
- <key>useStandardKerning:</key>
- <string>id</string>
- <key>useStandardLigatures:</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>FirstResponder</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- </array>
- <key>IBVersion</key>
- <integer>1</integer>
-</dict>
-</plist>
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base
deleted file mode 100644
index 88bc6260d..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBFramework Version</key>
- <string>588</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>244</integer>
- <integer>29</integer>
- <integer>423</integer>
- </array>
- <key>IBSystem Version</key>
- <string>9A356</string>
- <key>targetFramework</key>
- <string>IBCocoaFramework</string>
-</dict>
-</plist>
diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base
deleted file mode 100644
index 8b31450ff..000000000
--- a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/apple/X11.xcodeproj/project.pbxproj b/hw/darwin/apple/X11.xcodeproj/project.pbxproj
deleted file mode 100644
index 2fef99ba0..000000000
--- a/hw/darwin/apple/X11.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,320 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 42;
- objects = {
-
-/* Begin PBXBuildFile section */
- 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
- 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; };
- 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; };
- 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 50EE2AB703849F0B0ECA21EC /* bundle-main.c */; };
- 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; };
- 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; };
- 527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
- 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = "<group>"; };
- 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = "<group>"; };
- 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
- 527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
- 527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 527F241E0B5D938C007840A7 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */,
- 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 195DF8CFFE9D517E11CA2CBB /* Products */ = {
- isa = PBXGroup;
- children = (
- 527F24270B5D938C007840A7 /* X11.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 20286C29FDCF999611CA2CEA /* X11 */ = {
- isa = PBXGroup;
- children = (
- 20286C2AFDCF999611CA2CEA /* Sources */,
- 20286C2CFDCF999611CA2CEA /* Resources */,
- 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
- 195DF8CFFE9D517E11CA2CBB /* Products */,
- 527F24260B5D938C007840A7 /* Info.plist */,
- );
- name = X11;
- sourceTree = "<group>";
- };
- 20286C2AFDCF999611CA2CEA /* Sources */ = {
- isa = PBXGroup;
- children = (
- 50EE2AB703849F0B0ECA21EC /* bundle-main.c */,
- );
- name = Sources;
- sourceTree = "<group>";
- };
- 20286C2CFDCF999611CA2CEA /* Resources */ = {
- isa = PBXGroup;
- children = (
- 50459C5F038587C60ECA21EC /* X11.icns */,
- 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */,
- 02345980000FD03B11CA0E72 /* main.nib */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
- isa = PBXGroup;
- children = (
- 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */,
- 570C5748047186C400ACF82F /* SystemConfiguration.framework */,
- );
- name = "External Frameworks and Libraries";
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- 527F24170B5D938C007840A7 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- 527F24160B5D938C007840A7 /* X11 */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */;
- buildPhases = (
- 527F24170B5D938C007840A7 /* Headers */,
- 527F24180B5D938C007840A7 /* Resources */,
- 527F241C0B5D938C007840A7 /* Sources */,
- 527F241E0B5D938C007840A7 /* Frameworks */,
- 527F24210B5D938C007840A7 /* Rez */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = X11;
- productName = X11;
- productReference = 527F24270B5D938C007840A7 /* X11.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 20286C28FDCF999611CA2CEA /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */;
- compatibilityVersion = "Xcode 2.4";
- hasScannedForEncodings = 1;
- mainGroup = 20286C29FDCF999611CA2CEA /* X11 */;
- projectDirPath = "";
- projectRoot = "";
- shouldCheckCompatibility = 1;
- targets = (
- 527F24160B5D938C007840A7 /* X11 */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 527F24180B5D938C007840A7 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 527F24370B5D9D89007840A7 /* Info.plist in Resources */,
- 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */,
- 527F241A0B5D938C007840A7 /* main.nib in Resources */,
- 527F241B0B5D938C007840A7 /* X11.icns in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
- 527F24210B5D938C007840A7 /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 527F241C0B5D938C007840A7 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 02345980000FD03B11CA0E72 /* main.nib */ = {
- isa = PBXVariantGroup;
- children = (
- 1870340FFE93FCAF11CA0CD7 /* English */,
- );
- name = main.nib;
- sourceTree = "<group>";
- };
- 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 0867D6ABFE840B52C02AAC07 /* English */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 527F24090B5D8FFC007840A7 /* Development */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DSTROOT = "$(DSTROOT)";
- SKIP_INSTALL = YES;
- };
- name = Development;
- };
- 527F240A0B5D8FFC007840A7 /* Deployment */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DSTROOT = "$(DSTROOT)";
- SKIP_INSTALL = YES;
- };
- name = Deployment;
- };
- 527F240B0B5D8FFC007840A7 /* Default */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DSTROOT = "$(DSTROOT)";
- SKIP_INSTALL = YES;
- };
- name = Default;
- };
- 527F24230B5D938C007840A7 /* Development */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(NATIVE_ARCH_32_BIT)";
- COPY_PHASE_STRIP = NO;
- DSTROOT = "$(DSTROOT)";
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- HEADER_SEARCH_PATHS = "";
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = $DSTROOT/Applications/Utilties;
- LIBRARY_SEARCH_PATHS = "";
- OTHER_CFLAGS = "$(CFLAGS)";
- OTHER_LDFLAGS = "$(LDFLAGS)";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = X11;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = (
- "-Wmost",
- "-Wno-four-char-constants",
- "-Wno-unknown-pragmas",
- );
- WRAPPER_EXTENSION = app;
- };
- name = Development;
- };
- 527F24240B5D938C007840A7 /* Deployment */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- DSTROOT = "$(DSTROOT)";
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- HEADER_SEARCH_PATHS = "";
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = $DSTROOT/Applications/Utilties;
- LIBRARY_SEARCH_PATHS = "";
- OTHER_CFLAGS = "$(CFLAGS)";
- OTHER_LDFLAGS = "$(LDFLAGS)";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = X11;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = (
- "-Wmost",
- "-Wno-four-char-constants",
- "-Wno-unknown-pragmas",
- );
- WRAPPER_EXTENSION = app;
- };
- name = Deployment;
- };
- 527F24250B5D938C007840A7 /* Default */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DSTROOT = "$(DSTROOT)";
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- HEADER_SEARCH_PATHS = "";
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = $DSTROOT/Applications/Utilties;
- LIBRARY_SEARCH_PATHS = "";
- OTHER_CFLAGS = "$(CFLAGS)";
- OTHER_LDFLAGS = "$(LDFLAGS)";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = X11;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = (
- "-Wmost",
- "-Wno-four-char-constants",
- "-Wno-unknown-pragmas",
- );
- WRAPPER_EXTENSION = app;
- };
- name = Default;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 527F24090B5D8FFC007840A7 /* Development */,
- 527F240A0B5D8FFC007840A7 /* Deployment */,
- 527F240B0B5D8FFC007840A7 /* Default */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Default;
- };
- 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 527F24230B5D938C007840A7 /* Development */,
- 527F24240B5D938C007840A7 /* Deployment */,
- 527F24250B5D938C007840A7 /* Default */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Default;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
-}
diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/apple/bundle-main.c
deleted file mode 100644
index 452da768a..000000000
--- a/hw/darwin/apple/bundle-main.c
+++ /dev/null
@@ -1,901 +0,0 @@
-/* bundle-main.c -- X server launcher
-
- Copyright (c) 2002-2007 Apple Inc. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization.
-
- Parts of this file are derived from xdm, which has this copyright:
-
- Copyright 1988, 1998 The Open Group
-
- Permission to use, copy, modify, distribute, and sell this software
- and its documentation for any purpose is hereby granted without fee,
- provided that the above copyright notice appear in all copies and
- that both that copyright notice and this permission notice appear in
- supporting documentation.
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name of The Open Group shall
- not be used in advertising or otherwise to promote the sale, use or
- other dealings in this Software without prior written authorization
- from The Open Group. */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/socket.h>
-#include <sys/utsname.h>
-#include <ifaddrs.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <time.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#include <sys/ioctl.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xauth.h>
-#ifdef USE_XCB
-#include <xcb/xcb.h>
-#endif
-#include <CoreFoundation/CoreFoundation.h>
-#include <SystemConfiguration/SystemConfiguration.h>
-
-#define X_SERVER "/usr/X11/bin/Xquartz"
-#define XTERM_PATH "/usr/X11/bin/xterm"
-#define WM_PATH "/usr/bin/quartz-wm"
-#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc"
-#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
-
-/* what xinit does */
-#ifndef SHELL
-# define SHELL "sh"
-#endif
-
-#undef FALSE
-#define FALSE 0
-#undef TRUE
-#define TRUE 1
-
-#define MAX_DISPLAYS 64
-
-static int server_pid = -1, client_pid = -1;
-static int xinit_kills_server = FALSE;
-static jmp_buf exit_continuation;
-static const char *server_name = NULL;
-static Display *server_dpy;
-
-static char *auth_file;
-
-typedef struct addr_list_struct addr_list;
-
-struct addr_list_struct {
- addr_list *next;
- Xauth auth;
-};
-
-static addr_list *addresses;
-
-
-/* Utility functions. */
-
-/* Return the current host name. Matches what Xlib does. */
-static char *
-host_name (void)
-{
-#ifdef NEED_UTSNAME
- static struct utsname name;
-
- uname(&name);
-
- return name.nodename;
-#else
- static char buf[100];
-
- gethostname(buf, sizeof(buf));
-
- return buf;
-#endif
-}
-
-static int
-read_boolean_pref (CFStringRef name, int default_)
-{
- int value;
- Boolean ok;
-
- value = CFPreferencesGetAppBooleanValue (name,
- CFSTR ("com.apple.x11"), &ok);
- return ok ? value : default_;
-}
-
-static inline int
-binary_equal (const void *a, const void *b, int length)
-{
- return memcmp (a, b, length) == 0;
-}
-
-static inline void *
-binary_dup (const void *a, int length)
-{
- void *b = malloc (length);
- if (b != NULL)
- memcpy (b, a, length);
- return b;
-}
-
-static inline void
-binary_free (void *data, int length)
-{
- if (data != NULL)
- free (data);
-}
-
-
-/* Functions for managing the authentication entries. */
-
-/* Returns true if something matching AUTH is in our list of auth items */
-static int
-check_auth_item (Xauth *auth)
-{
- addr_list *a;
-
- for (a = addresses; a != NULL; a = a->next)
- {
- if (a->auth.family == auth->family
- && a->auth.address_length == auth->address_length
- && binary_equal (a->auth.address, auth->address, auth->address_length)
- && a->auth.number_length == auth->number_length
- && binary_equal (a->auth.number, auth->number, auth->number_length)
- && a->auth.name_length == auth->name_length
- && binary_equal (a->auth.name, auth->name, auth->name_length))
- {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-/* Add one item to our list of auth items. */
-static void
-add_auth_item (Xauth *auth)
-{
- addr_list *a = malloc (sizeof (addr_list));
-
- a->auth.family = auth->family;
- a->auth.address_length = auth->address_length;
- a->auth.address = binary_dup (auth->address, auth->address_length);
- a->auth.number_length = auth->number_length;
- a->auth.number = binary_dup (auth->number, auth->number_length);
- a->auth.name_length = auth->name_length;
- a->auth.name = binary_dup (auth->name, auth->name_length);
- a->auth.data_length = auth->data_length;
- a->auth.data = binary_dup (auth->data, auth->data_length);
-
- a->next = addresses;
- addresses = a;
-}
-
-/* Free all allocated auth items. */
-static void
-free_auth_items (void)
-{
- addr_list *a;
-
- while ((a = addresses) != NULL)
- {
- addresses = a->next;
-
- binary_free (a->auth.address, a->auth.address_length);
- binary_free (a->auth.number, a->auth.number_length);
- binary_free (a->auth.name, a->auth.name_length);
- binary_free (a->auth.data, a->auth.data_length);
- free (a);
- }
-}
-
-/* Add the unix domain auth item. */
-static void
-define_local (Xauth *auth)
-{
- char *host = host_name ();
-
-#ifdef DEBUG
- fprintf (stderr, "x11: hostname is %s\n", host);
-#endif
-
- auth->family = FamilyLocal;
- auth->address_length = strlen (host);
- auth->address = host;
-
- add_auth_item (auth);
-}
-
-/* Add the tcp auth item. */
-static void
-define_named (Xauth *auth, const char *name)
-{
- struct ifaddrs *addrs, *ptr;
-
- if (getifaddrs (&addrs) != 0)
- return;
-
- for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next)
- {
- if (ptr->ifa_addr->sa_family != AF_INET)
- continue;
-
- auth->family = FamilyInternet;
- auth->address_length = sizeof (struct in_addr);
- auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr);
-
-#ifdef DEBUG
- fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n",
- (unsigned char) auth->address[0],
- (unsigned char) auth->address[1],
- (unsigned char) auth->address[2],
- (unsigned char) auth->address[3]);
-#endif
-
- add_auth_item (auth);
- }
-
- freeifaddrs (addrs);
-}
-
-/* Parse the display number from NAME and add it to AUTH. */
-static void
-set_auth_number (Xauth *auth, const char *name)
-{
- char *colon;
- char *dot, *number;
-
- colon = strrchr(name, ':');
- if (colon != NULL)
- {
- colon++;
- dot = strchr(colon, '.');
-
- if (dot != NULL)
- auth->number_length = dot - colon;
- else
- auth->number_length = strlen (colon);
-
- number = malloc (auth->number_length + 1);
- if (number != NULL)
- {
- strncpy (number, colon, auth->number_length);
- number[auth->number_length] = '\0';
- }
- else
- {
- auth->number_length = 0;
- }
-
- auth->number = number;
- }
-}
-
-/* Put 128 bits of random data into DATA. If possible, it will be "high
- quality" */
-static int
-generate_mit_magic_cookie (char data[16])
-{
- int fd, ret, i;
- long *ldata = (long *) data;
-
- fd = open ("/dev/random", O_RDONLY);
- if (fd > 0) {
- ret = read (fd, data, 16);
- close (fd);
- if (ret == 16) return TRUE;
- }
-
- /* fall back to the usual crappy rng */
-
- srand48 (getpid () ^ time (NULL));
-
- for (i = 0; i < 4; i++)
- ldata[i] = lrand48 ();
-
- return TRUE;
-}
-
-/* Create the keys we'll be using for the display named NAME. */
-static int
-make_auth_keys (const char *name)
-{
- Xauth auth;
- char key[16];
-
- if (auth_file == NULL)
- return FALSE;
-
- auth.name = "MIT-MAGIC-COOKIE-1";
- auth.name_length = strlen (auth.name);
-
- if (!generate_mit_magic_cookie (key))
- {
- auth_file = NULL;
- return FALSE;
- }
-
- auth.data = key;
- auth.data_length = 16;
-
- set_auth_number (&auth, name);
-
- define_named (&auth, host_name ());
- define_local (&auth);
-
- free (auth.number);
-
- return TRUE;
-}
-
-/* If ADD-ENTRIES is true, merge our auth entries into the existing
- Xauthority file. If ADD-ENTRIES is false, remove our entries. */
-static int
-write_auth_file (int add_entries)
-{
- char *home, newname[1024];
- int fd, ret;
- FILE *new_fh, *old_fh;
- addr_list *addr;
- Xauth *auth;
-
- if (auth_file == NULL)
- return FALSE;
-
- home = getenv ("HOME");
- if (home == NULL)
- {
- auth_file = NULL;
- return FALSE;
- }
-
- snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home);
- mktemp (newname);
-
- if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS)
- {
- /* FIXME: do something here? */
-
- auth_file = NULL;
- return FALSE;
- }
-
- fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd >= 0)
- {
- new_fh = fdopen (fd, "w");
- if (new_fh != NULL)
- {
- if (add_entries)
- {
- for (addr = addresses; addr != NULL; addr = addr->next)
- {
- XauWriteAuth (new_fh, &addr->auth);
- }
- }
-
- old_fh = fopen (auth_file, "r");
- if (old_fh != NULL)
- {
- while ((auth = XauReadAuth (old_fh)) != NULL)
- {
- if (!check_auth_item (auth))
- XauWriteAuth (new_fh, auth);
- XauDisposeAuth (auth);
- }
- fclose (old_fh);
- }
-
- fclose (new_fh);
- unlink (auth_file);
-
- ret = rename (newname, auth_file);
-
- if (ret != 0)
- auth_file = NULL;
-
- XauUnlockAuth (auth_file);
- return ret == 0;
- }
-
- close (fd);
- }
-
- XauUnlockAuth (auth_file);
- auth_file = NULL;
- return FALSE;
-}
-
-
-/* Subprocess management functions. */
-
-static int
-start_server (char **xargv)
-{
- int child;
-
- child = fork ();
-
- switch (child)
- {
- case -1: /* error */
- perror ("fork");
- return FALSE;
-
- case 0: /* child */
- execv (X_SERVER, xargv);
- perror ("Couldn't exec " X_SERVER);
- _exit (1);
-
- default: /* parent */
- server_pid = child;
- return TRUE;
- }
-}
-
-static int
-wait_for_server (void)
-{
- int count = 100;
-
- while (count-- > 0)
- {
- int status;
-
- server_dpy = XOpenDisplay (server_name);
- if (server_dpy != NULL)
- return TRUE;
-
- if (waitpid (server_pid, &status, WNOHANG) == server_pid)
- return FALSE;
-
- sleep (1);
- }
-
- return FALSE;
-}
-
-static int
-start_client (void)
-{
- int child;
-
- child = fork();
-
- switch (child) {
- char *temp, buf[1024];
-
- case -1: /* error */
- perror("fork");
- return FALSE;
-
- case 0: /* child */
- /* Setup environment */
- temp = getenv("DISPLAY");
- if (temp != NULL && temp[0] != 0)
- setenv("DISPLAY", server_name, TRUE);
-
- temp = getenv("PATH");
- if (temp == NULL || temp[0] == 0)
- setenv ("PATH", DEFAULT_PATH, TRUE);
- else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) {
- snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp);
- setenv("PATH", buf, TRUE);
- }
-
- /* First try value of $XINITRC, if set. */
- temp = getenv("XINITRC");
- if (temp != NULL && temp[0] != 0 && access(temp, R_OK) == 0)
- execlp (SHELL, SHELL, temp, NULL);
-
- /* Then look for .xinitrc in user's home directory. */
- temp = getenv("HOME");
- if (temp != NULL && temp[0] != 0) {
- chdir(temp);
- snprintf (buf, sizeof (buf), "%s/.xinitrc", temp);
- if (access(buf, R_OK) == 0)
- execlp(SHELL, SHELL, buf, NULL);
- }
-
- /* Then try the default xinitrc in the lib directory. */
-
- if (access(DEFAULT_XINITRC, R_OK) == 0)
- execlp(SHELL, SHELL, DEFAULT_XINITRC, NULL);
-
- /* Then fallback to hardcoding an xterm and the window manager. */
-
- // system(XTERM_PATH " &");
- execl(WM_PATH, WM_PATH, NULL);
-
- perror("exec");
- _exit(1);
-
- default: /* parent */
- client_pid = child;
- return TRUE;
- }
-}
-
-static void
-sigchld_handler (int sig)
-{
- int pid, status;
-
- again:
- pid = waitpid (WAIT_ANY, &status, WNOHANG);
-
- if (pid > 0)
- {
- if (pid == server_pid)
- {
- server_pid = -1;
-
- if (client_pid >= 0)
- kill (client_pid, SIGTERM);
- }
- else if (pid == client_pid)
- {
- client_pid = -1;
-
- if (server_pid >= 0 && xinit_kills_server)
- kill (server_pid, SIGTERM);
- }
- goto again;
- }
-
- if (server_pid == -1 && client_pid == -1)
- longjmp (exit_continuation, 1);
-
- signal (SIGCHLD, sigchld_handler);
-}
-
-
-/* Server utilities. */
-
-static Boolean
-display_exists_p (int number)
-{
- char buf[64];
-#ifdef USE_XCB
- xcb_connection_t *conn;
-#endif
-
- /* Since connecting to the display waits for a few seconds if the
- display doesn't exist, check for trivial non-existence - if the
- socket in /tmp exists or not.. (note: if the socket exists, the
- server may still not, so we need to try to connect in that case..) */
-
- sprintf (buf, "/tmp/.X11-unix/X%d", number);
- if (access (buf, F_OK) != 0) return FALSE;
-
-#ifdef USE_XCB
- sprintf (buf, ":%d", number);
- conn = xcb_connect(buf, NULL);
- if (conn == NULL) return FALSE;
- xcb_disconnect(conn);
-#endif
-
- return TRUE;
-}
-
-
-/* Monitoring when the system's ip addresses change. */
-
-static Boolean pending_timer;
-
-static void
-timer_callback (CFRunLoopTimerRef timer, void *info)
-{
- pending_timer = FALSE;
-
- /* Update authentication names. Need to write .Xauthority file first
- without the existing entries, then again with the new entries.. */
-
- write_auth_file (FALSE);
-
- free_auth_items ();
- make_auth_keys (server_name);
-
- write_auth_file (TRUE);
-}
-
-/* This function is called when the system's ip addresses may have changed. */
-static void
-ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info)
-{
-#if DEBUG
- if (changed_keys != NULL) {
- fprintf (stderr, "x11: changed sc keys: ");
- CFShow (changed_keys);
- }
-#endif
-
- if (auth_file != NULL && !pending_timer)
- {
- CFRunLoopTimerRef timer;
-
- timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0,
- 0.0, 0, 0, timer_callback, NULL);
- CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer,
- kCFRunLoopDefaultMode);
- CFRelease (timer);
-
- pending_timer = TRUE;
- }
-}
-
-/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */
-static Boolean
-install_ipaddr_source (void)
-{
- CFRunLoopSourceRef source = NULL;
-
- SCDynamicStoreContext context = {0};
- SCDynamicStoreRef ref;
-
- ref = SCDynamicStoreCreate (NULL,
- CFSTR ("AddIPAddressListChangeCallbackSCF"),
- ipaddr_callback, &context);
-
- if (ref != NULL)
- {
- const void *keys[4], *patterns[2];
- int i;
-
- keys[0] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4);
- keys[1] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv6);
- keys[2] = SCDynamicStoreKeyCreateComputerName (NULL);
- keys[3] = SCDynamicStoreKeyCreateHostNames (NULL);
-
- patterns[0] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4);
- patterns[1] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv6);
-
- if (keys[0] != NULL && keys[1] != NULL && keys[2] != NULL
- && keys[3] != NULL && patterns[0] != NULL && patterns[1] != NULL)
- {
- CFArrayRef key_array, pattern_array;
-
- key_array = CFArrayCreate (NULL, keys, 4, &kCFTypeArrayCallBacks);
- pattern_array = CFArrayCreate (NULL, patterns, 2, &kCFTypeArrayCallBacks);
-
- if (key_array != NULL || pattern_array != NULL)
- {
- SCDynamicStoreSetNotificationKeys (ref, key_array, pattern_array);
- source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0);
- }
-
- if (key_array != NULL)
- CFRelease (key_array);
- if (pattern_array != NULL)
- CFRelease (pattern_array);
- }
-
-
- for (i = 0; i < 4; i++)
- if (keys[i] != NULL)
- CFRelease (keys[i]);
- for (i = 0; i < 2; i++)
- if (patterns[i] != NULL)
- CFRelease (patterns[i]);
-
- CFRelease (ref);
- }
-
- if (source != NULL)
- {
- CFRunLoopAddSource (CFRunLoopGetCurrent (),
- source, kCFRunLoopDefaultMode);
- CFRelease (source);
- }
-
- return source != NULL;
-}
-
-
-/* Entrypoint. */
-
-void
-termination_signal_handler (int unused_sig)
-{
- signal (SIGTERM, SIG_DFL);
- signal (SIGHUP, SIG_DFL);
- signal (SIGINT, SIG_DFL);
- signal (SIGQUIT, SIG_DFL);
-
- longjmp (exit_continuation, 1);
-}
-
-int
-main (int argc, char **argv)
-{
- char **xargv;
- int i, j;
- int fd;
-
- xargv = alloca (sizeof (char *) * (argc + 32));
-
- if (!read_boolean_pref (CFSTR ("no_auth"), FALSE))
- auth_file = XauFileName ();
-
- /* The standard X11 behaviour is for the server to quit when the first
- client exits. But it can be useful for debugging (and to mimic our
- behaviour in the beta releases) to not do that. */
-
- xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE);
-
- for (i = 1; i < argc; i++)
- {
- if (argv[i][0] == ':')
- server_name = argv[i];
- }
-
- if (server_name == NULL)
- {
- static char name[8];
-
- /* No display number specified, so search for the first unused.
-
- There's a big old race condition here if two servers start at
- the same time, but that's fairly unlikely. We could create
- lockfiles or something, but that's seems more likely to cause
- problems than the race condition itself.. */
-
- for (i = 0; i < MAX_DISPLAYS; i++)
- {
- if (!display_exists_p (i))
- break;
- }
-
- if (i == MAX_DISPLAYS)
- {
- fprintf (stderr, "%s: couldn't allocate a display number", argv[0]);
- exit (1);
- }
-
- sprintf (name, ":%d", i);
- server_name = name;
- }
-
- if (auth_file != NULL)
- {
- /* Create new Xauth keys and add them to the .Xauthority file */
-
- make_auth_keys (server_name);
- write_auth_file (TRUE);
- }
-
- /* Construct our new argv */
-
- i = j = 0;
-
- xargv[i++] = argv[j++];
-
- if (auth_file != NULL)
- {
- xargv[i++] = "-auth";
- xargv[i++] = auth_file;
- }
-
- /* By default, don't listen on tcp sockets if Xauth is disabled. */
-
- if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL))
- {
- xargv[i++] = "-nolisten";
- xargv[i++] = "tcp";
- }
-
- while (j < argc)
- {
- if (argv[j++][0] != ':')
- xargv[i++] = argv[j-1];
- }
-
- xargv[i++] = (char *) server_name;
- xargv[i++] = NULL;
-
- /* Detach from any controlling terminal and connect stdin to /dev/null */
-
-#ifdef TIOCNOTTY
- fd = open ("/dev/tty", O_RDONLY);
- if (fd != -1)
- {
- ioctl (fd, TIOCNOTTY, 0);
- close (fd);
- }
-#endif
-
- fd = open ("/dev/null", O_RDWR, 0);
- if (fd >= 0)
- {
- dup2 (fd, 0);
- if (fd > 0)
- close (fd);
- }
-
- if (!start_server (xargv))
- return 1;
-
- if (!wait_for_server ())
- {
- kill (server_pid, SIGTERM);
- return 1;
- }
-
- if (!start_client ())
- {
- kill (server_pid, SIGTERM);
- return 1;
- }
-
- signal (SIGCHLD, sigchld_handler);
-
- signal (SIGTERM, termination_signal_handler);
- signal (SIGHUP, termination_signal_handler);
- signal (SIGINT, termination_signal_handler);
- signal (SIGQUIT, termination_signal_handler);
-
- if (setjmp (exit_continuation) == 0)
- {
- if (install_ipaddr_source ())
- CFRunLoopRun ();
- else
- while (1) pause ();
- }
-
- signal (SIGCHLD, SIG_IGN);
-
- if (client_pid >= 0) kill (client_pid, SIGTERM);
- if (server_pid >= 0) kill (server_pid, SIGTERM);
-
- if (auth_file != NULL)
- {
- /* Remove our Xauth keys */
-
- write_auth_file (FALSE);
- }
-
- free_auth_items ();
-
- return 0;
-}
diff --git a/hw/darwin/bundle/Dutch.lproj/Credits.rtf b/hw/darwin/bundle/Dutch.lproj/Credits.rtf
deleted file mode 100644
index 5858e5933..000000000
--- a/hw/darwin/bundle/Dutch.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww9000\viewh9000\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/Dutch.lproj/Localizable.strings b/hw/darwin/bundle/Dutch.lproj/Localizable.strings
deleted file mode 100644
index 6abd91072..000000000
--- a/hw/darwin/bundle/Dutch.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 8e9224cb6..000000000
--- a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Dutch.lproj/Makefile.am b/hw/darwin/bundle/Dutch.lproj/Makefile.am
deleted file mode 100644
index a480ceeb3..000000000
--- a/hw/darwin/bundle/Dutch.lproj/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Dutchlprojdir = $(resourcesdir)/Dutch.lproj
-
-Dutchlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Dutchlprojnibdir = $(Dutchlprojdir)/MainMenu.nib
-Dutchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 4b8e6f5cb..000000000
--- a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>Inhoud</h2>
-<ol>
- <li><A HREF="#notice">Belangrijke Informatie</A></li>
- <li><A HREF="#usage">Gebruik</A></li>
- <li><A HREF="#path">Instellen van het Path</A></li>
- <li><A HREF="#prefs">Voorkeursinstellingen</A></li>
- <li><A HREF="#license">Licentie</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Belangrijke Informatie</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-Dit is een pre-release van XDarwin, waarvoor geen ondersteuning beschikbaar is. Rapporteren van bugs en aanleveren van patches kan op de <A HREF="http://sourceforge.net/projects/xonx/">XonX project pagina</A> bij SourceForge. Kijk alvorens een bug te rapporteren in een pre-release eerst of een nieuwe versie beschikbaar is bij <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> of de X_VENDOR_LINK.
-#else
-Als de server ouder is dan 6-12 maanden, of als uw hardware nieuwer is dan de bovenstaande datum, kijk dan of een nieuwe versie beschikbaar is voor u een probleem aanmeldt. Rapporteren van bugs en aanleveren van patches kan op de <A HREF="http://sourceforge.net/projects/xonx/">XonX project pagina</A> bij SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Deze software is beschikbaar gesteld onder de voorwaarden van de <A HREF="#license">MIT X11 / X Consortium Licentie</A> en is beschikbaar 'AS IS',zonder enige garantie. Lees s.v.p. de <A HREF="#license">Licentie</A> voor gebruik.</blockquote>
-
-<h2><a NAME="usage">Gebruik</a></h2>
-<p>XDarwin is een open-source X server van het <a HREF="http://www.x.org/">X Window Systeem</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin werkt op Mac OS X in schermvullende of rootless modus.</p>
-<p>Het X window systeem in schermvullende modus neemt het hele beeldscherm in beslag. U schakelt terug naar de Mac OS X desktop door de toesten Command-Option-A in te drukken. Deze toetsencombinatie kunt u veranderen in de Voorkeuren. Op de Mac OS X desktop klikt u op de XDarwin icoon in de Dock om weer naar het X window systeem te schakelen. (In de Voorkeuren kunt er voor kiezen om een apart XDarwin schakelpaneel te gebruiken op de Mac OS X desktop.)</p>
-<p>In rootless modus verschijnen het X window systeem en Aqua (de Mac OS X desktop) tegelijk op het scherm. Het achtergrondscherm van X11, waarbinnen alle X11 vensters vallen, is net zo groot als het gehele scherm, maar het achtergrondscherm zelf is onzichtbaar.</p>
-
-<h3>Meerknopsmuis emulatie</h3>
-<p>Voor veel X11 programma's hebt u een 3-knops muis nodig. Met een 1-knops muis kunt u een 3-knops muis nabootsen door een toets in te drukken terwijl u klikt met de muis. Het instellen hiervan kan bij Voorkeuren, "Meerknopsmuis emulatie" in "Algemeen". Emulatie is standaard ingeschakeld: ingedrukt houden van de "command" toets terwijl u klikt emuleert knop 2, ingedrukt houden van "option" emuleert knop 3. Deze toetsen kunt u dus wijzigen in de Voorkeuren. Let op: als u xmodmap gebruikt om de indeling van het toetsenbord te wijzigen, moet u toch de oorspronkelijke toetsen op het toetsenbord gebruiken voor deze functie.</p>
-
-<h2><a NAME="path">Instellen van het Path</a></h2>
-<p>Het path is de lijst van directories waarin gezocht wordt naar commando's. De X11 commando's staan in de directory <code>/usr/X11R6/bin</code>, die dus aan uw path moet worden toegevoegd. XDarwin doet dit automatisch voor u en kan extra directories toevoegen waarin u commando's hebt ge&iuml;nstalleerd.</p>
-
-<p>Ervaren gebruikers zullen het path al correct hebben ingesteld in de configuratiebestanden voor hun shell. In dat geval kunt u XDarwin via de Voorkeuren vertellen het path niet te wijzigen. XDarwin start de eerste X11 clients binnen de standaard login shell van de gebruiker (bij de Voorkeuren kunt u een afwijkende shell opgeven). Het instellen van het path is afhankelijk van de shell. Zie hiervoor de man pages voor de shell.</p>
-
-<p>Het kan handig zijn de manualpages voor X11 toe te voegen aan de lijst waarin gezocht wordt als u documentatie opvraagt. De manualpages voor X11 staan in <code>/usr/X11R6/man</code> en de <code>MANPATH</code> environment variable bevat de lijst van directories waarin naar documentatie wordt gezocht.</p>
-
-<h2><a NAME="prefs">Voorkeursinstellingen</a></h2>
-<p>Een aantal instellingen kan worden gewijzigd door "Voorkeuren..." te kiezen in het "XDarwin" menu. Wijzigingen van de instellingen genoemd onder "Start" gaan pas in als u XDarwin opnieuw hebt gestart. Een wijziging van de overige instellingen is direct effectief. Hier onder vindt u de verschillende mogelijkheden beschreven:</p>
-
-<h3>Algemeen</h3>
-<ul>
- <li><b>Gebruik systeempiep voor X11:</b> Als u dit inschakelt wordt het Mac OS X waarschuwingssignaal ook gebruikt door X11, anders gebruikt X11 een simpele pieptoon (dit is de standaardinstelling).</li>
- <li><b>Wijzigen muis-versnelling door X11 mogelijk:</b> In een standaard X window systeem kan de window manager de muis-versnelling aanpassen. Dit kan verwarrend zijn omdat de snelheid onder X11 dan verschillend kan zijn van de snelheid die u in Mac OS X bij Systeemvoorkeuren hebt ingesteld. Om verwarring te voorkomen is de standaardinstelling dat X11 de versnelling niet kan wijzigen.</li>
- <li><b>Meerknopsmuis emulatie:</b> Dit is hierboven beschreven bij <a HREF="#usage">Gebruik</a>. Als emulatie is ingeschakeld moet u de gekozen toetsen ingedrukt houden terwijl u met de muis klikt om de tweede en derde muisknop na te bootsen.</li>
-</ul>
-
-<h3>Start</h3>
-<ul>
- <li><b>Standaard modus:</b> Hier kiest u de standaard scherm-modus: schermvullend of rootless (hierboven beschreven bij <a HREF="#usage">Gebruik</a>). U kunt ook kiezen tijdens het starten van XDarwin, zie de optie hieronder.</li>
- <li><b>Kies scherm-modus tijdens start:</b> Dit is standaard ingeschakeld zodat u tijdens het starten van XDarwin kunt kiezen tussen schermvullend en rootless scherm-modus. Als u dit uitschakelt start XDarwin in de standaard modus zonder u iets te vragen.</li>
- <li><b>X11 scherm nummer:</b> Met X11 kunnen meerdere schermen worden aangestuurd door verschillende X servers op dezelfde computer. Als u meerdere X servers tegelijk wilt gebruiken stelt u hier het scherm nummer in dat door XDarwin wordt gebruikt.</li>
- <li><b>Xinerama multi-monitor ondersteuning mogelijk:</b> XDarwin ondersteunt het gebruik van meerdere monitoren met Xinerama, waarbij elke monitor wordt gezien als deel van &eacute;&eacute;n groot rechthoekig scherm. U kunt Xinerama hier uitschakelen, maar XDarwin werkt op dit moment zonder Xinerama niet goed met meerdere monitoren. Als u maar 1 monitor gebruikt is deze instelling automatisch uitgeschakeld.</li>
- <li><b>Toetsenbordindeling-bestand:</b> Een toetsenbordindeling-bestand wordt bij het starten geladen en omgezet naar een X11 toetsenbordindeling. Voor verschillende talen vindt u toetsenbordindelingen in de directory <code>/System/Library/Keyboards</code>.</li>
- <li><b>Bij starten eerste X11 clients:</b> Als XDarwin start, wordt <code>xinit</code> uitgevoerd om de X window manager en andere X clients te starten (zie "<code>man xinit</code>"). Voordat XDarwin <code>xinit</code> uitvoert voegt het de opgegeven directories toe aan het path. Standaard wordt alleen <code>/usr/X11R6/bin</code> toegevoegd. U kunt meerdere directories opgeven, gescheiden door een dubbelepunt. X clients worden gestart met de standaard login shell van de gebruiker met gebruik van de configuratiebestanden voor die shell. U kunt een afwijkende shell opgeven.</li>
-</ul>
-
-<h3>Schermvullend</h3>
-<ul>
- <li><b>Toetscombinatie knop:</b> Klik op deze knop om de toetscombinatie te wijzigen waarmee u tussen de Mac OS X desktop en X11 schakelt. Als toetscombinatie kunt u elke combinatie gebruiken van de shift, control, command en option toetsen samen met &eacute;&eacute;n normale toets.</li>
- <li><b>Klikken op icoon in Dock schakelt naar X11:</b> Hiermee is een klik op de XDarwin icoon in de Dock voldoende om naar X11 te schakelen. In sommige versies van Mac OS X verdwijnt soms de cursor als u deze mogelijkheid gebruikt en daarna terugkeert naar de Mac OS X desktop.</li>
- <li><b>Toon help bij schermvullend starten:</b> Hiermee wordt een inleidend scherm getoond als XDarwin schermvullend start.</li>
- <li><b>Kleurdiepte:</b> In de schermvullende modus kan X11 een andere kleurdiepte gebruiken dan Aqua (en de Mac OS X desktop). Als u "Huidig" kiest, neemt XDarwin bij het starten de kleurdiepte over van Aqua. U kunt ook kiezen voor 8, 15 of 24 bits.</li>
-</ul>
-
-<h2><a NAME="license">Licentie</a></h2>
-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/English.lproj/Credits.rtf b/hw/darwin/bundle/English.lproj/Credits.rtf
deleted file mode 100644
index 34408e78c..000000000
--- a/hw/darwin/bundle/English.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
deleted file mode 100644
index 268b80091..000000000
--- a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-/* English versions of the Info.plist keys; used by most localizations. */
-/* Most of these are set in the target application settings. */
-
-NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__;
diff --git a/hw/darwin/bundle/English.lproj/Localizable.strings b/hw/darwin/bundle/English.lproj/Localizable.strings
deleted file mode 100644
index 6f6487902..000000000
--- a/hw/darwin/bundle/English.lproj/Localizable.strings
+++ /dev/null
@@ -1,22 +0,0 @@
-/* English localized versions of strings used by the Mac OS X front end. */
-
-/* Title of alert panel */
-"Quit X server?" = "Quit X server?";
-
-/* Text of alert panel */
-"Quitting the X server will terminate any running X Window System programs." = "Quitting the X server will terminate any running X Window System programs.";
-
-/* Quit */
-"Quit" = "Quit";
-
-/* Cancel */
-"Cancel" = "Cancel";
-
-/* Default keymapping file */
-"USA.keymapping" = "USA.keymapping";
-
-/* Default switch string */
-"Cmd-Opt-a" = "Cmd-Opt-a";
-
-/* Button title when changing switch key */
-"Press key" = "Press key";
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index ebbfd8317..000000000
--- a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/English.lproj/Makefile.am b/hw/darwin/bundle/English.lproj/Makefile.am
deleted file mode 100644
index 45587086f..000000000
--- a/hw/darwin/bundle/English.lproj/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Englishlprojdir = $(resourcesdir)/English.lproj
-Englishlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Englishlprojnibdir = $(Englishlprojdir)/MainMenu.nib
-Englishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp \
- InfoPlist.strings.cpp
diff --git a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670d9..000000000
--- a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
- <li><A HREF="#notice">Important Notice</A></li>
- <li><A HREF="#usage">Usage</A></li>
- <li><A HREF="#path">Setting Your Path</A></li>
- <li><A HREF="#prefs">User Preferences</A></li>
- <li><A HREF="#license">License</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
- <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
- <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
- <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
- <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
- <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
- <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
- <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
- <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
- <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
- <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
- <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
- <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
- <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/French.lproj/Credits.rtf b/hw/darwin/bundle/French.lproj/Credits.rtf
deleted file mode 100644
index 17e0a0d70..000000000
--- a/hw/darwin/bundle/French.lproj/Credits.rtf
+++ /dev/null
@@ -1,166 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh4480\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 \
-Participants \'88 XonX pour XFree86 4.2 :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Version pour Darwin x86
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Traduction en espagnol
-\f0\i0 \
-Paul Edens\
-
-\f2\i Traduction en allemand
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Traduction en cor\'8een
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Claviers non-US
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Direction du projet
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Traduction en allemand
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Traduction en su\'8edois
-\f0\i0 \
-Greg Parker\
-
-\f2\i Version \'c7 rootless \'c8
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Traduction en japonais
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i Traduction en fran\'8dais
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Remerciements :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman et Zero G Software, Inc.\
-
-\f2\i Installeur
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Participants \'88 XonX pour XFree86 4.2 :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Version pour Darwin x86
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Direction du projet
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Version Cocoa de l'interface de XDarwin
-\f0\i0 \
-Greg Parker\
-
-\f2\i Impl\'8ementation initiale sur Quartz
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Librairies partag\'8ees dynamiquement
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Traduction en japonais
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Remerciements :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
- Ic\'99ne
-\f2\i XDarwin
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Historique :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Premi\'8fre adaptation de XFree86 sur Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i Adaptation de Free86 4.0 pour Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Int\'8egration dans le projet XFree86 pour la version 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/French.lproj/Localizable.strings b/hw/darwin/bundle/French.lproj/Localizable.strings
deleted file mode 100644
index 21c4a99c1..000000000
--- a/hw/darwin/bundle/French.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 109d5cc6f..000000000
--- a/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/French.lproj/Makefile.am b/hw/darwin/bundle/French.lproj/Makefile.am
deleted file mode 100644
index 656ba5c0d..000000000
--- a/hw/darwin/bundle/French.lproj/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Frenchlprojdir = $(resourcesdir)/French.lproj
-
-Frenchlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Frenchlprojnibdir = $(Frenchlprojdir)/MainMenu.nib
-Frenchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 512416b1b..000000000
--- a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server pour Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Date : X_REL_DATE
-</center>
-<h2>Sommaire</h2>
-<ol>
- <li><A HREF="#notice">Avertissement</A></li>
- <li><A HREF="#usage">Utilisation</A></li>
- <li><A HREF="#path">Chemins d'accès</A></li>
- <li><A HREF="#prefs">Préférences</A></li>
- <li><A HREF="#license">Licence</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Avertissement</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Ceci est une pré-version de XDarwin et ne fait par conséquent l'objet d'aucun support client. Les bogues peuvent être signalés et des patches peuvent être soumis sur la
-<A HREF="http://sourceforge.net/projects/xonx/">page du projet XonX</A> chez SourceForge. Veuillez prendre connaissance de la dernière version sur <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> ou le X_VENDOR_LINK avant de signaler un bogue d'une pré-version.
-#else
-Si le serveur date de plus de 6-12 mois ou si votre matériel est plus récent que la date indiquée ci-dessus, veuillez vous procurer une version plus récente avant de signaler toute anomalie. Les bogues peuvent être signalés et des patches peuvent être soumis sur la <A HREF="http://sourceforge.net/projects/xonx/">page du projet XonX</A> chez SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Ce logiciel est distribué sous la
-<A HREF="#license">Licence du Consortium X/X11 du MIT</A> et est fourni TEL QUEL, sans garanties. Veuillez prendre connaissance de la <A HREF="#license">Licence</A> avant toute utilisation.</blockquote>
-
-<h2><a NAME="usage">Utilisation</a></h2>
-<p>XDarwin est une X server libre et distribuable sans contrainte du <a HREF
-="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin fonctionne sous Mac OS X en mode « rootless » ou plein écran.</p>
-<p>Lorsque le système X window est actif en mode plein écran, il prend en charge la totalité de l'écran. Il est possible de revenir sur le bureau de Mac OS X en appuyant sur Commande-Option-A. Cette combinaison de touches peut être modifiée dans les préférences. Pour revenir dans X window, cliquer sur l'icône de XDarwin dans le Dock de Mac OS X. (Un réglage des préférences permet d'effectuer cette opération en cliquant dans une fenêtre flottante au lieu de l'icône du Dock)</p>
-<p>En mode « rootless », X window system et Aqua utilisent le même affichage. La fenêtre-mère de l'affichage X11 est de la taille de l'écran et contient toutes les autre fenêtres. En mode « rootless » cette fenêtre-mère n'est pas affichée car Aqua gère le fond d'écran.</p>
-<h3>Émulation de souris à plusieurs boutons</h3>
-<p>Le fonctionnement de la plupart des applications X11 repose sur l'utilisation d'une souris à 3 boutons. Il est possible d'émuler une souris à 3 boutons avec un seul bouton en appuyant sur des touches de modification. Ceci est réglé dans la section "Émulation de souris à plusieurs boutons" de l'onglet "Général" des préférences. L'émulation est activée par défaut. Dans ce cas, cliquer en appuyant simultanément sur la touche "commande" simulera le bouton du milieu. Cliquer en appuyant simultanément sur la touche "option" simulera le bouton de droite. Les préférences permettent de régler n'importe quelle combinaison de touches de modification pour émuler les boutons du milieu et de droite. Notez que même si les touches de modifications sont mises en correspondance avec d'autres touches par xmodmap, ce sont les touches originelles spécifiées dans les préférences qui assureront l'émulation d'une souris à plusieurs boutons.
-
-<h2><a NAME="path">Réglage du chemin d'accès</a></h2>
-<p>Le chemin d'accès est une liste de répertoires utilisés pour la recherche d'exécutables. Les commandes X11 sont situées dans <code>/usr/X11R6/bin</code>, qui doit être ajouté à votre chemin d'accès. XDarwin fait cela par défaut, et peut également ajouter d'autres répertoires dans lesquels vous auriez installé d'autre commandes unix.</p>
-<p>Les utilisateurs plus expérimentés auront déjà réglé leur chemin d'accès correctement par le biais des fichiers d'initialisation de leur shell. Dans ce cas, il est possible de demander à XDarwin de ne pas modifier le chemin d'accès initial. XDarwin lance les premiers clients X11 dans le shell d'ouverture de session par défaut. (Un shell de remplacement peut être spécifié dans les préférences.) La façon de régler le chemin d'accès dépend du shell utilisé. Ceci est documenté dans les pages "man" du shell.</p>
-<p>De plus, il est possible d'ajouter les pages "man" de X11 à la liste des pages recherchées pour la documentation "man". Les pages "man" X11 se trouvent dans <code>/usr/X11R6/man</code> et la variable d'environnement <code>MANPATH</code> contient la liste des répertoires dans lesquels chercher.</p>
-
-
-<h2><a NAME="prefs">Préférences</a></h2>
-<p>Un certain nombre d'options peuvent être réglées dans les préférences. On accède aux préférences en choisissant "Préférences..." dans le menu "XDarwin". Les options décrites comme options de démarrage ne prendront pas effet avant le redémarrage de XDarwin. Les autres options prennent immédiatement effet. Les différentes options sont détaillées ci-après :</p>
-<h3>Général</h3>
-<ul>
- <li><b>Utiliser le bip d'alerte Système dans X11 :</b> Cocher cette option pour que le son d'alerte standard de Mac OS X soit utilisé à la place du son d'alerte de X11. L'option n'est pas cochée ar défaut. Dans ce cas, un simple signal sonore est utilisé.</li>
- <li><b>Autoriser X11 à changer la vitesse de la souris :</b> Dans une implémentation classique du sytème X window, le gestionnaire de fenêtres peut modifier la vitesse de la souris. Cela peut s'avérer déroutant puisque le réglage de la vitesse de la souris peut être différent dans les préférences de Mac OS X et dans le gestionnaire X window. Par défaut, X11 n'est pas autorisé à changer la vitesse de la souris.</li>
- <li><b>Émulation de souris à plusieurs boutons :</b> Ceci est décrit ci-dessus à la rubrique <a HREF="#usage">Usage</a>. Lorsque l'émulation est activée, il suffit d'appuyer simultanément sur les touches modificatrices sélectionnées et sur le bouton de la souris afin d'émuler les boutons du milieu et de droite.</li>
-</ul>
-<h3>Démarrage</h3>
-<ul>
- <li><b>Mode par défaut :</b> Le mode spécifié à cet endroit sera utilisé si l'utilisateur ne l'indique pas au démarrage.</li>
- <li><b>Choix du mode d'affichage au démarrage</b> Par défaut, une fenêtre de dialogue est affichée au démarrage de XDarwin pour permettre à l'utilisateur de choisir entre le mode plein écran et le mode « rootless ». Si cette option est désactivée, le mode par défaut sera automatiquement utilisé.</li>
- <li><b>Numéro d'affichage (Display)</b> X11 offre la possibilité de plusieurs serveurs X sur un ordinateur. L'utilisateur doit spécifier ici le numéro d'affichage utilisé par XDarwin dans le cas où plusieurs serveurs X seraient en service simultanément.</li>
- <li><b>Autoriser la prise en charge Xinerama de plusieurs moniteurs :</b> XDarwin peut être utilisé avec plusieurs moniteur avec Xinerama, qui considère les différents moniteurs comme des parties d'un écran rectugulaire plus grand. Cette option permet de désactiver Xinerama mais XDarwin ne prend alors pour l'instant pas correctement en charge l'affichage sur plusieurs écrans. Si il n'y a qu'un seul moniteur, Xinerama est automatiquement désactivé.</li>
- <li><b>Fichier clavier :</b> Un fichier de correspondance de clavier est lu au démarrage puis transformé en un fihcier de correspondance clavier pour X11. Les fichiers de correspondance clavier, disponibles pour de nombreuses langues, se trouvent dans <code>/System/Library/Keyboards</code>.</li>
- <li><b>Démarrage des premiers clients X11 :</b> Lorsque XDarwin est démarré à partir du Finder, il lance <code>xinit</code> qui lance à son tour le gestionnaire X window ainsi que d'autres clients X. (Voir "<code>man xinit</code>" pour plus d'informations.) Avant de lancer <code>xinit</code>, XDarwin ajoute les répertoires ainsi spécifiés au chemin d'accès de l'utilisateur. Par défaut, seul <code>/usr/X11R6/bin</code> est ajouté. Il est possible d'ajouter d'autres répertoires en les séparants à l'aide de deux points (<code>:</code>). Les clients X sont démarrés à partir du shell par défaut de l'utilisateur. Ainsi, le fichier d'initialisation de shell de l'utilisateur est lu. Un autre shell peut éventuellement être spécifié.</li>
-</ul>
-<h3>Plein écran</h3>
-<ul>
- <li><b>Combinaison de touches :</b> Appuyer sur ce bouton, puis appuyer sur une ou plusieurs touches modificatrices suivies d'une touche ordinaire. Cette combinaison de touche servira à commuter entre Aqua et X11.</li>
- <li><b>Basculer dans X11 en cliquant sur l'icône du Dock :</b> Cette option permet de passer dans X11 en cliquant dans l'icône de XDarwin dans le Dock. Sur certaines versions de Mac OS X, la commutation en utilisant le Dock peut faire disparaître le curseur lors du retour dans Aqua.</li>
- <li><b>Afficher l'aide du mode plein écran au démarrage :</b> Permet l'affichage d'une fenêtre d'introduction lorsque XDarwin est démarré en mode plein écran.</li>
- <li><b>Profondeur de couleur :</b> En mode plein écran, l'affichage X11 peut utiliser une autre profondeur de couleur que celle employée par Aqua. Si "Actuelle" est choisi, XDarwin utilisera la même profondeur de couleur qu'Aqua. Les autres choix sont 8 (256 couleurs), 15 (milliers de couleurs) et 24 bits (millions de couleurs). </li>
-</ul>
-
-<h2><a NAME="license">Licence</a></h2>
-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/German.lproj/Credits.rtf b/hw/darwin/bundle/German.lproj/Credits.rtf
deleted file mode 100644
index 34408e78c..000000000
--- a/hw/darwin/bundle/German.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/German.lproj/Localizable.strings b/hw/darwin/bundle/German.lproj/Localizable.strings
deleted file mode 100644
index 5db6306ec..000000000
--- a/hw/darwin/bundle/German.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 28fff8920..000000000
--- a/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/German.lproj/Makefile.am b/hw/darwin/bundle/German.lproj/Makefile.am
deleted file mode 100644
index 17af414ec..000000000
--- a/hw/darwin/bundle/German.lproj/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Germanlprojdir = $(resourcesdir)/German.lproj
-
-Germanlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Germanlprojnibdir = $(Germanlprojdir)/MainMenu.nib
-Germanlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670d9..000000000
--- a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
- <li><A HREF="#notice">Important Notice</A></li>
- <li><A HREF="#usage">Usage</A></li>
- <li><A HREF="#path">Setting Your Path</A></li>
- <li><A HREF="#prefs">User Preferences</A></li>
- <li><A HREF="#license">License</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
- <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
- <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
- <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
- <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
- <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
- <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
- <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
- <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
- <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
- <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
- <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
- <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
- <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Info.plist b/hw/darwin/bundle/Info.plist
deleted file mode 100644
index bfef48d26..000000000
--- a/hw/darwin/bundle/Info.plist
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>x11app</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>X11 Application</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>****</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- </dict>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>tool</string>
- <string>*</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>UNIX Application</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>****</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- </dict>
- </array>
- <key>CFBundleExecutable</key>
- <string>XDarwin</string>
- <key>CFBundleGetInfoString</key>
- <string>XDarwin 1.4.0, X.Org Foundation</string>
- <key>CFBundleIconFile</key>
- <string>XDarwin.icns</string>
- <key>CFBundleIdentifier</key>
- <string>org.x.XDarwin</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>XDarwin</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>XDarwin 1.4.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string></string>
- <key>NSHelpFile</key>
- <string>XDarwinHelp.html</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>XApplication</string>
-</dict>
-</plist>
diff --git a/hw/darwin/bundle/Japanese.lproj/Credits.rtf b/hw/darwin/bundle/Japanese.lproj/Credits.rtf
deleted file mode 100644
index cf9eae207..000000000
--- a/hw/darwin/bundle/Japanese.lproj/Credits.rtf
+++ /dev/null
@@ -1,193 +0,0 @@
-{\rtf1\mac\ansicpg10001\cocoartf102
-{\fonttbl\f0\fnil\fcharset78 HiraKakuPro-W3;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Bold;
-\f3\fswiss\fcharset77 Helvetica-Oblique;}
-{\colortbl;\red255\green255\blue255;}
-\vieww13980\viewh11160\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 \'82\'b1\'82\'cc\'90\'bb\'95\'69\'82\'cd
-\f1 XFree86
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67
-\f1 (http://www.xfree86.org/)
-\f0 \'82\'a8\'82\'e6\'82\'d1\'82\'bb\'82\'cc\'8d\'76\'8c\'a3\'8e\'d2\'82\'c9\'82\'e6\'82\'c1\'82\'c4\'8a\'4a\'94\'ad\'82\'b3\'82\'ea\'82\'bd\'83\'5c\'83\'74\'83\'67\'83\'45\'83\'46\'83\'41\'82\'f0\'8a\'dc\'82\'f1\'82\'c5\'82\'a2\'82\'dc\'82\'b7\'81\'42\'8e\'9f\'82\'cc\'90\'6c\'81\'58\'82\'cd Darwin
-\f1 /Mac OS X
-\f0 \'82\'cc\'83\'54\'83\'7c\'81\'5b\'83\'67\'82\'c9\'8d\'76\'8c\'a3\'82\'b5\'82\'dc\'82\'b5\'82\'bd\'81\'42
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 Contributors to Xorg Foundation Release:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f0 \'8d\'b6\'89\'45\'82\'cc Ctrl,Alt(Option),Meta(Command) \'82\'a8\'82\'e6\'82\'d1 Shift \'83\'4c\'81\'5b\'82\'cc\'93\'ae\'8d\'ec
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contributors to XFree86 4.4:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper
-\f3\i \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0\i0 \cf0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'41\'83\'4e\'83\'5a\'83\'89\'83\'8c\'81\'5b\'83\'56\'83\'87\'83\'93 \'82\'a8\'82\'e6\'82\'d1 Apple-WM \'8a\'67\'92\'a3
-\f1 \
-Torrey T. Lyons\
-
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f0 \'83\'7c\'83\'8b\'83\'67\'83\'4b\'83\'8b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Michael Oland\
-
-\f0 \'90\'56\'82\'b5\'82\'a2
-\f1 XDarwin
-\f0 \'83\'41\'83\'43\'83\'52\'83\'93
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
- Darwin x86
-\f3\i
-\f0\i0 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Pablo Di Noto\
-
-\f3\i
-\f0\i0 \'83\'58\'83\'79\'83\'43\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Paul Edens\
-
-\f3\i
-\f0\i0 \'83\'49\'83\'89\'83\'93\'83\'5f\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Kyunghwan Kim\
-
-\f3\i
-\f0\i0 \'8a\'d8\'8d\'91\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Mario Klebsch\
-
-\f0 \'94\'f1US\'83\'4c\'81\'5b\'83\'7b\'81\'5b\'83\'68 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Torrey T. Lyons\
-
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b
-\f1 \
-Andreas Monitzer\
-
-\f0 \'83\'68\'83\'43\'83\'63\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Patrik Montgomery\
-
-\f3\i
-\f0\i0 \'83\'58\'83\'45\'83\'46\'81\'5b\'83\'66\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Greg Parker\
-
-\f0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5
-\f1 \
-
-\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Olivier Verdier\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f3\i \cf0
-\f0\i0 \'83\'74\'83\'89\'83\'93\'83\'58\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f3\i
-\f0\i0 \'83\'43\'83\'93\'83\'58\'83\'67\'81\'5b\'83\'89
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
- Darwin x86
-\f0 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Torrey T. Lyons\
-
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b
-\f1 \
-Andreas Monitzer\
- Cocoa
-\f0 \'94\'c5 XDarwin \'83\'74\'83\'8d\'83\'93\'83\'67\'83\'47\'83\'93\'83\'68
-\f1 \
-Greg Parker\
-
-\f0 \'8d\'c5\'8f\'89\'82\'cc Quartz \'83\'43\'83\'93\'83\'76\'83\'8a\'83\'81\'83\'93\'83\'67
-\f1 \
-Christoph Pfisterer\
-
-\f0 \'8b\'a4\'97\'4c\'83\'89\'83\'43\'83\'75\'83\'89\'83\'8a
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5
-\f1 \
-
-\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 Special Thanks:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
- XDarwin
-\f0 \'83\'41\'83\'43\'83\'52\'83\'93
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 History:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f0 XFree86 \'82\'cc Mac OS X Server \'82\'d6\'82\'cc\'8d\'c5\'8f\'89\'82\'cc\'88\'da\'90\'41
-\f1 \
-Dave Zarzycki\
- XFree86 4.0
-\f0 \'82\'f0 Darwin 1.0 \'82\'c9\'88\'da\'90\'41
-\f1 \
-Torrey T. Lyons\
- XFree86 4.0.2
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67\'82\'d6\'82\'cc\'93\'9d\'8d\'87} \ No newline at end of file
diff --git a/hw/darwin/bundle/Japanese.lproj/Localizable.strings b/hw/darwin/bundle/Japanese.lproj/Localizable.strings
deleted file mode 100644
index c5c26d61a..000000000
--- a/hw/darwin/bundle/Japanese.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 357002706..000000000
--- a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Japanese.lproj/Makefile.am b/hw/darwin/bundle/Japanese.lproj/Makefile.am
deleted file mode 100644
index 2cc524858..000000000
--- a/hw/darwin/bundle/Japanese.lproj/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Japaneselprojdir = $(resourcesdir)/Japanese.lproj
-
-Japaneselproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Japaneselprojnibdir = $(Japaneselprojdir)/MainMenu.nib
-Japaneselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 6653f5bea..000000000
--- a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp,v 1.4 2001/11/27 07:27:46 torrey Exp $ -->
-
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
-<title>
-XDarwin Help</title></head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>Ìܼ¡</h2>
-<ol>
- <li><A HREF="#notice">Ãí°Õ»ö¹à</A></li>
- <li><A HREF="#usage">»ÈÍÑË¡</A></li>
- <li><A HREF="#path">¥Ñ¥¹¤ÎÀßÄê</A></li>
- <li><A HREF="#prefs">´Ä¶­ÀßÄê</A></li>
- <li><A HREF="#license">¥é¥¤¥»¥ó¥¹</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Ãí°Õ»ö¹à</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-¤³¤ì¤Ï¡¤XDarwin ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£
-¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î <A HREF="http://sourceforge.net/projects/xonx/">XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸</A>¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤<A HREF="http://sourceforge.net/projects/xonx/">XonX</A> ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï X_VENDOR_LINK¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£
-#else
-¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
-¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î <A HREF="http://sourceforge.net/projects/xonx/">XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸</A>¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-#endif
-</blockquote>
-<blockquote>
-ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤<A HREF="#license">MIT X11/X Consortium License</A> ¤Î¾ò·ï¤Ë´ð¤Å¤­¡¤ÌµÊݾڤǡ¤¡Ö¤½¤Î¤Þ¤Þ¡×¤Î·Á¤Ç¶¡µë¤µ¤ì¤Þ¤¹¡£
-¤´»ÈÍѤˤʤëÁ°¤Ë¡¤<A HREF="#license">¥é¥¤¥»¥ó¥¹¾ò·ï</A>¤ò¤ªÆɤ߲¼¤µ¤¤¡£
-</blockquote>
-
-<h2><a NAME="usage">»ÈÍÑË¡</a></h2>
-<p>XDarwin ¤Ï¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î <a HREF="http://www.x.org/">X Window System</a> ¤Î¤¿¤á¤Î X ¥µ¡¼¥Ð¡¼¤Î¼ÂÁõ¤Ç¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î XDarwin ¤Ï X_VENDOR_LINK ¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤Þ¤·¤¿¡£XDarwin ¤Ï¡¤Mac OS X ¾å¤Ç¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£</p>
-
-<p>¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£
-Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤é X Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£
-¡Ê´Ä¶­ÀßÄê¤Ç¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë</p>
-
-<p>¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤È Aqua ¤Ï²èÌ̤ò¶¦Í­¤·¤Þ¤¹¡£
-X11 ¤¬É½¼¨¤¹¤ë¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï²èÌ̤Υµ¥¤¥º¤Ç¤¢¤ê¡¤Â¾¤ÎÁ´¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£
-Aqua ¤¬¥Ç¥¹¥¯¥È¥Ã¥×¤ÎÇطʤòÀ©¸æ¤¹¤ë¤Î¤Ç¡¤X11 ¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£</p>
-
-<h3>Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó</h3>
-<p>¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¤°ì¤Ä¤Î¥Ü¥¿¥ó¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-¤³¤ì¤Ï¡¤´Ä¶­ÀßÄê¤Î¡Ö°ìÈÌÀßÄê¡×¤Î¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¡×¥»¥¯¥·¥ç¥ó¤ÇÀßÄꤷ¤Þ¤¹¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤ÏÍ­¸ú¤Ç¡¤¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£
-¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¡¤´Ä¶­ÀßÄê¤Ç¥Ü¥¿¥ó 2 ¤È 3 ¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë½¤¾þ¥­¡¼¤ÎÁȹ礻¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-Ãí¡§½¤¾þ¥­¡¼¤ò xmodmap ¤Ç¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£</p>
-
-<h2><a NAME="path">¥Ñ¥¹¤ÎÀßÄê</a></h2>
-<p>¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£
-X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤<code>/usr/X11R6/bin</code> ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-XDarwin ¤Ï¡¤¤³¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¹Ô¤¤¤Þ¤¹¡£¤Þ¤¿¡¤¤¢¤Ê¤¿¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ÄɲäΥǥ£¥ì¥¯¥È¥ê¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</p>
-
-<p>·Ð¸³Ë­¤«¤Ê¥æ¡¼¥¶¡¼¤Ï¡¤¤¹¤Ç¤Ë¼«¤é¤Î¥·¥§¥ë¤Î¤¿¤á¤Ë½é´ü²½¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Ñ¥¹¤òÀßÄꤷ¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£
-¤³¤Î¾ì¹ç¡¤¤¢¤Ê¤¿¤Ï´Ä¶­ÀßÄê¤Ç XDarwin ¤¬¤¢¤Ê¤¿¤Î¥Ñ¥¹¤òÊѹ¹¤·¤Ê¤¤¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-XDarwin ¤Ï¡¤¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤ÇºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤·¤Þ¤¹¡£
-¡Ê´Ä¶­ÀßÄê¤ÇÂå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë
-¥Ñ¥¹¤òÀßÄꤹ¤ëÊýË¡¤Ï¡¤¤¢¤Ê¤¿¤¬»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£
-¤³¤ì¤Ï¡¤¥·¥§¥ë¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¥É¥­¥å¥á¥ó¥È¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
-<p>¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï <code>/usr/X11R6/man</code> ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ <code>MANPATH</code> ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£</p>
-
-<h2><a NAME="prefs">´Ä¶­ÀßÄê</a></h2>
-<p>¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë´Ä¶­ÀßÄê¥Ñ¥Í¥ë¤Ç¡¤¤¤¤¯¤Ä¤«¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍƤϡ¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£
-¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍƤϡ¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£
-°Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:</p>
-
-<h3>°ìÈÌÀßÄê</h3>
-<ul>
- <li><b>X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë:</b> ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£</li>
- <li><b>X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë:</b> ɸ½àŪ¤Ê X Window System ¤Î¼ÂÁõ¤Ç¤Ï¡¤¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤Ï¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
- ¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤Ë Mac OS X ¤Î¥·¥¹¥Æ¥à´Ä¶­ÀßÄê¤È X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤¬°Û¤Ê¤ëÃͤòÀßÄꤷ¤¿¾ì¹ç¡¤¤³¤ì¤Ïº®Íð¤ò¾·¤­¤Þ¤¹¡£
- ¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¡¤¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤È¤·¤Þ¤»¤ó¡£</li>
- <li><b>Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó:</b> <a HREF="#usage">»ÈÍÑË¡</a>¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¥ª¥ó¤Î¾ì¹ç¡¤¥Þ¥¦¥¹¥Ü¥¿¥ó¤¬Âè 2 ¤Þ¤¿¤ÏÂè 3 ¤Î¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë»þ¤Ë¡¤ÁªÂò¤·¤¿½¤¾þ¥­¡¼¤òƱ»þ¤Ë²¡¤·¤Þ¤¹¡£</li>
-</ul>
-
-<h3>µ¯Æ°¥ª¥×¥·¥ç¥ó</h3>
-<ul>
- <li><b>²èÌ̥⡼¥É:</b> ¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¤¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥â¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£</li>
- <li><b>µ¯Æ°»þ¤Ë¥â¡¼¥ÉÁªÂò¥Ñ¥Í¥ë¤òɽ¼¨¤¹¤ë:</b> ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Îµ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÁªÂò¤¹¤ë¥Ñ¥Í¥ë¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬¥ª¥Õ¤Î¾ì¹ç¡¤²èÌ̥⡼¥É¤Ç»ØÄꤷ¤¿¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£</li>
- <li><b>X11 ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ:</b> X11¤Ï¡¤°ì¤Ä¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤ÇÊÌ¡¹¤Î X ¥µ¡¼¥Ð¡¼¤¬´ÉÍý¤¹¤ëÊ£¿ô¤Î¥Ç¥£¥¹¥×¥ì¥¤¤¬Â¸ºß¤¹¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£Ê£¿ô¤Î X ¥µ¡¼¥Ð¡¼¤¬Æ±»þ¤Ë¼Â¹Ô¤·¤Æ¤¤¤ë»þ¡¤XDarwin ¤¬»ÈÍѤ¹¤ë¥Ç¥£¥¹¥×¥ì¥¤¤ÎÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
- <li><b>Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤¹¤ë:</b> XDarwin ¤Ï¡¤Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤½¤ì¤ÏÁ´¤Æ¤Î¥â¥Ë¥¿¤ò°ì¤Ä¤ÎÂ礭¤Ê²èÌ̤ΰìÉô¤È¤ß¤Ê¤·¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç Xinerama ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¤¸½ºß XDarwin ¤Ï¤½¤ì̵¤·¤ÇÀµ¤·¤¯Ê£¿ô¤Î¥â¥Ë¥¿¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤â¤·¡¤¤¢¤Ê¤¿¤¬°ì¤Ä¤Î¥â¥Ë¥¿¤ò»È¤¦¤À¤±¤Ê¤é¤Ð¡¤Xinerama ¤Ï¼«Æ°Åª¤Ë̵¸ú¤È¤Ê¤ê¤Þ¤¹¡£</li>
- <li><b>¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë:</b> ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ïµ¯Æ°»þ¤ËÆɤ߹þ¤Þ¤ì¡¤X11 ¥­¡¼¥Þ¥Ã¥×¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£Â¾¸À¸ì¤ËÂбþ¤·¤¿¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ï <code>/System/Library/Keyboards</code> ¤Ë¤¢¤ê¤Þ¤¹¡£¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤°ìÉô¤Î¥­¡¼¤¬¸ú¤«¤Ê¤¤Åù¤ÎÉÔ¶ñ¹ç¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë</li>
- <li><b>ºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°:</b> XDarwin ¤¬ Finder¤«¤éµ¯Æ°¤¹¤ë»þ¡¤X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤È X ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°¤Ï <code>xinit</code> ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡Ê¾ÜºÙ¤Ï "<code>man xinit</code>" ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¡ËXDarwin ¤Ï <code>xinit</code> ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¤»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ò¥æ¡¼¥¶¡¼¤Î¥Ñ¥¹¤ËÄɲä·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï <code>/usr/X11R6/bin</code> ¤À¤±¤òÄɲä·¤Þ¤¹¡£Â¾¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲä·¤¿¤¤¾ì¹ç¤Ï¡¤¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£¥æ¡¼¥¶¡¼¤Î¥·¥§¥ë½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤¿¤á¤Ë¡¤X ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¥í¥°¥¤¥ó¥·¥§¥ë¤Çµ¯Æ°¤µ¤ì¤Þ¤¹¡£É¬ÍפǤ¢¤ì¤Ð¡¤Âå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
-</ul>
-
-<h3>¥Õ¥ë¥¹¥¯¥ê¡¼¥ó</h3>
-<ul>
- <li><b>¥­¡¼ÀßÄê¥Ü¥¿¥ó:</b> X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¥Ü¥¿¥ó¤ÎÁȤ߹ç¤ï¤»¤ò»ØÄꤷ¤Þ¤¹¡£
- ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤Ç¤°Õ¤Î¿ô¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£</li>
- <li><b>¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë:</b> ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀڤ괹¤¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£Mac OS X ¤Î¤¤¤¯¤Ä¤«¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç Aqua ¤ËÌá¤Ã¤¿»þ¡¤¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£</li>
- <li><b>µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë:</b> XDarwin ¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Çµ¯Æ°¤¹¤ë»þ¡¤¥¹¥×¥é¥Ã¥·¥å¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£</li>
- <li><b>¿§¿¼ÅÙ:</b> ¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X11 ¥Ç¥£¥¹¥×¥ì¥¤¤¬ Aqua ¤È°Û¤Ê¤ë¿§¿¼ÅÙ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡ÖÊѹ¹¤Ê¤·¡×¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¤XDarwin ¤Ï Aqua ¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤ë¿§¿¼ÅÙ¤ò»È¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Ë 8¡¤15 ¤Þ¤¿¤Ï24 ¥Ó¥Ã¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
-</ul>
-
-<h2>
-<a NAME="license">¥é¥¤¥»¥ó¥¹</a>
-</h2>
-XDarwin ¤Î¼çÍפʥ饤¥»¥ó¥¹¤ÏÅÁÅýŪ¤Ê MIT X11/X Consortium License ¤Ë´ð¤Å¤­¤Þ¤¹¡£
-¤½¤ì¤Ï½¤Àµ¤Þ¤¿¤ÏºÆÇÛÉÛ¤µ¤ì¤ë¥½¡¼¥¹¥³¡¼¥É¤Þ¤¿¤Ï¥Ð¥¤¥Ê¥ê¤Ë¡¤¤½¤ÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤¬¤½¤Î¤Þ¤Þ»Ä¤µ¤ì¤ë¤³¤È¤òÍ׵᤹¤ë°Ê³°¤Î¾ò·ï¤ò¶¯À©¤·¤Þ¤»¤ó¡£
-¤è¤ê¿¤¯¤Î¾ðÊó¤È¡¤¥³¡¼¥É¤Î°ìÉô¤ò¥«¥Ð¡¼¤¹¤ëÄɲäÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤Î¤¿¤á¤Ë¡¤¥½¡¼¥¹¥³¡¼¥É¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£
-<H3>
-<A NAME="3"></A>
-X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Makefile.am b/hw/darwin/bundle/Makefile.am
deleted file mode 100644
index dee34fd83..000000000
--- a/hw/darwin/bundle/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-SUBDIRS = English.lproj Dutch.lproj French.lproj German.lproj Japanese.lproj \
- ko.lproj Portuguese.lproj Spanish.lproj Swedish.lproj
-
-bin_SCRIPTS = startXClients
-
-startXClients: $(srcdir)/startXClients.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR) $< | $(CPP_SED_MAGIC) > $@
- -chmod 755 startXClients
-
-contentsdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents
-resourcesdir = $(contentsdir)/Resources
-
-contents_DATA = Info.plist
-resources_DATA = XDarwin.icns startXClients
-
-install-data-hook:
- chmod 755 $(DESTDIR)$(resourcesdir)/startXClients
- echo "APPL????" > $(DESTDIR)$(contentsdir)/PkgInfo
- touch $(DESTDIR)@APPLE_APPLICATIONS_DIR@/XDarwin.app
-
-uninstall-hook:
- rm -rf $(DESTDIR)$(contentsdir)/PkgInfo
-
-CLEANFILES = startXClients
-
-EXTRA_DIST = \
- XDarwin.icns \
- Info.plist
diff --git a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf b/hw/darwin/bundle/Portuguese.lproj/Credits.rtf
deleted file mode 100644
index 8dcddc2f7..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf
+++ /dev/null
@@ -1,171 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5140\viewh4980\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contribuidores do XonX ao XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro
-\f1\b \
-
-\f2\i\b0 Localiza\'8d\'8bo para o Portugu\'90s\
-
-\f0\i0 Michael Oland\
-
-\f2\i New XDarwin icon
-\f1\i0\b \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contribuidores do XonX ao XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Suporte para o Darwin x86\
-
-\f0\i0 Pablo Di Noto\
-
-\f2\i Localiza\'8d\'8bo para o Espanhol
-\f0\i0 \
-Paul Edens\
-
-\f2\i Localiza\'8d\'8bo para o Holand\'90s
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Localiza\'8d\'8bo para o Coreano
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Suporte para teclados Non-US
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i L\'92der de Projeto
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Localiza\'8d\'8bo para o Alem\'8bo
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Localiza\'8d\'8bo para o Sueco
-\f0\i0 \
-Greg Parker\
-
-\f2\i Suporte ao modo Compartilhado (Rootless)
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Localiza\'8d\'8bo para o Japon\'90s
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i Localiza\'8d\'8bo para o Fran\'8d\'90s
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Agradecimentos Especiais:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Instalador
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Membros do Time XonX\
-Contribuindo com o XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Suporte ao Darwin x86\
-
-\f0\i0 Torrey T. Lyons\
-
-\f2\i L\'92der de Projeto
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Vers\'8bo Cocoa da interface XDarwin
-\f0\i0 \
-Greg Parker\
-
-\f2\i Implementa\'8d\'8bo Original
-\f0\i0
-\f2\i ao Quartz \
-
-\f0\i0 Christoph Pfisterer\
-
-\f2\i Bibliotecas Din\'89micas Compartilhadas
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Localiza\'8d\'8bo para o Japon\'90s
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Agradecimento Especial:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i \'eacone do XDarwin
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Hist\'97rico:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Suporte Original do XFree86 no Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i Suporte ao
-\f0\i0
-\f2\i XFree86 4.0 no Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integra\'8d\'8bo dentro do Projeto XFree86 na vers\'8bo 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings b/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
deleted file mode 100644
index c79b282f6..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 9cb67cf89..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Portuguese.lproj/Makefile.am b/hw/darwin/bundle/Portuguese.lproj/Makefile.am
deleted file mode 100644
index 81ba2be26..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Portugueselprojdir = $(resourcesdir)/Portuguese.lproj
-
-Portugueselproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Portugueselprojnibdir = $(Portugueselprojdir)/MainMenu.nib
-Portugueselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 6800171d9..000000000
--- a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-<head>
-<title>XDarwin Help</title>
-</head>
-
-<center>
-
- <h1>XDarwin X Server para Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>&Iacute;ndice</h2>
-<ol>
- <li><A HREF="#notice">Notas importantes</A></li>
- <li><A HREF="#usage">Uso</A></li>
- <li><A HREF="#path">Ajustando seu Path</A></li>
-
- <li><A HREF="#prefs">Prefer&ecirc;ncias do usu&aacute;rio</A></li>
- <li><A HREF="#license">Licen&ccedil;a</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Notas importantes</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
- Essa &eacute; uma vers&atilde;o pr&eacute;-lancamento
- do XDarwin, e ela n&atilde;o &eacute; suportada de nenhuma forma. Bugs podem
- ser reportados e corre&ccedil;&otilde;es podem ser enviadas para <A HREF="http://sourceforge.net/projects/xonx/">P&aacute;gina
- do projeto XonX</A> no SourceForge. Antes de informar bugs em vers&otilde;es
- pr&eacute;-lancamento, por favor verifique a þltima vers&atilde;o em <A HREF="http://sourceforge.net/projects/xonx/">XonX</A>
- or X_VENDOR_LINK.
-#else
-Se o servidor &eacute; mais velho que 6-12 semanas, ou seu hardware &eacute;
- mais novo que a data acima, procure por uma nova vers&atilde;o antes de informar
- problemas. Bugs podem ser reportados e corre&ccedil;&otilde;es podem ser enviadas
- para a <A HREF="http://sourceforge.net/projects/xonx/">P&aacute;gina do projeto
- XonX</A> na SourceForge.
-#endif
-</blockquote>
-<blockquote> Este software &eacute; distribu&iacute;do sob os termos da <a href="#license">licen&ccedil;a
- MIT X11 / X Consortium</a> e &eacute; provido, sem nenhuma garantia. Por favor
- leia a <a href="#license">Licen&ccedil;a</a> antes de come&ccedil;ar a usar
- o programa.</blockquote>
-
-<h2><a NAME="usage">Uso</a></h2>
-<p>O XDarwin &eacute; uma X server &quot;open-source&quot; livremente
- redistribu&iacute;da do <a HREF
-="http://www.x.org/">Sistema X Window</a>. This version of XDarwin was produced by the X_VENDOR_LINK.
- XDarwin roda sobre Mac OS X no modo Tela Cheia ou no modo Compartilhado.</p>
-<p>No modo Tela Cheia, quando o sistema X window est&aacute; ativo, ele ocupa
- a tela toda. Voc&ecirc; pode voltar ao desktop do Mac OS X clicando Command-Option-A.
- Essa combina&ccedil;&atilde;o de teclas pode ser mudada nas prefer&ecirc;ncias.
- Pelo desktop Mac OS X, clique no &iacute;cone XDarwin no Dock para voltar ao
- sistema X window. (Voc&ecirc; pode mudar esse comportamento nas prefer&ecirc;ncias
- da&iacute; voc&ecirc; dever&aacute; clicar no &iacute;cone XDarwin na janela
- flutuante que aparecer&aacute;.)</p>
-<p>No modo Compartilhado, o sistema X window e Aqua dividem a mesma tela. A janela
- raiz da tela X11 est&aacute; do tamanho da tela (monitor) e cont&eacute;m todas
- as outras janelas. A janela raiz do X11 no modo compartilhado n&atilde;o &eacute;
- mostrada pois o Aqua controla o fundo de tela.</p>
-<h3>Emula&ccedil;&atilde;o de Mouse Multi-Bot&otilde;es</h3>
-<p>Muitas aplica&ccedil;&otilde;es X11 insistem em usar um mouse de 3 bot&otilde;es.
- Voc&ecirc; pode emular um mouse de 3 bot&otilde;es com um simples bot&atilde;o,
- mantendo pressionando teclas modificadoras enquanto voc&ecirc; clica no bot&atilde;o
- do mouse. Isto &eacute; controlado pela configura&ccedil;&atilde;o da &quot;Emula&ccedil;&atilde;o
- de Mouse Multi-Bot&otilde;es&quot; da prefer&ecirc;ncia &quot;Geral&quot;. Por
- padr&atilde;o, a emula&ccedil;&atilde;o est&aacute; habilitada e mantendo pressionada
- a tecla Command e clicando no bot&atilde;o do mouse ele simular&aacute; o clique
- no segundo bot&atilde;o do mouse. Mantendo pressionada a tecla Option e clicando
- no bot&atilde;o do mouse ele simular&aacute; o terceiro bot&atilde;o. Voc&ecirc;
- pode mudar a combina&ccedil;&atilde;o de teclas modificadoras para emular os
- bot&otilde;es dois e tr&ecirc;s nas prefer&ecirc;ncias. Nota, se a tecla modificadora
- foi mapeada para alguma outra tecla no xmodmap, voc&ecirc; ainda ter&aacute;
- que usar a tecla atual especificada nas prefer&ecirc;ncias para a emula&ccedil;&atilde;o
- do mouse multi-bot&otilde;es.</p>
-<h2><a NAME="path">Ajustando seu Path</a></h2>
-<p>Seu path &eacute; a lista de diret&oacute;rios a serem procurados por arquivos
- execut&aacute;veis. O comando X11 est&aacute; localizado em <code>/usr/X11R6/bin</code>,
- que precisa ser adicionado ao seu path. XDarwin faz isso para voc&ecirc; por
- padr&atilde;o e pode-se tamb&eacute;m adicionar diret&oacute;rios onde voc&ecirc;
- instalou aplica&ccedil;&otilde;es de linha de comando.</p>
-<p>Usu&aacute;rios experientes j&aacute; ter&atilde;o configurado corretamente
- seu path usando arquivos de inicializa&ccedil;&atilde;o de seu shell. Neste
- caso, voc&ecirc; pode informar o XDarwin para n&atilde;o modificar seu path
- nas prefer&ecirc;ncias. O XDarwin inicia o cliente inicial X11 no shell padr&atilde;o
- do usu&aacute;rio corrente. (Um shell alternativo pode ser tamb&eacute;m expecificado
- nas prefer&ecirc;ncias.) O modo para ajustar o path depende do shell que voc&ecirc;
- est&aacute; usando. Isto &eacute; descrito na man page do seu shell.</p>
-<p>Voc&ecirc; pode tamb&eacute;m querer adicionar as man pages do X11 para
- a lista de p&aacute;ginas a serem procuradas quando voc&ecirc; est&aacute; procurando
- por documenta&ccedil;&atilde;o. As man pages do X11 est&atilde;o localizadas
- em <code>/usr/X11R6/man</code> e a vari&aacute;vel de ambiente <code>MANPATH</code>
- cont&eacute;m a lista de diret&oacute;rios a buscar.</p>
-<h2><a NAME="prefs">Prefer&ecirc;ncias do Usu&aacute;rio</a></h2>
-<p>V&aacute;rias op&ccedil;&otilde;es podem ser ajustadas nas prefer&ecirc;ncias
- do usu&aacute;rio, acess&iacute;vel pelo item &quot;Prefer&ecirc;ncias...&quot;
- no menu &quot;XDarwin&quot;. As op&ccedil;&otilde;es listadas como op&ccedil;&otilde;es
- de inicializa&ccedil;&atilde;o, n&atilde;o ter&atilde;o efeito at&eacute; voc&ecirc;
- reiniciar o XDarwin. Todas as outras op&ccedil;&otilde;es ter&atilde;o efeito
- imediatamente. V&aacute;rias das op&ccedil;&otilde;es est&atilde;o descritas
- abaixo:</p>
-<h3>Geral</h3>
-<ul>
- <li><b>Usar o Beep do Sistema para o X11: </b>Quando habilitado som de alerta
- padr&atilde;o do Mac OS X ser&aacute; usado como alerta no X11. Quando desabilitado
- (padr&atilde;o) um tom simples ser&aacute; usado.</li>
- <li><b>Permitir o X11 mudar a acelera&ccedil;&atilde;o do mouse: </b>Por implementa&ccedil;&atilde;o
- padr&atilde;o no sistema X window, o gerenciador de janelas pode mudar a acelera&ccedil;&atilde;o
- do mouse. Isso pode gerar uma confus&atilde;o pois a acelera&ccedil;&atilde;o
- do mouse pode ser ajustada diferentemente nas prefer&ecirc;ncias do Mac OS
- X e nas prefer&ecirc;ncias do X window. Por padr&atilde;o, o X11 n&atilde;o
- est&aacute; habilitado a mudar a acelera&ccedil;&atilde;o do mouse para evitar
- este problema.</li>
- <li><b>Emula&ccedil;&atilde;o de Mouse de Multi-Bot&otilde;es: </b>Esta op&ccedil;&atilde;o
- est&aacute; escrita acima em <a href="#usage">Uso</a>. Quando a emula&ccedil;&atilde;o
- est&aacute; habilitada as teclas modificadoras selecionadas tem que estar
- pressionadas quando o bot&atilde;o do mouse for pressionado, para emular o
- segundo e terceiro bot&otilde;es.</li>
-</ul>
-<h3>Inicial</h3>
-<ul>
- <li><b>Modo Padr&atilde;o: </b>Se o usu&aacute;rio n&atilde;o indicar qual modo
- de exibi&ccedil;&atilde;o quer usar (Tela Cheia ou Compartilhado) o modo especificado
- aqui ser&aacute; usado .</li>
- <li><b>Mostrar o painel de escolha na inicializa&ccedil;&atilde;o: </b> Por
- padr&atilde;o, uma painel &eacute; mostrado quando o XDarwin &eacute;
- iniciado para permitir que o usu&aacute;rio escolha ente o modo tela cheia
- ou modo compartilhado. Se esta op&ccedil;&atilde;o estiver desligada, o modo
- padr&atilde;o ser&aacute; inicializado automaticamente.</li>
- <li><b>N&uacute;mero do Monitor X11: </b>O X11 permite ser administrado em multiplos
- monitores por servidores X separados num mesmo computador. O usu&aacute;rio
- pode indicar o n&uacute;mero do monitor para o XDarwin usar se mais de um
- servidor X se estiver rodando simultaneamente.</li>
- <li><b>Habilitar suporte a m&uacute;ltiplos monitores pelo Xinerama: </b>o XDarwin
- suporta m&uacute;ltiplos monitores com o Xinerama, que trata todos os monitores
- como parte de uma grande e retangular tela. Voc&ecirc; pode desabilitar o
- Xinerama com est&aacute; op&ccedil;&atilde;o, mas normalmente o XDarwin n&atilde;o
- controla m&uacute;ltiplos monitores corretamente sem est&aacute; op&ccedil;&atilde;o.
- Se voc&ecirc; s&oacute; tiver um monotor, Xinerama &eacute; automaticamente
- desabilitado. </li>
- <li><b>Arquivo de Mapa de Teclado: </b> O mapa de teclado &eacute; lido na inicializa&ccedil;&atilde;o
- e traduzido para um mapa de teclado X11. Arquivos de mapa de teclado, est&atilde;o
- dispon&iacute;veis numa grande variedade de l&iacute;nguas e s&atilde;o encontradas
- em <code>/System/Library/Keyboards</code>.</li>
- <li><b>Iniciando Clientes X11 primeiro: </b>Quando o XDrawin &eacute; inicializado
- pelo Finder, ele ir&aacute; rodar o <code>xinit</code> para abrir o controlador
- X window e outros clientes X. (Veja o manual "<code>man xinit</code>" para
- mais informa&ccedil;&otilde;es.) Antes do XDarwin rodar o <code>xinit</code>
- ele ir&aacute; adicionar espec&iacute;ficos diret&oacute;rios a seu path.
- Por padr&atilde;o somente o <code>/usr/X11R6/bin</code> &eacute; adicionado.
- separado por um ponto-e-v&iacute;rgula. Os clientes X s&atilde;o inicializados
- no shell padr&atilde;o do usu&aacute;rio e os arquivos de inicializa&ccedil;&atilde;o
- do shell ser&atilde;o lidos. Se desejado, um shell alternativo pode ser especificado.</li>
-</ul>
-<h3>Tela Cheia</h3>
-<ul>
- <li><b>Bot&atilde;o de Combina&ccedil;&atilde;o de Teclas: </b> Clique no bot&atilde;o
- e pressione qualquer quantidade de teclas modificadoras seguidas por uma tecla
- padr&atilde;o para modificar a combina&ccedil;&atilde;o quando se quer mudar
- entre o Aqua e X11.</li>
- <li><b>Clique no &Iacute;cone no Dock para mudar para o X11: </b>Habilitando
- esta op&ccedil;&atilde;o voc&ecirc; ir&aacute; ativar a mudan&ccedil;a para
- o X11 clicando no &iacute;cone do XDarwin no Dock. Em algumas vers&otilde;es
- do Mac OS X, mudando pelo clique no Dock pode causar o desaparecimento do
- cursor quando retornar ao Aqua.</li>
- <li><b>Mostrar a Ajuda na inicializa&ccedil;&atilde;o: </b>Isto ir&aacute; mostrar
- uma tela introdut&oacute;ria quando o XDarwin for inicializado no modo Tela
- Cheia. </li>
- <li><b>Profundidade de Cores em bits: </b> No modo Tela Cheia, a tela do X11
- pode usar uma profundiadde de cor diferente da usada no Aqua. Se a op&ccedil;&atilde;o
- &quot;Atual&quot; est&aacute; especificada, a profundidade usada pelo Aqua
- quando o XDarwin iniciar ser&aacute; a mesma. Al&eacute;m das op&ccedil;&otilde;es
- 8, 15 ou 24 bits que podem ser especificadas.</li>
-</ul>
-
-<h2><a NAME="license">Licen&ccedil;a</a></h2>
-<p>A licen&ccedil;a
- principal n&oacute;s por XDarwin baseada na licen&ccedil;a tradicional MIT X11
- / X Consortium, que n&atilde;o imp&otilde;e nenhuma condi&ccedil;&atilde;o sobre
- modifica&ccedil;&otilde;es ou redistribui&ccedil;&atilde;o do c&oacute;digo-fonte
- ou dos bin&aacute;rios desde que o copyright/licen&ccedil;a sejam mantidos intactos.
- Para mais informa&ccedil;&otilde;es e not&iacute;cias adicionais de copyright/licensing
- em algumas se&ccedil;&atilde;o do c&oacute;digo, por favor refer to the source code.</p>
-<H3><A NAME="3"></A>Licen&ccedil;a do X Consortium</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permiss&otilde;es s&atilde;o em virtude garantidas, livre de mudan&ccedil;as,
- para qualquer pessoa que possua uma c&oacute;pia deste software e aos arquivos
- de documenta&ccedil;&atilde;o associada (o &quot;Software&quot;), para lidar
- com o software sem restri&ccedil;&otilde;es, incluindo limita&ccedil;&otilde;es
- dos direitos de uso, c&oacute;pia, modifica&ccedil;&atilde;o, inclus&atilde;o,
- publica&ccedil;&atilde;o, distribui&ccedil;&atilde;o, sub licen&ccedil;a, e/ou
- venda de c&oacute;pias deste Software, e permitir pessoas to whom o Software
- &eacute; fornecido para ser desta forma, verifique as seguintes condi&ccedil;&otilde;es:</p>
-<p>O nota de copyright abaixo e a permiss&atilde;o dever&atilde;o ser inclu&iacute;das
- em todas as c&oacute;pias ou substanciais por&ccedil;&otilde;es do Software.</p>
-<p>O SOFTWARE 'E PROVIDO &quot;COMO TAL&quot;, SEM GARANTIAS DE NENHUM TIPO, EXPLICITA
- OU IMPLICITA, INCLUINDO MAS N&Atilde;O LIMITADO NOS AVISOS DE COM&Eacute;RCIO,
- TAMANHO OU PARA PROPOSTAS PARTICULARES E N&Atilde;O INFRA&Ccedil;&Atilde;O.
- EM NENHUM ACONTECIMENTO O X CONSORTIUM SER&Aacute; RESPONSAV&Eacute;L POR NENHUMA
- RECLAMA&Ccedil;&Atilde;O, DANOS OU OUTRAS RESPONSABILIDADES, SE NUMA A&Ccedil;&Atilde;O
- DE CONTRATO, OU OUTRA COISA, SURGINDO DE, FORA DE OU EM CONEX&Atilde;O COM O
- SOFTWARE OU O USO OU OUTRO MODO DE LIDAR COM O SOFTWARE.</p>
-<p>Exceto o contido nesta nota, o nome do X Consortium n&atilde;o pode ser usado
- em propagandas ou outra forma de promo&ccedil;&atilde;o de vendas, uso ou outro
- modo de lidar com este Software sem ter recebido uma autoriza&ccedil;&atilde;o
- escrita pelo X Consortium.</p>
-<p>O Sistema X Window &eacute; marca registrada do X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/Spanish.lproj/Credits.rtf b/hw/darwin/bundle/Spanish.lproj/Credits.rtf
deleted file mode 100644
index 34408e78c..000000000
--- a/hw/darwin/bundle/Spanish.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/Spanish.lproj/Localizable.strings b/hw/darwin/bundle/Spanish.lproj/Localizable.strings
deleted file mode 100644
index 5bf813f1f..000000000
--- a/hw/darwin/bundle/Spanish.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 2df75ee0c..000000000
--- a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Spanish.lproj/Makefile.am b/hw/darwin/bundle/Spanish.lproj/Makefile.am
deleted file mode 100644
index 438d0c2bd..000000000
--- a/hw/darwin/bundle/Spanish.lproj/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Spanishlprojdir = $(resourcesdir)/Spanish.lproj
-
-Spanishlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Spanishlprojnibdir = $(Spanishlprojdir)/MainMenu.nib
-Spanishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index a79e6f95f..000000000
--- a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-<html>
-<head>
-<title>XDarwin Ayuda</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Fecha de release: X_REL_DATE
-</center>
-<h2>Contenido</h2>
-<ol>
- <li><A HREF="#notice">Aviso Importante</A></li>
- <li><A HREF="#usage">Modo de uso</A></li>
- <li><A HREF="#path">Configurando su Path</A></li>
- <li><A HREF="#prefs">Preferencias del Usuario</A></li>
- <li><A HREF="#license">Licencia</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Aviso Importante</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Esta es una versi&oacuten pre-release de XDarwin, y no tiene ning&uacuten soporte. Patches y reportes de error pueden ser enviados a la <A HREF="http://sourceforge.net/projects/xonx/">p&aacutegina del proyecto XonX</A> en SourceForge. Antes de reportar errores en versiones pre-release, por favor verifique la ultima versi&oacuten en <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> o bien el X_VENDOR_LINK.
-#else
-Si el server el m&aacutes antiguo que 6 a 12 meses, o si su hardware es posterior a la fecha indicada m&aacutes arriba, por favor verifique la &uacuteltima versi&oacuten antes de reportar problemas. Patches y reportes de error pueden ser enviados a la <A HREF="http://sourceforge.net/projects/xonx/">p&aacutegina del proyecto XonX</A> en SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Este software es distribuido bajo los t&eacuterminos de la <A HREF="#license">Licencia MIT X11 / X Consortium</A> y es provisto sin garant&iacutea alguna y en el estado en que se encuentra. Por favor lea la <A HREF="#license">Licencia</A> antes de utilizarlo.</blockquote>
-
-<h2><a NAME="usage">Modo de uso</a></h2>
-<p>XDarwin es una X server open-source de distribuci&oacuten libre del <a HREF
-="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin funciona en Mac OS X en modo pantalla completa o en modo rootless (integrado al escritorio).</p>
-<p>En modo pantalla completa, el X window system toma control total de la pantalla mientras esta activo. Presionando Command-Option-A puede regresar al Escritorio de Mac OS X. Esta combinaci&oacuten de teclas puede cambiarse en las Preferencias de Usuario. Desde el Escritorio de Mac OS X, haga click en &iacutecono de XDarwin en el Dock para volver al X window system. (Puede cambiar esta comportamiento en las Preferencias de Usuario y configurar que XDarwin vuelva al X window system haciendo click en la ventana flotante con el logo X.)</p>
-<p>En modo rootless, el X window system comparte la pantalla con Aqua. La ventana root de X11 es del tama&ntildeo de la pantalla y contiene a todas las dem&aacutes ventanas. La ventana root de X11 no se muestra en este modo, ya que Aqua maneja el fondo de pantalla.</p>
-<h3>Emulaci&oacuten de mouse multi-bot&oacuten</h3>
-<p>Muchas aplicaciones X11 requieren del uso de un mouse de 3 botones. Es posible emular un mouse de 3 botones con un mouse de solo un bot&oacuten presionando teclas modificadoras mientras hace click. Esto es controlado en de la seccion "Emulaci&oacuten mouse" dentro de la secci&oacuten "General" de las Preferencias del Usuario. Por defecto, la emulaci&oacuten est&aacute activa y utiliza la tecla Command para simular el 2do bot&oacuten y la tecla Option para simlar el 3er bot&oacuten. La conbinaci&oacuten para simular el 2do y 3er bot&oacuten pueden ser modificada por cualquier combinaci&oacuten de teclas modificadoras dentro de las Preferencias del Usuario. Tenga en cuenta que aunque las teclas modificadoras hayan sido mapeadas a otras teclas con xmodmap, las teclas configuradas en las Preferencias del Usuario seguir&aacuten siendo las utilizadas por la emulaci&oacuten de mouse multi-bot&oacuten.</p>
-
-<h2><a NAME="path">Configurando su Path</a></h2>
-<p>El path es la lista de directorios donde se buscar&aacuten los comandos ejecutables. Los comandos de X11 se encuentran en <code>/usr/X11R6/bin</code>, y &eacuteste necesita estar dentro de su path. XDarwin hace &eacutesto autom&aacuteticamente por defecto, y puede adem&aacutes agregar directorios adicionales donde tenga otros comandos de l&iacutenea.</p>
-<p>Usuarios experimentados pueden tener su path correctamente configurado mediante los archivos de inicio de su interprete de comandos. En este caso, puede informarle a XDarwin en las Preferencias de Usuario para que no modifique su path. XDarwin arrancar&aacute los clientes X11 iniciales usando el int&eacuterprete de comandos del usuario, seg&uacuten su configuraci&oacuten de login. Un int&eacuterprete de comandos alternativo puede ser especificado en las Preferencias del Usuario. La manera de configurar el path de su int&eacuterprete de comandos depende de cual est&aacute usando, y es generalmente descripta en las p&aacuteginas man del mismo.</p>
-<p>Adem&aacutes, Ud. puede agregar las p&aacuteginas man de X11 a la lista de p&aacuteginas que son consultadas. Estas est&aacuten ubicadas en <code>/usr/X11R6/man</code> y <code>MANPATH</code> es la variable de entorno que contiene los directorios que son consultados.</p>
-
-<h2><a NAME="prefs">Preferencias del Usuario</a></h2>
-<p>Ciertas opciones pueden definirse dentro de "Preferencias...", en el men&uacute de XDarwin. Las opciones dentro de de "Inicio" no surtir&aacuten efecto hasta que la aplicaci&oacuten se reinicie. Las restantes opciones surten efecto inmediatamente. Las diferentes opciones se describen a continuaci&oacuten:</p>
-<h3>General</h3>
-<ul>
- <li><b>Usar beep del sistema en X11:</b> Cuando esta opci&oacuten est&aacute activa, el sonido de alerta est&aacutendar de Mac OS X se usar&aacute como alerta de X11. Cuando est&aacute desactivada, un simple tono es utilizado (esta es la opci&oacuten por defecto).</li>
- <li><b>Permitir que X11 cambie la aceleraci&oacuten del mouse:</b> En una implementaci&oacuten est&aacutendard de X11, el window manager puede cambiar la aceleraci&oacuten del mouse. Esto puede llevar a una gran confusi&oacuten si la aceleraci&oacuten es diferente en XDarwin y en Mac OS X. Por defecto, no se le permite a X11 alterar la aceleraci&oacuten para evitar este inconveniente.</li>
- <li><b>Emulaci&oacuten de mouse multi-bot&oacuten:</b> Esta opci&oacuten es descripta m&aacutes arriba bajo <a HREF="#usage">Modo de Uso</a>. Cuando esta emulaci&oacuten est&aacute activa los modificadores seleccionados deben ser presionados cuando se hace click para emular el bot&oacuten 2 o el bot&oacuten 3.</li>
-</ul>
-<h3>Inicio</h3>
-<ul>
- <li><b>Modo inicial:</b> Si el usuario no indica si desea utilizar la Pantalla Completa o el modo Rootless, el modo especificado aqu&iacute ser&aacute el usado.</li>
- <li><b>Mostrar panel de selecci&oacuten al inicio:</b> Por defecto, un di&aacutelogo permite al usuario elegir entre Pantalla Completa o Rootless al inicio. Si esta opci&oacuten esta desactivada, XDarwin arrancar&aacute utilizando el modo por defecto sin consultar al usuario.</li>
- <li><b>N&uacutemero de display X11:</b> X11 permite que existan m&uacuteltiples pantallas manejadas por servidores X11 separados funcionando en una misma computadora. El usuario puede especificar aqui un n&uacutemero entero para indicar el n&uacutemero de pantalla (display) que XDarwin utilizar&aacute si m&aacutes de un servidor X funciona en forma simult&aacutenea.</li>
- <li><b>Habilitar soporte Xinerama para m&uacuteltipes monitores:</b> XDarwin suporta m&uacuteltiple monitores con Xinerama, que maneja todos los monitores como si fueran parte de una gran pantalla rectangular. Puede deshabilitar Xinerama con esta opci&oacuten, pero XDarwin no maneja m&uacuteltiples monitores en forma correcta sin esta opci&oacuten habilitada. Si tiene solo un monitor, Xinerama es autom&aacuteticamente deshabilitado.</li>
- <li><b>Archivo de mapa de teclado:</b> Un archivo de mapa de teclas es le&iacutedo al inicio y es traducido a un keymap X11 (un archivo est&aacutendard de X11 para especificar la funci&oacuten de cada tecla). Estos archivos, disponibles para una amplia variedad de lenguajes, pueden encontrarse en <code>/System/Library/Keyboards</code>.</li>
- <li><b>Al iniciar clientes X11:</b> Cuando XDarwin arranca desde el Finder, &eacuteste ejecutar&aacute <code>xinit</code> para a su vez arrancar el window manager y otros clientes. (Vea en "<code>man xinit</code>" para mayor informaci&oacuten). Antes de ejecutar <code>xinit</code> XDarwin agregar&aacute los directorios especificados al path del usuario. Por defecto, solo <code>/usr/X11R6/bin</code> es agregado. Otros directorios adicionales puede agregarse separados por dos puntos (:). Los clientes X son ejecutados con el int&eacuterprete de comandos del usuario, por lo que los archivos de inicio de &eacuteste son le&iacutedos. Si se desea, un int&eacuterprete de comandos diferente puede ser especificado.</li>
-</ul>
-<h3>Pantalla Completa</h3>
-<ul>
- <li><b>Bot&oacuten para definir combinaci&oacuten de teclas:</b> Haga click en este bot&oacuten y luego presione cualquier combinaci&oacuten de modificadores seguidos de una tecla convencional para definir que combinaci&oacuten usar&aacute para intercambiar entre X11 y Aqua.</li>
- <li><b>Click en el &iacutecono del Dock cambia a X11:</b> Habilite esta opci&oacuten para volver a X11 al hacer click en &iacutecono de XDarwin en el Dock. En algunas versiones de Mac OS X, al volver haciendo click en el Dock puede causar al desaparci&oacuten del cursor al volver a Aqua.</li>
- <li><b>Mostrar ayuda al inicio:</b> Esta opci&oacuten habilitada har&aacute que una pantalla inicial de introducci&oacuten aparezca cuando XDarwin es arrancado en modo Pantalla Completa.</li>
- <li><b>Profundidad de color (bits):</b> En modo Pantalla Completa, el display X11 puede utilizar una profundidad de color diferente de la utilizada por Aqua. Si se especifica "Actual", la misma profundidad de color que Aqua utiliza ser&aacute adoptada por X11. Al contrario, puede especificar 8, 15, o 24 bits.</li>
-</ul>
-
-<h2><a NAME="license">Licencia</a></h2>
-La licencia principal de XDarwin es basada en la Licencia MIT X11 tradicional, que no impone condiciones a la modificaci&oacuten o redistribuci&oacuten del c&oacutedigo fuente o de archivos binarios m&aacutes all&aacute de requerir que los mensajes de Licencia y Copyright se mantengan intactos. Para mayor informaci&oacuten y para mensajes adicionales de Licencia y Copyright que cubren algunas secciones del c&oacutedigo fuente, por favor consulte the source code.
-<H3><A NAME="3"></A>Licencia del X Consortium</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Se otorga aqui permiso, libre de costo, a toda persona que obtenga una copia de este Software y los archivos de documentaci&oacuten asociados (el "Software"),
-para utilizar el Software sin restricciones, incluyendo sin l&iacutemites los derechos de usar, copiar, modificar, integrar con otros productos, publicar, distribuir, sub-licenciar y/o comercializar copias del Software, y de permitir a las personas que lo reciben para hacer lo propio, sujeto a las siguientes condiciones:</p>
-<p>El mensaje de Copyright indicado m&aacutes arriba y este permiso ser&aacute inclu&iacutedo en todas las copias o porciones sustanciales del Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Excepto lo indicado en este mensaje, el nombre del X Consortium no ser&aacute utilizado en propaganda o como medio de promoci&oacuten para la venta, utilizaci&oacuten u otros manejos de este Software sin previa autorizaci&oacuten escrita del X Consortium.</p>
-<p>X Window System es una marca registrada de X Consortium, Inc.</p>
-<H3><A NAME="3"></A>X Consortium License (English)</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Swedish.lproj/Credits.rtf b/hw/darwin/bundle/Swedish.lproj/Credits.rtf
deleted file mode 100644
index 34408e78c..000000000
--- a/hw/darwin/bundle/Swedish.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/Swedish.lproj/Localizable.strings b/hw/darwin/bundle/Swedish.lproj/Localizable.strings
deleted file mode 100644
index 9709e5469..000000000
--- a/hw/darwin/bundle/Swedish.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 3157d72cb..000000000
--- a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/Swedish.lproj/Makefile.am b/hw/darwin/bundle/Swedish.lproj/Makefile.am
deleted file mode 100644
index 19f35a690..000000000
--- a/hw/darwin/bundle/Swedish.lproj/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Swedishlprojdir = $(resourcesdir)/Swedish.lproj
-
-Swedishlproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-Swedishlprojnibdir = $(Swedishlprojdir)/MainMenu.nib
-Swedishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index ab940ec3d..000000000
--- a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- F&auml;rdigst&auml;llt: X_REL_DATE
-</center>
-<h2>Inneh&aring;ll</h2>
-<ol>
- <li><A HREF="#notice">Viktigt!</A></li>
- <li><A HREF="#usage">Anv&auml;ndande</A></li>
- <li><A HREF="#path">Att st&auml;lla in sin s&ouml;kv&auml;g</A></li>
- <li><A HREF="#prefs">Inst&auml;llningar</A></li>
- <li><A HREF="#license">Licens</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Viktigt!</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Detta &auml;r en testversion av XDarwin, och du kan inte garranteras n&aring;gon som helst support f&ouml;r den. Buggar och fel kan rapporteras och f&ouml;rslag till fixar kan skickas till <A HREF="http://sourceforge.net/projects/xonx/">XonX-projektets sida</A> p&aring; SourceForge. Innan du rapporterar buggar i testversioner, var god pr&ouml;va den senaste versionen fr&aring;n <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> eller i X_VENDOR_LINK.
-#else
-Om servern &auml;r &auml;ldre &auml;n 6-12 m&aring;nader, eller om din h&aring;rdvara &auml;r nyare &auml;n datumet ovan, leta efter en nyare version innan du rapporterar fel. Buggar och fel kan rapporteras och f&ouml;rslag till fixar kan skickas till <A HREF="http://sourceforge.net/projects/xonx/">XonX-projektets sida</A> p&aring; SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Denna programvara distrubueras i enlighet med <A HREF="#license">MIT X11 / X Consortium License</A> och tilhandh&aring;lls som den &auml;r, helt utan garantier. Var god l&auml;s igenom <A HREF="#license">licensdokumentet (engelska)</A> innan du anv&auml;nder programmet.</blockquote>
-
-<h2><a NAME="usage">Anv&auml;ndande</a></h2>
-<p>XDarwin &auml;r en fritt spridd X server av <a HREF
-="http://www.x.org/">X Window-systemet</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin kan k&ouml;ras p&aring; Mac OS X i fullsk&auml;rmsl&auml;ge eller rotl&ouml;st l&auml;ge.</p>
-<p>I fullsk&auml;rmsl&auml;ge kommer X window-systemet att ta &ouml;ver hela sk&auml;rmen n&auml;r det &auml;r aktivt. Du kan byta tillbaka till Mac OS Xs skrivbord genom att trycka Kommando-Alt-A. Denna tangentkombination kan &auml;ndra i inst&auml;llningarna. N&auml;r du &auml;r p&aring; Mac OS Xs skrivbord kan du klicka p&aring; XDarwin-ikonen i dockan f&ouml;r att byta tillbaka till X Window-systemet. (Du kan f&ouml;r&auml;ndra detta beteende i inst&auml;llningarna s&aring; att du ist&auml;llet m&aring;ste klicka i det fltande bytesf&ouml;nstret ist&auml;llet.)</p>
-<p>I rotl&ouml;stl&auml;ge delar X11 och Aqua p&aring; din sk&auml;rm. Rotf&ouml;nstret p&aring; X11-sk&auml;rmen &auml;r av samma storlek som hela sk&auml;rmen och inneh&aring;ller alla andra f&ouml;nster - det fungerar som bakgrund. I rotl&ouml;stl&auml;ge visas inte detta rotf&ouml;nster, eftersom Aqua hanterar skrvbordbakgrunden.</p>
-
-<h3>Emulering av flerknapparsmus</h3>
-<p>M&aring;nga X11-program utnyttjar en treknapparsmus. Du kan emulera en treknapparsmus med en knapp genom att h&aring;lla ner olika knappar p&aring; tangentbordet medan du klickar med musens enda knapp. Denna funktion styrs av inst&auml;llningarna i "Emulera flerknapparsmus" under fliken "Diverse" i inst&auml;llningarna. Grundinst&auml;llningen &auml;r att emulationen &auml;r aktiv och att ett kommando-klick (H&aring;ll ner kommando och klicka) simulerar den andra musknappen. Den tredje musknappen f&aring;s genom att h&aring;lla ner alt och klicka. Du kan &auml;ndra detta till n&aring;gon annan kombination av de fem tangenterna kommando, alt, kontrol, skift och fn (Powerbook/iBook). Notera att om dessa knappar har flyttats med hj&auml;lp av kommandot xmodmap kommer denna f&ouml;r&auml;ndring inte att p&aring;verka vilka knappar som anv&auml;nds vid flerknappsemulationen.</p>
-
-<h2><a NAME="path">Att st&auml;lla in sin s&ouml;kv&auml;g</a></h2>
-<p>Din s&ouml;kv&auml;g &auml;r en lista av kataloger som s&ouml;ks igenom n&auml;r terminalen letar efter kommandon att exekvera. Kommandon som h&ouml;r till X11 ligger i <code>/usr/X11R6/bin</code>, en katalog som inte ligger i din s&ouml;kv&auml;g fr&aring;n b&ouml;rjan. XDarwin l&auml;gger till denna katalog &aring;t dig, och du kan ocks&aring; l&auml;gga till ytterligare kataloger i vilka du lagt program som skall k&ouml;ras fr&aring;n kommandoraden.</p>
-<p>Mer erfarna anv&auml;ndare har antagligen redan st&auml;llt in sin s&ouml;kv&auml;g i skalets inst&auml;llningsfiler. Om detta g&auml;ller dig kan st&auml;lla in XDarwin s&aring; att din s&ouml;kv&auml;g inte modifieras. XDarwin startar de f&ouml;rsta X11-klienterna i anv&auml;ndarens inloggningsskal (Vill du anv&auml;nda ett alternativt skall, kan du specificera detta i inst&auml;llningarna). Hur du st&auml;ller in din s&ouml;kv&auml;g beror p&aring; vilket skal du anv&auml;nder. Exakt hur beskrivs i skalets man-sidor.</p>
-
-<p>Ut&ouml;ver detta kan du ocks&aring; vilja l&auml;gga till X11s man-sidor (dokumentation) till listan &auml;ver sidor som som skall s&ouml;kas n&auml;r du vill l&auml;sa efter dokumentationen. X11s man-sidor ligger i <code>/usr/X11R6/man</code> och listan &auml;ver kataloger att s&ouml;ka best&auml;mms av variabeln<code>MANPATH</code>.</p>
-
-<h2><a NAME="prefs">Inst&auml;llningar</a></h2>
-<p>I inst&auml;llningarna finns ett antal alternativ d&auml;r du kan p&aring;verka hur XDarwin beter sig i vissa fall. Inst&auml;llningarna kommer du till genom att v&auml;lja "Inst&auml;llningar..." i menyn "XDarwin". De alternativ som finns under fliken "Starta" tr&auml;der inte i kraft f&ouml;rr&auml;n du startat om programmet. Alla andra alternativ tr&auml;der i kraft omedelbart. De olika alternativen beskrivs nedan:</p>
-<h3>Diverse</h3>
-<ul>
- <li><b>Anv&auml;nd Mac OS varningsljud i X11:</b> N&auml;r detta alternativ &auml;r valt anv&auml;nds Mac OS vanliga varningsljud &auml;r X11s varningsljud (bell). N&auml;r detta alternativ inte &auml;r valt (f&ouml;rvalt) anv&auml;nds en vanlig ton.</li>
- <li><b>Till&aring;t X11 att &auml;ndra musens acceleration:</b> I ett vanligt X11-system kan f&ouml;nsterhanteraren &auml;ndra musens acceleration. Detta kan vara f&ouml;rvirrande eftersom musens acceleration kan vara olika i Mac OS Xs System Preferences och i f&ouml;nsterhanteraren i X11. F&ouml;rvalet &auml;r att X11 inte kan &auml;ndra musens acceleration f&ouml;r att p&aring; detta s&auml;tt undvika detta problem.</li>
- <li><b>Emulera flerknapparsmus:</b> Detta beskrivs ovan under <a HREF="#usage">Anv&auml;ndande</a>. N&auml;r emulationen &auml;r aktiv m&aring;ste du h&aring;lla ner de valda knapparna f&ouml;r att emulera en andra eller tredje musknapp.</li>
-</ul>
-<h3>Starta</h3>
-<ul>
- <li><b>F&ouml;rvalt l&auml;ge:</b> Om anv&auml;ndaren inte p&aring; annat s&auml;tt v&auml;ljer vilket l&auml;ge som skall anv&auml;ndas kommer alternativet h&auml;r att anv&auml;ndas.</li>
- <li><b>Visa val av sk&auml;rml&auml;ge vid start:</b> F&ouml;rvalet &auml;r att visa ett f&ouml;nster n&auml;r XDarwin startar som l&aring;ter anv&auml;ndaren v&auml;lja mellan fullsk&auml;rmsl&auml;ge och rotl&ouml;st l&auml;ge. Om detta alternativ inte &auml;r aktivt kommer XDarwin automatiskt att startas i det l&auml;ge som valts ovan.</li>
- <li><b>Sk&auml;rmnummer i X11:</b> X11 till&aring;ter att det finns flera sk&auml;rmar styrda av varsin X-server p&aring; en och samma dator. Anv&auml;ndaren kan ange vilket nummer XDarwin skall anv&auml;nda om mer &auml;n en X-server skall anv&auml;ndas samtidigt.</li>
- <li><b>Aktivera Xinerama (st&ouml;d f&ouml;r flera sk&auml;rmar):</b> XDarwin st&ouml;djer flera sk&auml;rmar genom Xinerama, vilket hanterar alla skr&auml;mar som delar av en enda stor rektangul&auml;r sk&auml;rm. Du kan anv&auml;nda detta alternativ f&ouml;r att st&auml;nga av Xinerama, men f&ouml;r n&auml;rvarande kan inte XDarwin hantera flera sk&auml;rmar utan det. Om du bara har en sk&auml;rm kommer Xinerama automatiskt att deaktiveras.</li>
- <li><b>Fil med tangentbordsupps&auml;ttning:</b> En fil som anger tangentbordsupps&auml;ttning l&auml;ses vid start och &ouml;vers&auml;tts till en tangentborsupps&auml;ttningsfil f&ouml;r X11. Filer med tangentbordsupps&auml;ttningar f&ouml;r ett stort antal spr&aring;k finns i <code>/System/Library/Keyboards</code>.</li>
- <li><b>Startar f&ouml;rsta X11-klienterna:</b> N&auml;r X11 startas fr&aring;n Finder kommer det att exekvera filen <code>xinit</code> f&ouml;r att starta f&ouml;nsterhanteraren i X11 och andra program. (Se "<code>man xinit</code>" f&ouml;r mer information.) Innan XDarwin k&ouml;r xinit kommer det att l&auml;gga till katalogern h&auml;r till anv&auml;ndarens s&ouml;kv&auml;g. F&ouml;rvalet &auml;r att endast l&auml;gga till katalogen <code>/usr/X11R6/bin</code>. Ytterligare kataloger kan l&auml;ggas till - separera dem med kolon. X11-klienterna startas i anv&auml;ndarens inloggningsskal s&aring; att anv&auml;ndarens inst&auml;llningsfiler i skalet l&auml;ses. Om s&aring; &ouml;nskas kan de startas i ett annat skal.</li>
-</ul>
-<h3>Fullsk&auml;rm</h3>
-<ul>
- <li><b>Tangentkombinationsknappen:</b> Tryck p&aring; denna knapp och en tangentkombination f&ouml;r att &auml;ndra den tangentkombination som anv&auml;nds f&ouml;r att byta mellan X11 och Aqua.</li>
- <li><b>Klick p&aring; ikonen i dockan byter till X11:</b> Aktivera detta alternativ f&ouml;r att byta till X11 genom att klicka p&aring; ikonen i dockan. I vissa versioner av Mac OS X kommer ett bte p&aring; detta s&auml;tt att g&ouml;mma pekaren n&auml;r du &aring;terv&auml;nder till Aqua.</li>
- <li><b>Visa fullsk&auml;rmshj&auml;lp vid start:</b> Detta kommer att visa en informationsruta n&auml;r XDarwin startas i fullsk&auml;rmsl&auml;ge.</li>
- <li><b>F&auml;rgdjup:</b> I fullsk&auml;rmsl&auml;ge kan X11 anv&auml;nda ett annat f&auml;rgdjup &auml;n Aquas. Om du v&auml;jer "Nuvarande" kommer X11 att anv&auml;nda det f&auml;rgdjup som Aqua har just d&aring;. Annars kan du v&auml;lja 8, 15, eller 24 bitare f&auml;rg.</li>
-</ul>
-
-<h2><a NAME="license">Licens (svenska)</a></h2>
-<p>Den huvudsakliga licens vi anv&auml;nder oss av &auml;r baserad p&aring; den traditionella MIT X11 / XConsortium-licensen, vilken inte p&aring; n&aring;got s&auml;tt begr&auml;nsar f&ouml;r&auml;ndringar eller vidarespridning av vare sig k&auml;llkod eller kompilerad programvara annat &auml;n genom att kr&auml;va att delarna som r&ouml;r copyright och licensiering l&auml;mnas intakta. F&ouml;r mer information och ytterligare copyright/licensieringsinfromation r&ouml;rande vissa speciella delar av koden, se the source code.</p>
-
-<h3>Licence (english)</h3>
-<p>The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.</p>
-
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/XDarwin.icns b/hw/darwin/bundle/XDarwin.icns
deleted file mode 100644
index 9c560846e..000000000
--- a/hw/darwin/bundle/XDarwin.icns
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/ko.lproj/Credits.rtf b/hw/darwin/bundle/ko.lproj/Credits.rtf
deleted file mode 100644
index 34408e78c..000000000
--- a/hw/darwin/bundle/ko.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i Korean localization
-\f0\i0 \
-Mario Klebsch\
-
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i Swedish localization
-\f0\i0 \
-Greg Parker\
-
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-
-\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file
diff --git a/hw/darwin/bundle/ko.lproj/Localizable.strings b/hw/darwin/bundle/ko.lproj/Localizable.strings
deleted file mode 100644
index fb8c77e0d..000000000
--- a/hw/darwin/bundle/ko.lproj/Localizable.strings
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a4e..000000000
--- a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- IBClasses = (
- {
- ACTIONS = {showHelp = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {
- ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; };
- CLASS = Preferences;
- LANGUAGE = ObjC;
- OUTLETS = {
- addToPathButton = id;
- addToPathField = id;
- button2ModifiersMatrix = id;
- button3ModifiersMatrix = id;
- depthButton = id;
- displayField = id;
- dockSwitchButton = id;
- fakeButton = id;
- keymapFileField = id;
- modeMatrix = id;
- modeWindowButton = id;
- mouseAccelChangeButton = id;
- startupHelpButton = id;
- switchKeyButton = id;
- systemBeepButton = id;
- useDefaultShellMatrix = id;
- useOtherShellField = id;
- useXineramaButton = id;
- window = id;
- };
- SUPERCLASS = NSObject;
- },
- {
- CLASS = XApplication;
- LANGUAGE = ObjC;
- OUTLETS = {preferences = id; xserver = id; };
- SUPERCLASS = NSApplication;
- },
- {
- ACTIONS = {
- bringAllToFront = id;
- closeHelpAndShow = id;
- itemSelected = id;
- nextWindow = id;
- previousWindow = id;
- showAction = id;
- showSwitchPanel = id;
- startFullScreen = id;
- startRootless = id;
- };
- CLASS = XServer;
- LANGUAGE = ObjC;
- OUTLETS = {
- dockMenu = NSMenu;
- helpWindow = NSWindow;
- modeWindow = NSWindow;
- startFullScreenButton = NSButton;
- startRootlessButton = NSButton;
- startupHelpButton = NSButton;
- startupModeButton = NSButton;
- switchWindow = NSPanel;
- windowMenu = NSMenu;
- windowSeparator = NSMenuItem;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-} \ No newline at end of file
diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 8f9b5e01c..000000000
--- a/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib
+++ /dev/null
Binary files differ
diff --git a/hw/darwin/bundle/ko.lproj/Makefile.am b/hw/darwin/bundle/ko.lproj/Makefile.am
deleted file mode 100644
index 56dd6b310..000000000
--- a/hw/darwin/bundle/ko.lproj/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
- -DX_VERSION="$(PLIST_VERSION_STRING)" \
- -DX_PRE_RELEASE="$(PRE)" \
- -DX_REL_DATE="$(XORG_DATE)" \
- -DX_VENDOR_NAME="$(VENDOR_STRING)" \
- -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-kolprojdir = $(resourcesdir)/ko.lproj
-
-kolproj_DATA = \
- XDarwinHelp.html \
- InfoPlist.strings \
- Credits.rtf Localizable.strings
-
-kolprojnibdir = $(kolprojdir)/MainMenu.nib
-kolprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
- $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings
-
-EXTRA_DIST = \
- Credits.rtf Localizable.strings \
- Localizable.strings \
- MainMenu.nib/classes.nib \
- MainMenu.nib/objects.nib \
- XDarwinHelp.html.cpp
diff --git a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670d9..000000000
--- a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
- <h1>XDarwin X Server for Mac OS X</h1>
- X_VENDOR_NAME X_VERSION<br>
- Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
- <li><A HREF="#notice">Important Notice</A></li>
- <li><A HREF="#usage">Usage</A></li>
- <li><A HREF="#path">Setting Your Path</A></li>
- <li><A HREF="#prefs">User Preferences</A></li>
- <li><A HREF="#license">License</A></li>
-</ol>
-<center>
- <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
- <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
- <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
- <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
- <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
- <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
- <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
- <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
- <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
- <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
- <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
- <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
- <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
- <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute,
-sublicense, and/or sell copies of the Software, and to permit persons to
-whom the Software is furnished to do so, subject to the following conditions:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/startXClients.cpp b/hw/darwin/bundle/startXClients.cpp
deleted file mode 100644
index f812dbfd8..000000000
--- a/hw/darwin/bundle/startXClients.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-XCOMM!/bin/sh
-
-XCOMM This script is used by XDarwin to start X clients when XDarwin is
-XCOMM launched from the Finder.
-
-userclientrc=$HOME/.xinitrc
-sysclientrc=XINITDIR/xinitrc
-clientargs=""
-
-if [ -f $userclientrc ]; then
- clientargs=$userclientrc
-else if [ -f $sysclientrc ]; then
- clientargs=$sysclientrc
-fi
-fi
-
-if [ "x$2" != "x" ]; then
- PATH="$PATH:$2"
- export PATH
-fi
-
-exec xinit $clientargs -- XBINDIR/XDarwinStartup "$1" -idle
diff --git a/hw/darwin/iokit/Makefile.am b/hw/darwin/iokit/Makefile.am
deleted file mode 100644
index 54464aec9..000000000
--- a/hw/darwin/iokit/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-noinst_LIBRARIES = libiokit.a
-
-AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
-INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
-AM_DEFS =
-if XQUARTZ
-AM_DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
-XQUARTZ_SUBDIRS = bundle quartz
-endif
-DEFS = @DEFS@ $(AM_DEFS)
-
-libiokit_a_SOURCES = xfIOKit.c \
- xfIOKitCursor.c \
- xfIOKitStartup.c
-
-EXTRA_DIST = \
- xfIOKit.h
diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c
deleted file mode 100644
index 0feb8ccb0..000000000
--- a/hw/darwin/iokit/xfIOKit.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/**************************************************************
- *
- * IOKit support for the Darwin X Server
- *
- * HISTORY:
- * Original port to Mac OS X Server by John Carmack
- * Port to Darwin 1.0 by Dave Zarzycki
- * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "os.h"
-#include "servermd.h"
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "mi.h"
-#include "mibstore.h"
-#include "mipointer.h"
-#include "micmap.h"
-#include "shadow.h"
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <assert.h>
-
-#include <mach/mach_interface.h>
-
-#define NO_CFPLUGIN
-#include <IOKit/IOKitLib.h>
-#include <IOKit/hidsystem/IOHIDShared.h>
-#include <IOKit/hidsystem/event_status_driver.h>
-#include <IOKit/graphics/IOGraphicsLib.h>
-
-// Define this to work around bugs in the display drivers for
-// older PowerBook G3's. If the X server starts without this
-// #define, you don't need it.
-#undef OLD_POWERBOOK_G3
-
-#include "darwin.h"
-#include "xfIOKit.h"
-
-// Globals
-int xfIOKitScreenIndex = 0;
-io_connect_t xfIOKitInputConnect = 0;
-
-static pthread_t inputThread;
-static EvGlobals * evg;
-static mach_port_t masterPort;
-static mach_port_t notificationPort;
-static IONotificationPortRef NotificationPortRef;
-static mach_port_t pmNotificationPort;
-static io_iterator_t fbIter;
-
-
-/*
- * XFIOKitStoreColors
- * This is a callback from X to change the hardware colormap
- * when using PsuedoColor.
- */
-static void XFIOKitStoreColors(
- ColormapPtr pmap,
- int numEntries,
- xColorItem *pdefs)
-{
- kern_return_t kr;
- int i;
- IOColorEntry *newColors;
- ScreenPtr pScreen = pmap->pScreen;
- XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-
- assert( newColors = (IOColorEntry *)
- xalloc( numEntries*sizeof(IOColorEntry) ));
-
- // Convert xColorItem values to IOColorEntry
- // assume the colormap is PsuedoColor
- // as we do not support DirectColor
- for (i = 0; i < numEntries; i++) {
- newColors[i].index = pdefs[i].pixel;
- newColors[i].red = pdefs[i].red;
- newColors[i].green = pdefs[i].green;
- newColors[i].blue = pdefs[i].blue;
- }
-
- kr = IOFBSetCLUT( iokitScreen->fbService, 0, numEntries,
- kSetCLUTByValue, newColors );
- kern_assert( kr );
-
- xfree( newColors );
-}
-
-
-/*
- * DarwinModeBell
- * FIXME
- */
-void DarwinModeBell(
- int loud,
- DeviceIntPtr pDevice,
- pointer ctrl,
- int fbclass)
-{
-}
-
-
-/*
- * DarwinModeGiveUp
- * Closes the connections to IOKit services
- */
-void DarwinModeGiveUp( void )
-{
- int i;
-
- // we must close the HID System first
- // because it is a client of the framebuffer
- NXCloseEventStatus( darwinParamConnect );
- IOServiceClose( xfIOKitInputConnect );
- for (i = 0; i < screenInfo.numScreens; i++) {
- XFIOKitScreenPtr iokitScreen =
- XFIOKIT_SCREEN_PRIV(screenInfo.screens[i]);
- IOServiceClose( iokitScreen->fbService );
- }
-}
-
-
-/*
- * ClearEvent
- * Clear an event from the HID System event queue
- */
-static void ClearEvent(NXEvent * ep)
-{
- static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 };
-
- *ep = nullEvent;
- ep->data.compound.subType = ep->data.compound.misc.L[0] =
- ep->data.compound.misc.L[1] = 0;
-}
-
-
-/*
- * XFIOKitHIDThread
- * Read the HID System event queue, translate it to an X event,
- * and queue it for processing.
- */
-static void *XFIOKitHIDThread(void *unused)
-{
- for (;;) {
- NXEQElement *oldHead;
- mach_msg_return_t kr;
- mach_msg_empty_rcv_t msg;
-
- kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0,
- sizeof(msg), notificationPort, 0, MACH_PORT_NULL);
- kern_assert(kr);
-
- while (evg->LLEHead != evg->LLETail) {
- NXEvent ev;
- xEvent xe;
-
- // Extract the next event from the kernel queue
- oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead];
- ev_lock(&oldHead->sema);
- ev = oldHead->event;
- ClearEvent(&oldHead->event);
- evg->LLEHead = oldHead->next;
- ev_unlock(&oldHead->sema);
-
- memset(&xe, 0, sizeof(xe));
-
- // These fields should be filled in for every event
- xe.u.keyButtonPointer.rootX = ev.location.x;
- xe.u.keyButtonPointer.rootY = ev.location.y;
- xe.u.keyButtonPointer.time = GetTimeInMillis();
-
- switch( ev.type ) {
- case NX_MOUSEMOVED:
- xe.u.u.type = MotionNotify;
- break;
-
- case NX_LMOUSEDOWN:
- xe.u.u.type = ButtonPress;
- xe.u.u.detail = 1;
- break;
-
- case NX_LMOUSEUP:
- xe.u.u.type = ButtonRelease;
- xe.u.u.detail = 1;
- break;
-
- // A newer kernel generates multi-button events with
- // NX_SYSDEFINED. Button 2 isn't handled correctly by
- // older kernels anyway. Just let NX_SYSDEFINED events
- // handle these.
-#if 0
- case NX_RMOUSEDOWN:
- xe.u.u.type = ButtonPress;
- xe.u.u.detail = 2;
- break;
-
- case NX_RMOUSEUP:
- xe.u.u.type = ButtonRelease;
- xe.u.u.detail = 2;
- break;
-#endif
-
- case NX_KEYDOWN:
- xe.u.u.type = KeyPress;
- xe.u.u.detail = ev.data.key.keyCode;
- break;
-
- case NX_KEYUP:
- xe.u.u.type = KeyRelease;
- xe.u.u.detail = ev.data.key.keyCode;
- break;
-
- case NX_FLAGSCHANGED:
- xe.u.u.type = kXDarwinUpdateModifiers;
- xe.u.clientMessage.u.l.longs0 = ev.flags;
- break;
-
- case NX_SYSDEFINED:
- if (ev.data.compound.subType == 7) {
- xe.u.u.type = kXDarwinUpdateButtons;
- xe.u.clientMessage.u.l.longs0 =
- ev.data.compound.misc.L[0];
- xe.u.clientMessage.u.l.longs1 =
- ev.data.compound.misc.L[1];
- } else {
- continue;
- }
- break;
-
- case NX_SCROLLWHEELMOVED:
- xe.u.u.type = kXDarwinScrollWheel;
- xe.u.clientMessage.u.s.shorts0 =
- ev.data.scrollWheel.deltaAxis1;
- break;
-
- default:
- continue;
- }
-
- DarwinEQEnqueue(&xe);
- }
- }
-
- return NULL;
-}
-
-
-/*
- * XFIOKitPMThread
- * Handle power state notifications
- */
-static void *XFIOKitPMThread(void *arg)
-{
- ScreenPtr pScreen = (ScreenPtr)arg;
- XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-
- for (;;) {
- mach_msg_return_t kr;
- mach_msg_empty_rcv_t msg;
-
- kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0,
- sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL);
- kern_assert(kr);
-
- // display is powering down
- if (msg.header.msgh_id == 0) {
- IOFBAcknowledgePM( iokitScreen->fbService );
- xf86SetRootClip(pScreen, FALSE);
- }
- // display just woke up
- else if (msg.header.msgh_id == 1) {
- xf86SetRootClip(pScreen, TRUE);
- }
- }
- return NULL;
-}
-
-
-/*
- * SetupFBandHID
- * Setup an IOFramebuffer service and connect the HID system to it.
- */
-static Bool SetupFBandHID(
- int index,
- DarwinFramebufferPtr dfb,
- XFIOKitScreenPtr iokitScreen)
-{
- kern_return_t kr;
- io_service_t service;
- io_connect_t fbService;
- vm_address_t vram;
- vm_size_t shmemSize;
- int i;
- UInt32 numModes;
- IODisplayModeInformation modeInfo;
- IODisplayModeID displayMode, *allModes;
- IOIndex displayDepth;
- IOFramebufferInformation fbInfo;
- IOPixelInformation pixelInfo;
- StdFBShmem_t *cshmem;
-
- // find and open the IOFrameBuffer service
- service = IOIteratorNext(fbIter);
- if (service == 0)
- return FALSE;
-
- kr = IOServiceOpen( service, mach_task_self(),
- kIOFBServerConnectType, &iokitScreen->fbService );
- IOObjectRelease( service );
- if (kr != KERN_SUCCESS) {
- ErrorF("Failed to connect as window server to screen %i.\n", index);
- return FALSE;
- }
- fbService = iokitScreen->fbService;
-
- // create the slice of shared memory containing cursor state data
- kr = IOFBCreateSharedCursor( fbService,
- kIOFBCurrentShmemVersion,
- 32, 32 );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- // Register for power management events for the framebuffer's device
- kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort);
- kern_assert(kr);
- kr = IOConnectSetNotificationPort( fbService, 0,
- pmNotificationPort, 0 );
- if (kr != KERN_SUCCESS) {
- ErrorF("Power management registration failed.\n");
- }
-
- // SET THE SCREEN PARAMETERS
- // get the current screen resolution, refresh rate and depth
- kr = IOFBGetCurrentDisplayModeAndDepth( fbService,
- &displayMode,
- &displayDepth );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- // use the current screen resolution if the user
- // only wants to change the refresh rate
- if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) {
- kr = IOFBGetDisplayModeInformation( fbService,
- displayMode,
- &modeInfo );
- if (kr != KERN_SUCCESS)
- return FALSE;
- darwinDesiredWidth = modeInfo.nominalWidth;
- darwinDesiredHeight = modeInfo.nominalHeight;
- }
-
- // use the current resolution and refresh rate
- // if the user doesn't have a preference
- if (darwinDesiredWidth == 0) {
-
- // change the pixel depth if desired
- if (darwinDesiredDepth != -1) {
- kr = IOFBGetDisplayModeInformation( fbService,
- displayMode,
- &modeInfo );
- if (kr != KERN_SUCCESS)
- return FALSE;
- if (modeInfo.maxDepthIndex < darwinDesiredDepth) {
- ErrorF("Discarding screen %i:\n", index);
- ErrorF("Current screen resolution does not support desired pixel depth.\n");
- return FALSE;
- }
-
- displayDepth = darwinDesiredDepth;
- kr = IOFBSetDisplayModeAndDepth( fbService, displayMode,
- displayDepth );
- if (kr != KERN_SUCCESS)
- return FALSE;
- }
-
- // look for display mode with correct resolution and refresh rate
- } else {
-
- // get an array of all supported display modes
- kr = IOFBGetDisplayModeCount( fbService, &numModes );
- if (kr != KERN_SUCCESS)
- return FALSE;
- assert(allModes = (IODisplayModeID *)
- xalloc( numModes * sizeof(IODisplayModeID) ));
- kr = IOFBGetDisplayModes( fbService, numModes, allModes );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- for (i = 0; i < numModes; i++) {
- kr = IOFBGetDisplayModeInformation( fbService, allModes[i],
- &modeInfo );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- if (modeInfo.flags & kDisplayModeValidFlag &&
- modeInfo.nominalWidth == darwinDesiredWidth &&
- modeInfo.nominalHeight == darwinDesiredHeight) {
-
- if (darwinDesiredDepth == -1)
- darwinDesiredDepth = modeInfo.maxDepthIndex;
- if (modeInfo.maxDepthIndex < darwinDesiredDepth) {
- ErrorF("Discarding screen %i:\n", index);
- ErrorF("Desired screen resolution does not support desired pixel depth.\n");
- return FALSE;
- }
-
- if ((darwinDesiredRefresh == -1 ||
- (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) {
- displayMode = allModes[i];
- displayDepth = darwinDesiredDepth;
- kr = IOFBSetDisplayModeAndDepth(fbService,
- displayMode,
- displayDepth);
- if (kr != KERN_SUCCESS)
- return FALSE;
- break;
- }
- }
- }
-
- xfree( allModes );
- if (i >= numModes) {
- ErrorF("Discarding screen %i:\n", index);
- ErrorF("Desired screen resolution or refresh rate is not supported.\n");
- return FALSE;
- }
- }
-
- kr = IOFBGetPixelInformation( fbService, displayMode, displayDepth,
- kIOFBSystemAperture, &pixelInfo );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
-#ifdef __i386__
- /* x86 in 8bit mode currently needs fixed color map... */
- if (pixelInfo.bitsPerComponent == 8 &&
- pixelInfo.componentCount == 1)
- {
- pixelInfo.pixelType = kIOFixedCLUTPixels;
- }
-#endif
-
-#ifdef OLD_POWERBOOK_G3
- if (pixelInfo.pixelType == kIOCLUTPixels)
- pixelInfo.pixelType = kIOFixedCLUTPixels;
-#endif
-
- kr = IOFBGetFramebufferInformationForAperture( fbService,
- kIOFBSystemAperture,
- &fbInfo );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- // FIXME: 1x1 IOFramebuffers are sometimes used to indicate video
- // outputs without a monitor connected to them. Since IOKit Xinerama
- // does not really work, this often causes problems on PowerBooks.
- // For now we explicitly check and ignore these screens.
- if (fbInfo.activeWidth <= 1 || fbInfo.activeHeight <= 1) {
- ErrorF("Discarding screen %i:\n", index);
- ErrorF("Invalid width or height.\n");
- return FALSE;
- }
-
- kr = IOConnectMapMemory( fbService, kIOFBCursorMemory,
- mach_task_self(), (vm_address_t *) &cshmem,
- &shmemSize, kIOMapAnywhere );
- if (kr != KERN_SUCCESS)
- return FALSE;
- iokitScreen->cursorShmem = cshmem;
-
- kr = IOConnectMapMemory( fbService, kIOFBSystemAperture,
- mach_task_self(), &vram, &shmemSize,
- kIOMapAnywhere );
- if (kr != KERN_SUCCESS)
- return FALSE;
-
- iokitScreen->framebuffer = (void*)vram;
- dfb->x = cshmem->screenBounds.minx;
- dfb->y = cshmem->screenBounds.miny;
- dfb->width = fbInfo.activeWidth;
- dfb->height = fbInfo.activeHeight;
- dfb->pitch = fbInfo.bytesPerRow;
- dfb->bitsPerPixel = fbInfo.bitsPerPixel;
- dfb->colorBitsPerPixel = pixelInfo.componentCount *
- pixelInfo.bitsPerComponent;
- dfb->bitsPerComponent = pixelInfo.bitsPerComponent;
-
- // allocate shadow framebuffer
- iokitScreen->shadowPtr = xalloc(dfb->pitch * dfb->height);
- dfb->framebuffer = iokitScreen->shadowPtr;
-
- // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor
- if (pixelInfo.pixelType == kIORGBDirectPixels) {
- dfb->colorType = TrueColor;
- } else if (pixelInfo.pixelType == kIOCLUTPixels) {
- dfb->colorType = PseudoColor;
- } else if (pixelInfo.pixelType == kIOFixedCLUTPixels) {
- dfb->colorType = StaticColor;
- }
-
- // Inform the HID system that the framebuffer is also connected to it.
- kr = IOConnectAddClient( xfIOKitInputConnect, fbService );
- kern_assert( kr );
-
- // We have to have added at least one screen
- // before we can enable the cursor.
- kr = IOHIDSetCursorEnable(xfIOKitInputConnect, TRUE);
- kern_assert( kr );
-
- return TRUE;
-}
-
-
-/*
- * DarwinModeAddScreen
- * IOKit specific initialization for each screen.
- */
-Bool DarwinModeAddScreen(
- int index,
- ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- XFIOKitScreenPtr iokitScreen;
-
- // allocate space for private per screen storage
- iokitScreen = xalloc(sizeof(XFIOKitScreenRec));
- XFIOKIT_SCREEN_PRIV(pScreen) = iokitScreen;
-
- // setup hardware framebuffer
- iokitScreen->fbService = 0;
- if (! SetupFBandHID(index, dfb, iokitScreen)) {
- if (iokitScreen->fbService) {
- IOServiceClose(iokitScreen->fbService);
- }
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * XFIOKitShadowUpdate
- * Update the damaged regions of the shadow framebuffer on the screen.
- */
-static void XFIOKitShadowUpdate(ScreenPtr pScreen,
- shadowBufPtr pBuf)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
- RegionPtr damage = &pBuf->damage;
- int numBox = REGION_NUM_RECTS(damage);
- BoxPtr pBox = REGION_RECTS(damage);
- int pitch = dfb->pitch;
- int bpp = dfb->bitsPerPixel/8;
-
- // Loop through all the damaged boxes
- while (numBox--) {
- int width, height, offset;
- unsigned char *src, *dst;
-
- width = (pBox->x2 - pBox->x1) * bpp;
- height = pBox->y2 - pBox->y1;
- offset = (pBox->y1 * pitch) + (pBox->x1 * bpp);
- src = iokitScreen->shadowPtr + offset;
- dst = iokitScreen->framebuffer + offset;
-
- while (height--) {
- memcpy(dst, src, width);
- dst += pitch;
- src += pitch;
- }
-
- // Get the next box
- pBox++;
- }
-}
-
-
-/*
- * DarwinModeSetupScreen
- * Finalize IOKit specific initialization of each screen.
- */
-Bool DarwinModeSetupScreen(
- int index,
- ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- pthread_t pmThread;
-
- // initalize cursor support
- if (! XFIOKitInitCursor(pScreen)) {
- return FALSE;
- }
-
- // initialize shadow framebuffer support
- if (! shadowInit(pScreen, XFIOKitShadowUpdate, NULL)) {
- ErrorF("Failed to initalize shadow framebuffer for screen %i.\n",
- index);
- return FALSE;
- }
-
- // initialize colormap handling as needed
- if (dfb->colorType == PseudoColor) {
- pScreen->StoreColors = XFIOKitStoreColors;
- }
-
- // initialize power manager handling
- pthread_create( &pmThread, NULL, XFIOKitPMThread,
- (void *) pScreen );
-
- return TRUE;
-}
-
-
-/*
- * DarwinModeInitOutput
- * One-time initialization of IOKit output support.
- */
-void DarwinModeInitOutput(
- int argc,
- char **argv)
-{
- static unsigned long generation = 0;
- kern_return_t kr;
- io_iterator_t iter;
- io_service_t service;
- vm_address_t shmem;
- vm_size_t shmemSize;
-
- ErrorF("Display mode: IOKit\n");
-
- // Allocate private storage for each screen's IOKit specific info
- if (generation != serverGeneration) {
- xfIOKitScreenIndex = AllocateScreenPrivateIndex();
- generation = serverGeneration;
- }
-
- kr = IOMasterPort(bootstrap_port, &masterPort);
- kern_assert( kr );
-
- // Find and open the HID System Service
- // Do this now to be sure the Mac OS X window server is not running.
- kr = IOServiceGetMatchingServices( masterPort,
- IOServiceMatching( kIOHIDSystemClass ),
- &iter );
- kern_assert( kr );
-
- assert( service = IOIteratorNext( iter ) );
-
- kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType,
- &xfIOKitInputConnect );
- if (kr != KERN_SUCCESS) {
- ErrorF("Failed to connect to the HID System as the window server!\n");
-#ifdef DARWIN_WITH_QUARTZ
- FatalError("Quit the Mac OS X window server or use the -quartz option.\n");
-#else
- FatalError("Make sure you have quit the Mac OS X window server.\n");
-#endif
- }
-
- IOObjectRelease( service );
- IOObjectRelease( iter );
-
- // Setup the event queue in memory shared by the kernel and X server
- kr = IOHIDCreateSharedMemory( xfIOKitInputConnect,
- kIOHIDCurrentShmemVersion );
- kern_assert( kr );
-
- kr = IOConnectMapMemory( xfIOKitInputConnect, kIOHIDGlobalMemory,
- mach_task_self(), &shmem, &shmemSize,
- kIOMapAnywhere );
- kern_assert( kr );
-
- evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset);
-
- assert(sizeof(EvGlobals) == evg->structSize);
-
- NotificationPortRef = IONotificationPortCreate( masterPort );
-
- notificationPort = IONotificationPortGetMachPort(NotificationPortRef);
-
- kr = IOConnectSetNotificationPort( xfIOKitInputConnect,
- kIOHIDEventNotification,
- notificationPort, 0 );
- kern_assert( kr );
-
- evg->movedMask |= NX_MOUSEMOVEDMASK;
-
- // find number of framebuffers
- kr = IOServiceGetMatchingServices( masterPort,
- IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ),
- &fbIter );
- kern_assert( kr );
-
- darwinScreensFound = 0;
- while ((service = IOIteratorNext(fbIter))) {
- IOObjectRelease( service );
- darwinScreensFound++;
- }
- IOIteratorReset(fbIter);
-}
-
-
-/*
- * DarwinModeInitInput
- * One-time initialization of IOKit input support.
- */
-void DarwinModeInitInput(
- int argc,
- char **argv)
-{
- kern_return_t kr;
- int fd[2];
-
- kr = IOHIDSetEventsEnable(xfIOKitInputConnect, TRUE);
- kern_assert( kr );
-
- // Start event passing thread
- assert( pipe(fd) == 0 );
- darwinEventReadFD = fd[0];
- darwinEventWriteFD = fd[1];
- fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK);
- pthread_create(&inputThread, NULL,
- XFIOKitHIDThread, NULL);
-
-}
-
-
-/*
- * DarwinModeProcessEvent
- * Process IOKit specific events.
- */
-void DarwinModeProcessEvent(
- xEvent *xe)
-{
- // No mode specific events
- ErrorF("Unknown X event caught: %d\n", xe->u.u.type);
-}
diff --git a/hw/darwin/iokit/xfIOKit.h b/hw/darwin/iokit/xfIOKit.h
deleted file mode 100644
index 27d27bc70..000000000
--- a/hw/darwin/iokit/xfIOKit.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- xfIOKit.h
-
- IOKit specific functions and definitions
-*/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _XFIOKIT_H
-#define _XFIOKIT_H
-
-#include <pthread.h>
-#include <IOKit/graphics/IOFramebufferShared.h>
-#include <X11/Xproto.h>
-#include "screenint.h"
-#include "darwin.h"
-
-typedef struct {
- io_connect_t fbService;
- StdFBShmem_t *cursorShmem;
- unsigned char *framebuffer;
- unsigned char *shadowPtr;
-} XFIOKitScreenRec, *XFIOKitScreenPtr;
-
-#define XFIOKIT_SCREEN_PRIV(pScreen) \
- ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr)
-
-extern int xfIOKitScreenIndex; // index into pScreen.devPrivates
-extern io_connect_t xfIOKitInputConnect;
-
-Bool XFIOKitInitCursor(ScreenPtr pScreen);
-
-#endif /* _XFIOKIT_H */
diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c
deleted file mode 100644
index e9c78c130..000000000
--- a/hw/darwin/iokit/xfIOKitCursor.c
+++ /dev/null
@@ -1,736 +0,0 @@
-/**************************************************************
- *
- * Cursor support for Darwin X Server
- *
- * Three different cursor modes are possible:
- * X (0) - tracking via Darwin kernel,
- * display via X machine independent
- * Kernel (1) - tracking and display via Darwin kernel
- * (not currently supported)
- * Hardware (2) - tracking and display via hardware
- *
- * The X software cursor uses the Darwin software cursor
- * routines in IOFramebuffer.cpp to track the cursor, but
- * displays the cursor image using the X machine
- * independent display cursor routines in midispcur.c.
- *
- * The kernel cursor uses IOFramebuffer.cpp routines to
- * track and display the cursor. This gives better
- * performance as the display calls don't have to cross
- * the kernel boundary. Unfortunately, this mode has
- * synchronization issues with the user land X server
- * and isn't currently used.
- *
- * Hardware cursor support lets the hardware handle these
- * details.
- *
- * Kernel and hardware cursor mode only work for cursors
- * up to a certain size, currently 16x16 pixels. If a
- * bigger cursor is set, we fallback to X cursor mode.
- *
- * HISTORY:
- * 1.0 by Torrey T. Lyons, October 30, 2000
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "scrnintstr.h"
-#include "cursorstr.h"
-#include "mipointrst.h"
-#include "micmap.h"
-#define NO_CFPLUGIN
-#include <IOKit/graphics/IOGraphicsLib.h>
-#include <IOKit/hidsystem/IOHIDLib.h>
-#include "darwin.h"
-#include "xfIOKit.h"
-#include <assert.h>
-#define DUMP_DARWIN_CURSOR FALSE
-
-#define CURSOR_PRIV(pScreen) \
- ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr)
-
-// The cursors format are documented in IOFramebufferShared.h.
-#define RGBto34WithGamma(red, green, blue) \
- ( 0x000F \
- | (((red) & 0xF) << 12) \
- | (((green) & 0xF) << 8) \
- | (((blue) & 0xF) << 4) )
-#define RGBto38WithGamma(red, green, blue) \
- ( 0xFF << 24 \
- | (((red) & 0xFF) << 16) \
- | (((green) & 0xFF) << 8) \
- | (((blue) & 0xFF)) )
-#define HighBitOf32 0x80000000
-
-typedef struct {
- Bool canHWCursor;
- short cursorMode;
- RecolorCursorProcPtr RecolorCursor;
- InstallColormapProcPtr InstallColormap;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
- ColormapPtr pInstalledMap;
-} XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr;
-
-static int darwinCursorScreenIndex = -1;
-static unsigned long darwinCursorGeneration = 0;
-
-/*
-===========================================================================
-
- Pointer sprite functions
-
-===========================================================================
-*/
-
-/*
- Realizing the Darwin hardware cursor (ie. converting from the
- X representation to the IOKit representation) is complicated
- by the fact that we have three different potential cursor
- formats to go to, one for each bit depth (8, 15, or 24).
- The IOKit formats are documented in IOFramebufferShared.h.
- X cursors are represented as two pieces, a source and a mask.
- The mask is a bitmap indicating which parts of the cursor are
- transparent and which parts are drawn. The source is a bitmap
- indicating which parts of the non-transparent portion of the the
- cursor should be painted in the foreground color and which should
- be painted in the background color. The bitmaps are given in
- 32-bit format with least significant byte and bit first.
- (This is opposite PowerPC Darwin.)
-*/
-
-typedef struct {
- unsigned char image[CURSORWIDTH*CURSORHEIGHT];
- unsigned char mask[CURSORWIDTH*CURSORHEIGHT];
-} cursorPrivRec, *cursorPrivPtr;
-
-/*
- * XFIOKitRealizeCursor8
- * Convert the X cursor representation to an 8-bit depth
- * format for Darwin. This function assumes the maximum cursor
- * width is a multiple of 8.
- */
-static Bool
-XFIOKitRealizeCursor8(
- ScreenPtr pScreen,
- CursorPtr pCursor)
-{
- cursorPrivPtr newCursor;
- unsigned char *newSourceP, *newMaskP;
- CARD32 *oldSourceP, *oldMaskP;
- xColorItem fgColor, bgColor;
- int index, x, y, rowPad;
- int cursorWidth, cursorHeight;
- ColormapPtr pmap;
-
- // check cursor size just to be sure
- cursorWidth = pCursor->bits->width;
- cursorHeight = pCursor->bits->height;
- if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
- return FALSE;
-
- // get cursor colors in colormap
- index = pScreen->myNum;
- pmap = miInstalledMaps[index];
- if (!pmap) return FALSE;
-
- fgColor.red = pCursor->foreRed;
- fgColor.green = pCursor->foreGreen;
- fgColor.blue = pCursor->foreBlue;
- FakeAllocColor(pmap, &fgColor);
- bgColor.red = pCursor->backRed;
- bgColor.green = pCursor->backGreen;
- bgColor.blue = pCursor->backBlue;
- FakeAllocColor(pmap, &bgColor);
- FakeFreeColor(pmap, fgColor.pixel);
- FakeFreeColor(pmap, bgColor.pixel);
-
- // allocate memory for new cursor image
- newCursor = xalloc( sizeof(cursorPrivRec) );
- if (!newCursor)
- return FALSE;
- memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT );
- memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT );
-
- // convert to 8-bit Darwin cursor format
- oldSourceP = (CARD32 *) pCursor->bits->source;
- oldMaskP = (CARD32 *) pCursor->bits->mask;
- newSourceP = newCursor->image;
- newMaskP = newCursor->mask;
- rowPad = CURSORWIDTH - cursorWidth;
-
- for (y = 0; y < cursorHeight; y++) {
- for (x = 0; x < cursorWidth; x++) {
- if (*oldSourceP & (HighBitOf32 >> x))
- *newSourceP = fgColor.pixel;
- else
- *newSourceP = bgColor.pixel;
- if (*oldMaskP & (HighBitOf32 >> x))
- *newMaskP = 255;
- else
- *newSourceP = pScreen->blackPixel;
- newSourceP++; newMaskP++;
- }
- oldSourceP++; oldMaskP++;
- newSourceP += rowPad; newMaskP += rowPad;
- }
-
- // save the result
- pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
- return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor15
- * Convert the X cursor representation to an 15-bit depth
- * format for Darwin.
- */
-static Bool
-XFIOKitRealizeCursor15(
- ScreenPtr pScreen,
- CursorPtr pCursor)
-{
- unsigned short *newCursor;
- unsigned short fgPixel, bgPixel;
- unsigned short *newSourceP;
- CARD32 *oldSourceP, *oldMaskP;
- int x, y, rowPad;
- int cursorWidth, cursorHeight;
-
- // check cursor size just to be sure
- cursorWidth = pCursor->bits->width;
- cursorHeight = pCursor->bits->height;
- if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
- return FALSE;
-
- // allocate memory for new cursor image
- newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) );
- if (!newCursor)
- return FALSE;
- memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) );
-
- // calculate pixel values
- fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen,
- pCursor->foreBlue );
- bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen,
- pCursor->backBlue );
-
- // convert to 15-bit Darwin cursor format
- oldSourceP = (CARD32 *) pCursor->bits->source;
- oldMaskP = (CARD32 *) pCursor->bits->mask;
- newSourceP = newCursor;
- rowPad = CURSORWIDTH - cursorWidth;
-
- for (y = 0; y < cursorHeight; y++) {
- for (x = 0; x < cursorWidth; x++) {
- if (*oldMaskP & (HighBitOf32 >> x)) {
- if (*oldSourceP & (HighBitOf32 >> x))
- *newSourceP = fgPixel;
- else
- *newSourceP = bgPixel;
- } else {
- *newSourceP = 0;
- }
- newSourceP++;
- }
- oldSourceP++; oldMaskP++;
- newSourceP += rowPad;
- }
-
-#if DUMP_DARWIN_CURSOR
- // Write out the cursor
- ErrorF("Cursor: 0x%x\n", pCursor);
- ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth,
- cursorHeight, rowPad);
- for (y = 0; y < cursorHeight; y++) {
- newSourceP = newCursor + y*CURSORWIDTH;
- for (x = 0; x < cursorWidth; x++) {
- if (*newSourceP == fgPixel)
- ErrorF("x");
- else if (*newSourceP == bgPixel)
- ErrorF("o");
- else
- ErrorF(" ");
- newSourceP++;
- }
- ErrorF("\n");
- }
-#endif
-
- // save the result
- pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
- return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor24
- * Convert the X cursor representation to an 24-bit depth
- * format for Darwin. This function assumes the maximum cursor
- * width is a multiple of 8.
- */
-static Bool
-XFIOKitRealizeCursor24(
- ScreenPtr pScreen,
- CursorPtr pCursor)
-{
- unsigned int *newCursor;
- unsigned int fgPixel, bgPixel;
- unsigned int *newSourceP;
- CARD32 *oldSourceP, *oldMaskP;
- int x, y, rowPad;
- int cursorWidth, cursorHeight;
-
- // check cursor size just to be sure
- cursorWidth = pCursor->bits->width;
- cursorHeight = pCursor->bits->height;
- if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
- return FALSE;
-
- // allocate memory for new cursor image
- newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) );
- if (!newCursor)
- return FALSE;
- memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) );
-
- // calculate pixel values
- fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen,
- pCursor->foreBlue );
- bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen,
- pCursor->backBlue );
-
- // convert to 24-bit Darwin cursor format
- oldSourceP = (CARD32 *) pCursor->bits->source;
- oldMaskP = (CARD32 *) pCursor->bits->mask;
- newSourceP = newCursor;
- rowPad = CURSORWIDTH - cursorWidth;
-
- for (y = 0; y < cursorHeight; y++) {
- for (x = 0; x < cursorWidth; x++) {
- if (*oldMaskP & (HighBitOf32 >> x)) {
- if (*oldSourceP & (HighBitOf32 >> x))
- *newSourceP = fgPixel;
- else
- *newSourceP = bgPixel;
- } else {
- *newSourceP = 0;
- }
- newSourceP++;
- }
- oldSourceP++; oldMaskP++;
- newSourceP += rowPad;
- }
-
-#if DUMP_DARWIN_CURSOR
- // Write out the cursor
- ErrorF("Cursor: 0x%x\n", pCursor);
- ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth,
- cursorHeight, rowPad);
- for (y = 0; y < cursorHeight; y++) {
- newSourceP = newCursor + y*CURSORWIDTH;
- for (x = 0; x < cursorWidth; x++) {
- if (*newSourceP == fgPixel)
- ErrorF("x");
- else if (*newSourceP == bgPixel)
- ErrorF("o");
- else
- ErrorF(" ");
- newSourceP++;
- }
- ErrorF("\n");
- }
-#endif
-
- // save the result
- pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
- return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor
- *
- */
-static Bool
-XFIOKitRealizeCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor)
-{
- Bool result;
- XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
-
- if ((pCursor->bits->height > CURSORHEIGHT) ||
- (pCursor->bits->width > CURSORWIDTH) ||
- // FIXME: this condition is not needed after kernel cursor works
- !ScreenPriv->canHWCursor) {
- result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor);
- } else if (dfb->bitsPerPixel == 8) {
- result = XFIOKitRealizeCursor8(pScreen, pCursor);
- } else if (dfb->bitsPerPixel == 16) {
- result = XFIOKitRealizeCursor15(pScreen, pCursor);
- } else {
- result = XFIOKitRealizeCursor24(pScreen, pCursor);
- }
-
- return result;
-}
-
-
-/*
- * XFIOKitUnrealizeCursor
- *
- */
-static Bool
-XFIOKitUnrealizeCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor)
-{
- Bool result;
- XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- if ((pCursor->bits->height > CURSORHEIGHT) ||
- (pCursor->bits->width > CURSORWIDTH) ||
- // FIXME: this condition is not needed after kernel cursor works
- !ScreenPriv->canHWCursor) {
- result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor);
- } else {
- xfree( pCursor->devPriv[pScreen->myNum] );
- result = TRUE;
- }
-
- return result;
-}
-
-
-/*
- * XFIOKitSetCursor
- * Set the cursor sprite and position
- * Use hardware cursor if possible
- */
-static void
-XFIOKitSetCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor,
- int x,
- int y)
-{
- kern_return_t kr;
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
- StdFBShmem_t *cshmem = iokitScreen->cursorShmem;
- XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- // are we supposed to remove the cursor?
- if (!pCursor) {
- if (ScreenPriv->cursorMode == 0)
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
- else {
- if (!cshmem->cursorShow) {
- cshmem->cursorShow++;
- if (cshmem->hardwareCursorActive) {
- kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
- kern_assert( kr );
- }
- }
- }
- return;
- }
-
- // can we use the kernel or hardware cursor?
- if ((pCursor->bits->height <= CURSORHEIGHT) &&
- (pCursor->bits->width <= CURSORWIDTH) &&
- // FIXME: condition not needed when kernel cursor works
- ScreenPriv->canHWCursor) {
-
- if (ScreenPriv->cursorMode == 0) // remove the X cursor
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
- ScreenPriv->cursorMode = 1; // kernel cursor
-
- // change the cursor image in shared memory
- if (dfb->bitsPerPixel == 8) {
- cursorPrivPtr newCursor =
- (cursorPrivPtr) pCursor->devPriv[pScreen->myNum];
- memcpy(cshmem->cursor.bw8.image[0], newCursor->image,
- CURSORWIDTH*CURSORHEIGHT);
- memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask,
- CURSORWIDTH*CURSORHEIGHT);
- } else if (dfb->bitsPerPixel == 16) {
- unsigned short *newCursor =
- (unsigned short *) pCursor->devPriv[pScreen->myNum];
- memcpy(cshmem->cursor.rgb.image[0], newCursor,
- 2*CURSORWIDTH*CURSORHEIGHT);
- } else {
- unsigned int *newCursor =
- (unsigned int *) pCursor->devPriv[pScreen->myNum];
- memcpy(cshmem->cursor.rgb24.image[0], newCursor,
- 4*CURSORWIDTH*CURSORHEIGHT);
- }
-
- // FIXME: We always use a full size cursor, even if the image
- // is smaller because I couldn't get the padding to come out
- // right otherwise.
- cshmem->cursorSize[0].width = CURSORWIDTH;
- cshmem->cursorSize[0].height = CURSORHEIGHT;
- cshmem->hotSpot[0].x = pCursor->bits->xhot;
- cshmem->hotSpot[0].y = pCursor->bits->yhot;
-
- // try to use a hardware cursor
- if (ScreenPriv->canHWCursor) {
- kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0);
- // FIXME: this is a fatal error without the kernel cursor
- kern_assert( kr );
-#if 0
- if (kr != KERN_SUCCESS) {
- ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr);
- ScreenPriv->canHWCursor = FALSE;
- }
-#endif
- }
-
- // make the new cursor visible
- if (cshmem->cursorShow)
- cshmem->cursorShow--;
-
- if (!cshmem->cursorShow && ScreenPriv->canHWCursor) {
- kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE);
- // FIXME: this is a fatal error without the kernel cursor
- kern_assert( kr );
-#if 0
- if (kr != KERN_SUCCESS) {
- ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr);
- ScreenPriv->canHWCursor = FALSE;
- } else
-#endif
- ScreenPriv->cursorMode = 2; // hardware cursor
- }
-
- return;
- }
-
- // otherwise we use a software cursor
- if (ScreenPriv->cursorMode) {
- /* remove the kernel or hardware cursor */
- XFIOKitSetCursor(pScreen, 0, x, y);
- }
-
- ScreenPriv->cursorMode = 0;
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y);
-}
-
-
-/*
- * XFIOKitMoveCursor
- * Move the cursor. This is a noop for a kernel or hardware cursor.
- */
-static void
-XFIOKitMoveCursor(
- ScreenPtr pScreen,
- int x,
- int y)
-{
- XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- // only the X cursor needs to be explicitly moved
- if (!ScreenPriv->cursorMode)
- (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y);
-}
-
-static miPointerSpriteFuncRec darwinSpriteFuncsRec = {
- XFIOKitRealizeCursor,
- XFIOKitUnrealizeCursor,
- XFIOKitSetCursor,
- XFIOKitMoveCursor
-};
-
-
-/*
-===========================================================================
-
- Pointer screen functions
-
-===========================================================================
-*/
-
-/*
- * XFIOKitCursorOffScreen
- */
-static Bool XFIOKitCursorOffScreen(ScreenPtr *pScreen, int *x, int *y)
-{ return FALSE;
-}
-
-
-/*
- * XFIOKitCrossScreen
- */
-static void XFIOKitCrossScreen(ScreenPtr pScreen, Bool entering)
-{ return;
-}
-
-
-/*
- * XFIOKitWarpCursor
- * Change the cursor position without generating an event or motion history
- */
-static void
-XFIOKitWarpCursor(
- ScreenPtr pScreen,
- int x,
- int y)
-{
- kern_return_t kr;
-
- kr = IOHIDSetMouseLocation( xfIOKitInputConnect, x, y );
- if (kr != KERN_SUCCESS) {
- ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr);
- }
- miPointerWarpCursor(pScreen, x, y);
-}
-
-static miPointerScreenFuncRec darwinScreenFuncsRec = {
- XFIOKitCursorOffScreen,
- XFIOKitCrossScreen,
- XFIOKitWarpCursor,
- DarwinEQPointerPost,
- DarwinEQSwitchScreen
-};
-
-
-/*
-===========================================================================
-
- Other screen functions
-
-===========================================================================
-*/
-
-/*
- * XFIOKitCursorQueryBestSize
- * Handle queries for best cursor size
- */
-static void
-XFIOKitCursorQueryBestSize(
- int class,
- unsigned short *width,
- unsigned short *height,
- ScreenPtr pScreen)
-{
- XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- if (class == CursorShape) {
- *width = CURSORWIDTH;
- *height = CURSORHEIGHT;
- } else
- (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
-}
-
-
-/*
- * XFIOKitInitCursor
- * Initialize cursor support
- */
-Bool
-XFIOKitInitCursor(
- ScreenPtr pScreen)
-{
- XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
- XFIOKitCursorScreenPtr ScreenPriv;
- miPointerScreenPtr PointPriv;
- kern_return_t kr;
-
- // start with no cursor displayed
- if (!iokitScreen->cursorShmem->cursorShow++) {
- if (iokitScreen->cursorShmem->hardwareCursorActive) {
- kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
- kern_assert( kr );
- }
- }
-
- // initialize software cursor handling (always needed as backup)
- if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) {
- return FALSE;
- }
-
- // allocate private storage for this screen's hardware cursor info
- if (darwinCursorGeneration != serverGeneration) {
- if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- darwinCursorGeneration = serverGeneration;
- }
-
- ScreenPriv = xcalloc( 1, sizeof(XFIOKitCursorScreenRec) );
- if (!ScreenPriv) return FALSE;
-
- pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv;
-
- // check if a hardware cursor is supported
- if (!iokitScreen->cursorShmem->hardwareCursorCapable) {
- ScreenPriv->canHWCursor = FALSE;
- ErrorF("Hardware cursor not supported.\n");
- } else {
- // we need to make sure that the hardware cursor really works
- ScreenPriv->canHWCursor = TRUE;
- kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0);
- if (kr != KERN_SUCCESS) {
- ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr);
- ScreenPriv->canHWCursor = FALSE;
- }
- kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE);
- if (kr != KERN_SUCCESS) {
- ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr);
- ScreenPriv->canHWCursor = FALSE;
- }
- IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
- }
-
- ScreenPriv->cursorMode = 0;
- ScreenPriv->pInstalledMap = NULL;
-
- // override some screen procedures
- ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
- pScreen->QueryBestSize = XFIOKitCursorQueryBestSize;
-// ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor;
-// pScreen->ConstrainCursor = XFIOKitConstrainCursor;
-
- // initialize hardware cursor handling
- PointPriv = (miPointerScreenPtr)
- pScreen->devPrivates[miPointerScreenIndex].ptr;
-
- ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
- PointPriv->spriteFuncs = &darwinSpriteFuncsRec;
-
- /* Other routines that might be overridden */
-/*
- CursorLimitsProcPtr CursorLimits;
- RecolorCursorProcPtr RecolorCursor;
-*/
-
- return TRUE;
-}
diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c
deleted file mode 100644
index ad8e05b56..000000000
--- a/hw/darwin/iokit/xfIOKitStartup.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/**************************************************************
- *
- * Startup code for the IOKit Darwin X Server
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "darwin.h"
-#include "darwinKeyboard.h"
-#include "micmap.h"
-
-void GlxExtensionInit(void);
-void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr);
-
-
-/*
- * DarwinHandleGUI
- * This function is called first from main().
- * It does nothing for the IOKit X server.
- */
-void DarwinHandleGUI(
- int argc,
- char *argv[],
- char *envp[] )
-{
-}
-
-
-/*
- * DarwinGlxExtensionInit
- * Initialize the GLX extension.
- * Mesa is linked into the IOKit mode X server so we just call directly.
- */
-void DarwinGlxExtensionInit(void)
-{
-#ifdef GLXEXT
- GlxExtensionInit();
-#endif
-}
-
-
-/*
- * DarwinGlxWrapInitVisuals
- */
-void DarwinGlxWrapInitVisuals(
- miInitVisualsProcPtr *procPtr)
-{
-#ifdef GLXEXT
- GlxWrapInitVisuals(procPtr);
-#endif
-}
-
-
-/*
- * DarwinModeProcessArgument
- * Process IOKit specific command line arguments.
- */
-int DarwinModeProcessArgument(
- int argc,
- char *argv[],
- int i)
-{
-#ifdef DARWIN_WITH_QUARTZ
- // XDarwinStartup uses these arguments to indicate which X server
- // should be started. Ignore them here.
- if (!strcmp( argv[i], "-fullscreen" ) ||
- !strcmp( argv[i], "-rootless" ) ||
- !strcmp( argv[i], "-quartz" ))
- {
- return 1;
- }
-#else
- if (!strcmp( argv[i], "-fullscreen" ) ||
- !strcmp( argv[i], "-rootless" ) ||
- !strcmp( argv[i], "-quartz" ))
- {
- FatalError("Command line option %s is not available without Quartz "
- "support.\n", argv[i]);
- }
-#endif
-
- return 0;
-}
-
-
-/*
- * DarwinModeSystemKeymapSeed
- * Changes to NXKeyMapping are not tracked.
- */
-unsigned int
-DarwinModeSystemKeymapSeed(void)
-{
- return 0;
-}
-
-
-/*
- * DarwinModeReadSystemKeymap
- * IOKit has no alternative to NXKeyMapping API.
- */
-Bool DarwinModeReadSystemKeymap(
- darwinKeyboardInfo *info)
-{
- return FALSE;
-}
diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
deleted file mode 100644
index f8dc16765..000000000
--- a/hw/darwin/quartz/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-noinst_LIBRARIES = libXQuartz.a
-
-AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
-AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
-
-INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
-AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
-if HAVE_XPLUGIN
-AM_DEFS += -DBUILD_XPR
-endif
-DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
-
-libXQuartz_a_SOURCES = \
- Preferences.m \
- XApplication.m \
- XServer.m \
- applewm.c \
- keysym2ucs.c \
- quartz.c \
- quartzAudio.c \
- quartzCocoa.m \
- quartzPasteboard.c \
- quartzKeyboard.c \
- quartzStartup.c \
- pseudoramiX.c
-
-bin_PROGRAMS = XDarwinStartup
-
-XDarwinStartup_SOURCES = XDarwinStartup.c
-XDarwinStartup_LDFLAGS = -Wl,-framework,CoreFoundation \
- -Wl,-framework,ApplicationServices
-XDarwinStartupCFLAGS = -DXBINDIR="${bindir}"
-XDARWINROOT = @APPLE_APPLICATIONS_DIR@
-BINDIR = $(bindir)
-install-exec-local:
- -(cd $(DESTDIR)$(BINDIR); rm X; $(LN_S) XDarwinStartup X)
-
-man1_MANS = XDarwinStartup.man
-
-EXTRA_DIST = \
- applewmExt.h \
- keysym2ucs.h \
- Preferences.h \
- pseudoramiX.h \
- quartzAudio.h \
- quartzCommon.h \
- quartzCursor.c \
- quartzCursor.h \
- quartz.h \
- quartzPasteboard.h \
- XApplication.h \
- XDarwin.pbproj/project.pbxproj \
- XServer.h \
- XDarwinStartup.man
diff --git a/hw/darwin/quartz/Preferences.h b/hw/darwin/quartz/Preferences.h
deleted file mode 100644
index cf43758e7..000000000
--- a/hw/darwin/quartz/Preferences.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@interface Preferences : NSObject
-{
- IBOutlet NSPanel *window;
- IBOutlet id displayField;
- IBOutlet id dockSwitchButton;
- IBOutlet id fakeButton;
- IBOutlet id button2ModifiersMatrix;
- IBOutlet id button3ModifiersMatrix;
- IBOutlet id switchKeyButton;
- IBOutlet id keymapFileField;
- IBOutlet id modeMatrix;
- IBOutlet id modeWindowButton;
- IBOutlet id startupHelpButton;
- IBOutlet id systemBeepButton;
- IBOutlet id mouseAccelChangeButton;
- IBOutlet id useXineramaButton;
- IBOutlet id addToPathButton;
- IBOutlet id addToPathField;
- IBOutlet id useDefaultShellMatrix;
- IBOutlet id useOtherShellField;
- IBOutlet id depthButton;
-
- BOOL isGettingKeyCode;
- int keyCode;
- int modifiers;
- NSMutableString *switchString;
-}
-
-- (IBAction)close:(id)sender;
-- (IBAction)pickFile:(id)sender;
-- (IBAction)saveChanges:(id)sender;
-- (IBAction)setKey:(id)sender;
-
-- (BOOL)sendEvent:(NSEvent *)anEvent;
-
-- (void)awakeFromNib;
-- (void)windowWillClose:(NSNotification *)aNotification;
-
-+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile;
-+ (void)setKeymapFile:(NSString *)newFile;
-+ (void)setSwitchString:(NSString *)newString;
-+ (void)setKeyCode:(int)newKeyCode;
-+ (void)setModifiers:(int)newModifiers;
-+ (void)setDisplay:(int)newDisplay;
-+ (void)setDockSwitch:(BOOL)newDockSwitch;
-+ (void)setFakeButtons:(BOOL)newFakeButtons;
-+ (void)setButton2Mask:(int)newFakeMask;
-+ (void)setButton3Mask:(int)newFakeMask;
-+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange;
-+ (void)setUseQDCursor:(int)newUseQDCursor;
-+ (void)setRootless:(BOOL)newRootless;
-+ (void)setUseAGL:(BOOL)newUseAGL;
-+ (void)setModeWindow:(BOOL)newModeWindow;
-+ (void)setStartupHelp:(BOOL)newStartupHelp;
-+ (void)setSystemBeep:(BOOL)newSystemBeep;
-+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs;
-+ (void)setXinerama:(BOOL)newXinerama;
-+ (void)setAddToPath:(BOOL)newAddToPath;
-+ (void)setAddToPathString:(NSString *)newAddToPathString;
-+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell;
-+ (void)setShellString:(NSString *)newShellString;
-+ (void)setDepth:(int)newDepth;
-+ (void)setDisplayModeBundles:(NSArray *)newBundles;
-+ (void)saveToDisk;
-
-+ (BOOL)useKeymapFile;
-+ (NSString *)keymapFile;
-+ (NSString *)switchString;
-+ (unsigned int)keyCode;
-+ (unsigned int)modifiers;
-+ (int)display;
-+ (BOOL)dockSwitch;
-+ (BOOL)fakeButtons;
-+ (int)button2Mask;
-+ (int)button3Mask;
-+ (BOOL)mouseAccelChange;
-+ (int)useQDCursor;
-+ (BOOL)rootless;
-+ (BOOL)useAGL;
-+ (BOOL)modeWindow;
-+ (BOOL)startupHelp;
-+ (BOOL)systemBeep;
-+ (BOOL)enableKeyEquivalents;
-+ (BOOL)xinerama;
-+ (BOOL)addToPath;
-+ (NSString *)addToPathString;
-+ (BOOL)useDefaultShell;
-+ (NSString *)shellString;
-+ (int)depth;
-+ (NSArray *)displayModeBundles;
-
-@end
-
-// Possible settings for useQDCursor
-enum {
- qdCursor_Never, // never use QuickDraw cursor
- qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth
- qdCursor_Always // always try to use QuickDraw cursor
-};
-
-// Possible settings for depth
-enum {
- depth_Current,
- depth_8Bit,
- depth_15Bit,
- depth_24Bit
-};
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
deleted file mode 100644
index 0425392ae..000000000
--- a/hw/darwin/quartz/Preferences.m
+++ /dev/null
@@ -1,598 +0,0 @@
-//
-// Preferences.m
-//
-// This class keeps track of the user preferences.
-//
-/*
- * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#include <dix-config.h>
-
-#import "quartzCommon.h"
-
-#define BOOL xBOOL
-#include "darwin.h"
-#undef BOOL
-
-#import "Preferences.h"
-
-#include <IOKit/hidsystem/IOLLEvent.h> // for modifier masks
-
-// Macros to build the path name
-#ifndef XBINDIR
-#define XBINDIR /usr/X11/bin
-#endif
-#define STR(s) #s
-#define XSTRPATH(s) STR(s)
-
-// Keys for user defaults dictionary
-static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents";
-
-
-@implementation Preferences
-
-+ (void)initialize
-{
- // Provide user defaults if needed
- NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:0], @"Display",
- @"YES", @"FakeButtons",
- [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask",
- [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask",
- NSLocalizedString(@"USA.keymapping",@""), @"KeymappingFile",
- @"YES", @"UseKeymappingFile",
- NSLocalizedString(@"Cmd-Opt-a",@""), @"SwitchString",
- @"YES", @"UseRootlessMode",
- @"YES", @"UseAGLforGLX",
- @"YES", @"ShowModePickWindow",
- @"YES", @"ShowStartupHelp",
- [NSNumber numberWithInt:0], @"SwitchKeyCode",
- [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)],
- @"SwitchModifiers", @"NO", @"UseSystemBeep",
- @"YES", X11EnableKeyEquivalentsKey,
- @"YES", @"DockSwitch",
- @"NO", @"AllowMouseAccelChange",
- [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor",
- @"YES", @"Xinerama",
- @"YES", @"AddToPath",
- [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString",
- @"YES", @"UseDefaultShell",
- @"/bin/tcsh", @"Shell",
- [NSNumber numberWithInt:depth_Current], @"Depth",
-#ifdef BUILD_XPR
- [NSArray arrayWithObjects:@"xpr.bundle", @"cr.bundle", nil],
-#else
- [NSArray arrayWithObjects:@"cr.bundle", nil],
-#endif
- @"DisplayModeBundles", nil];
-
- [super initialize];
- [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
-}
-
-// Initialize internal state info of switch key button
-- (void)initSwitchKey
-{
- keyCode = [Preferences keyCode];
- modifiers = [Preferences modifiers];
- [switchString setString:[Preferences switchString]];
-}
-
-- (id)init
-{
- self = [super init];
-
- isGettingKeyCode=NO;
- switchString=[[NSMutableString alloc] init];
- [self initSwitchKey];
-
- return self;
-}
-
-// Set a modifiers checkbox matrix to match a modifier mask
-- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask
-{
- [aMatrix setState:(aMask & NX_SHIFTMASK) atRow:0 column:0];
- [aMatrix setState:(aMask & NX_CONTROLMASK) atRow:1 column:0];
- [aMatrix setState:(aMask & NX_COMMANDMASK) atRow:2 column:0];
- [aMatrix setState:(aMask & NX_ALTERNATEMASK) atRow:3 column:0];
- [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0];
-}
-
-// Generate a modifiers mask from a modifiers checkbox matrix
-- (int)getMaskFromMatrix:(NSMatrix *)aMatrix
-{
- int theMask = 0;
-
- if ([[aMatrix cellAtRow:0 column:0] state])
- theMask |= NX_SHIFTMASK;
- if ([[aMatrix cellAtRow:1 column:0] state])
- theMask |= NX_CONTROLMASK;
- if ([[aMatrix cellAtRow:2 column:0] state])
- theMask |= NX_COMMANDMASK;
- if ([[aMatrix cellAtRow:3 column:0] state])
- theMask |= NX_ALTERNATEMASK;
- if ([[aMatrix cellAtRow:4 column:0] state])
- theMask |= NX_SECONDARYFNMASK;
-
- return theMask;
-}
-
-// Set the window controls to the state in user defaults
-- (void)resetWindow
-{
- if ([Preferences keymapFile] == nil)
- [keymapFileField setStringValue:@" "];
- else
- [keymapFileField setStringValue:[Preferences keymapFile]];
-
- if ([Preferences switchString] == nil)
- [switchKeyButton setTitle:@"--"];
- else
- [switchKeyButton setTitle:[Preferences switchString]];
-
- [displayField setIntValue:[Preferences display]];
- [dockSwitchButton setIntValue:[Preferences dockSwitch]];
- [fakeButton setIntValue:[Preferences fakeButtons]];
- [self resetMatrix:button2ModifiersMatrix
- withMask:[Preferences button2Mask]];
- [self resetMatrix:button3ModifiersMatrix
- withMask:[Preferences button3Mask]];
- [modeMatrix setState:[Preferences rootless] atRow:0 column:1];
- [startupHelpButton setIntValue:[Preferences startupHelp]];
- [modeWindowButton setIntValue:[Preferences modeWindow]];
- [systemBeepButton setIntValue:[Preferences systemBeep]];
- [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]];
- [useXineramaButton setIntValue:[Preferences xinerama]];
- [addToPathButton setIntValue:[Preferences addToPath]];
- [addToPathField setStringValue:[Preferences addToPathString]];
- [useDefaultShellMatrix setState:![Preferences useDefaultShell]
- atRow:1 column:0];
- [useOtherShellField setStringValue:[Preferences shellString]];
- [depthButton selectItemAtIndex:[Preferences depth]];
-}
-
-- (void)awakeFromNib
-{
- [self resetWindow];
-}
-
-// Preference window delegate
-- (void)windowWillClose:(NSNotification *)aNotification
-{
- [self resetWindow];
- [self initSwitchKey];
-}
-
-// User cancelled the changes
-- (IBAction)close:(id)sender
-{
- [window orderOut:nil];
- [self resetWindow]; // reset window controls
- [self initSwitchKey]; // reset switch key state
-}
-
-// Pick keymapping file
-- (IBAction)pickFile:(id)sender
-{
- int result;
- NSArray *fileTypes = [NSArray arrayWithObject:@"keymapping"];
- NSOpenPanel *oPanel = [NSOpenPanel openPanel];
-
- [oPanel setAllowsMultipleSelection:NO];
- result = [oPanel runModalForDirectory:@"/System/Library/Keyboards"
- file:nil types:fileTypes];
- if (result == NSOKButton) {
- [keymapFileField setStringValue:[oPanel filename]];
- }
-}
-
-// User saved changes
-- (IBAction)saveChanges:(id)sender
-{
- [Preferences setKeyCode:keyCode];
- [Preferences setModifiers:modifiers];
- [Preferences setSwitchString:switchString];
- [Preferences setKeymapFile:[keymapFileField stringValue]];
- [Preferences setUseKeymapFile:YES];
- [Preferences setDisplay:[displayField intValue]];
- [Preferences setDockSwitch:[dockSwitchButton intValue]];
- [Preferences setFakeButtons:[fakeButton intValue]];
- [Preferences setButton2Mask:
- [self getMaskFromMatrix:button2ModifiersMatrix]];
- [Preferences setButton3Mask:
- [self getMaskFromMatrix:button3ModifiersMatrix]];
- [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]];
- [Preferences setModeWindow:[modeWindowButton intValue]];
- [Preferences setStartupHelp:[startupHelpButton intValue]];
- [Preferences setSystemBeep:[systemBeepButton intValue]];
- [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]];
- [Preferences setXinerama:[useXineramaButton intValue]];
- [Preferences setAddToPath:[addToPathButton intValue]];
- [Preferences setAddToPathString:[addToPathField stringValue]];
- [Preferences setUseDefaultShell:
- [[useDefaultShellMatrix cellAtRow:0 column:0] state]];
- [Preferences setShellString:[useOtherShellField stringValue]];
- [Preferences setDepth:[depthButton indexOfSelectedItem]];
- [Preferences saveToDisk];
-
- [window orderOut:nil];
-}
-
-- (IBAction)setKey:(id)sender
-{
- [switchKeyButton setTitle:NSLocalizedString(@"Press key",@"")];
- isGettingKeyCode=YES;
- [switchString setString:@""];
-}
-
-- (BOOL)sendEvent:(NSEvent *)anEvent
-{
- if(isGettingKeyCode) {
- if([anEvent type]==NSKeyDown) // wait for keyup
- return YES;
- if([anEvent type]!=NSKeyUp)
- return NO;
-
- if([anEvent modifierFlags] & NSCommandKeyMask)
- [switchString appendString:@"Cmd-"];
- if([anEvent modifierFlags] & NSControlKeyMask)
- [switchString appendString:@"Ctrl-"];
- if([anEvent modifierFlags] & NSAlternateKeyMask)
- [switchString appendString:@"Opt-"];
- if([anEvent modifierFlags] & NSNumericPadKeyMask) // doesn't work
- [switchString appendString:@"Num-"];
- if([anEvent modifierFlags] & NSHelpKeyMask)
- [switchString appendString:@"Help-"];
- if([anEvent modifierFlags] & NSFunctionKeyMask) // powerbooks only
- [switchString appendString:@"Fn-"];
-
- [switchString appendString:[anEvent charactersIgnoringModifiers]];
- [switchKeyButton setTitle:switchString];
-
- keyCode = [anEvent keyCode];
- modifiers = [anEvent modifierFlags];
- isGettingKeyCode=NO;
-
- return YES;
- }
- return NO;
-}
-
-+ (void)setKeymapFile:(NSString *)newFile
-{
- [[NSUserDefaults standardUserDefaults] setObject:newFile
- forKey:@"KeymappingFile"];
-}
-
-+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile
-{
- [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile
- forKey:@"UseKeymappingFile"];
-}
-
-+ (void)setSwitchString:(NSString *)newString
-{
- [[NSUserDefaults standardUserDefaults] setObject:newString
- forKey:@"SwitchString"];
-}
-
-+ (void)setKeyCode:(int)newKeyCode
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode
- forKey:@"SwitchKeyCode"];
-}
-
-+ (void)setModifiers:(int)newModifiers
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newModifiers
- forKey:@"SwitchModifiers"];
-}
-
-+ (void)setDisplay:(int)newDisplay
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newDisplay
- forKey:@"Display"];
-}
-
-+ (void)setDockSwitch:(BOOL)newDockSwitch
-{
- [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch
- forKey:@"DockSwitch"];
-}
-
-+ (void)setFakeButtons:(BOOL)newFakeButtons
-{
- [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons
- forKey:@"FakeButtons"];
- // Update the setting used by the X server thread
- darwinFakeButtons = newFakeButtons;
-}
-
-+ (void)setButton2Mask:(int)newFakeMask
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask
- forKey:@"Button2Mask"];
- // Update the setting used by the X server thread
- darwinFakeMouse2Mask = newFakeMask;
-}
-
-+ (void)setButton3Mask:(int)newFakeMask
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask
- forKey:@"Button3Mask"];
- // Update the setting used by the X server thread
- darwinFakeMouse3Mask = newFakeMask;
-}
-
-+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange
-{
- [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange
- forKey:@"AllowMouseAccelChange"];
- // Update the setting used by the X server thread
- // darwinMouseAccelChange = newMouseAccelChange;
-}
-
-+ (void)setUseQDCursor:(int)newUseQDCursor
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor
- forKey:@"UseQDCursor"];
-}
-
-+ (void)setModeWindow:(BOOL)newModeWindow
-{
- [[NSUserDefaults standardUserDefaults] setBool:newModeWindow
- forKey:@"ShowModePickWindow"];
-}
-
-+ (void)setRootless:(BOOL)newRootless
-{
- [[NSUserDefaults standardUserDefaults] setBool:newRootless
- forKey:@"UseRootlessMode"];
-}
-
-+ (void)setUseAGL:(BOOL)newUseAGL
-{
- [[NSUserDefaults standardUserDefaults] setBool:newUseAGL
- forKey:@"UseAGLforGLX"];
-}
-
-+ (void)setStartupHelp:(BOOL)newStartupHelp
-{
- [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp
- forKey:@"ShowStartupHelp"];
-}
-
-+ (void)setSystemBeep:(BOOL)newSystemBeep
-{
- [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep
- forKey:@"UseSystemBeep"];
- // Update the setting used by the X server thread
- quartzUseSysBeep = newSystemBeep;
-}
-
-+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs
-{
- [[NSUserDefaults standardUserDefaults] setBool:newKeyEquivs
- forKey:X11EnableKeyEquivalentsKey];
- // Update the setting used by the X server thread
- quartzEnableKeyEquivalents = newKeyEquivs;
-}
-
-+ (void)setXinerama:(BOOL)newXinerama
-{
- [[NSUserDefaults standardUserDefaults] setBool:newXinerama
- forKey:@"Xinerama"];
-}
-
-+ (void)setAddToPath:(BOOL)newAddToPath
-{
- [[NSUserDefaults standardUserDefaults] setBool:newAddToPath
- forKey:@"AddToPath"];
-}
-
-+ (void)setAddToPathString:(NSString *)newAddToPathString
-{
- [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString
- forKey:@"AddToPathString"];
-}
-
-+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell
-{
- [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell
- forKey:@"UseDefaultShell"];
-}
-
-+ (void)setShellString:(NSString *)newShellString
-{
- [[NSUserDefaults standardUserDefaults] setObject:newShellString
- forKey:@"Shell"];
-}
-
-+ (void)setDepth:(int)newDepth
-{
- [[NSUserDefaults standardUserDefaults] setInteger:newDepth
- forKey:@"Depth"];
-}
-
-+ (void)setDisplayModeBundles:(NSArray *)newBundles
-{
- [[NSUserDefaults standardUserDefaults] setObject:newBundles
- forKey:@"DisplayModeBundles"];
-}
-
-+ (void)saveToDisk
-{
- [[NSUserDefaults standardUserDefaults] synchronize];
-}
-
-+ (BOOL)useKeymapFile
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"UseKeymappingFile"];
-}
-
-+ (NSString *)keymapFile
-{
- return [[NSUserDefaults standardUserDefaults]
- stringForKey:@"KeymappingFile"];
-}
-
-+ (NSString *)switchString
-{
- return [[NSUserDefaults standardUserDefaults]
- stringForKey:@"SwitchString"];
-}
-
-+ (unsigned int)keyCode
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"SwitchKeyCode"];
-}
-
-+ (unsigned int)modifiers
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"SwitchModifiers"];
-}
-
-+ (int)display
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"Display"];
-}
-
-+ (BOOL)dockSwitch
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"];
-}
-
-+ (BOOL)fakeButtons
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"];
-}
-
-+ (int)button2Mask
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"Button2Mask"];
-}
-
-+ (int)button3Mask
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"Button3Mask"];
-}
-
-+ (BOOL)mouseAccelChange
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"AllowMouseAccelChange"];
-}
-
-+ (int)useQDCursor
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"UseQDCursor"];
-}
-
-+ (BOOL)rootless
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"UseRootlessMode"];
-}
-
-+ (BOOL)useAGL
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"UseAGLforGLX"];
-}
-
-+ (BOOL)modeWindow
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"ShowModePickWindow"];
-}
-
-+ (BOOL)startupHelp
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"ShowStartupHelp"];
-}
-
-+ (BOOL)systemBeep
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"];
-}
-
-+ (BOOL)enableKeyEquivalents
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:X11EnableKeyEquivalentsKey];
-}
-
-+ (BOOL)xinerama
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"];
-}
-
-+ (BOOL)addToPath
-{
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"];
-}
-
-+ (NSString *)addToPathString
-{
- return [[NSUserDefaults standardUserDefaults]
- stringForKey:@"AddToPathString"];
-}
-
-+ (BOOL)useDefaultShell
-{
- return [[NSUserDefaults standardUserDefaults]
- boolForKey:@"UseDefaultShell"];
-}
-
-+ (NSString *)shellString
-{
- return [[NSUserDefaults standardUserDefaults]
- stringForKey:@"Shell"];
-}
-
-+ (int)depth
-{
- return [[NSUserDefaults standardUserDefaults]
- integerForKey:@"Depth"];
-}
-
-+ (NSArray *)displayModeBundles
-{
- return [[NSUserDefaults standardUserDefaults]
- objectForKey:@"DisplayModeBundles"];
-}
-
-@end
diff --git a/hw/darwin/quartz/XApplication.h b/hw/darwin/quartz/XApplication.h
deleted file mode 100644
index 2f2b22389..000000000
--- a/hw/darwin/quartz/XApplication.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// XApplication.h
-//
-// Created by Andreas Monitzer on January 6, 2001.
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "XServer.h"
-#import "Preferences.h"
-
-@interface XApplication : NSApplication {
- IBOutlet XServer *xserver;
- IBOutlet Preferences *preferences;
-}
-
-- (void)sendEvent:(NSEvent *)anEvent;
-
-@end
diff --git a/hw/darwin/quartz/XApplication.m b/hw/darwin/quartz/XApplication.m
deleted file mode 100644
index c18d9a570..000000000
--- a/hw/darwin/quartz/XApplication.m
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// XApplication.m
-//
-// Created by Andreas Monitzer on January 6, 2001.
-
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#import "XApplication.h"
-
-
-@implementation XApplication
-
-- (void)sendEvent:(NSEvent *)anEvent {
- if (![xserver translateEvent:anEvent]) {
- if (![preferences sendEvent:anEvent])
- [super sendEvent:anEvent];
- }
-}
-
-@end
diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
deleted file mode 100644
index 0ad831423..000000000
--- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
+++ /dev/null
@@ -1,2519 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 39;
- objects = {
- 01279092000747AA0A000002 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = XServer.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 0127909600074AF60A000002 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = XApplication.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 0127909800074B1A0A000002 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = XApplication.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 015698ED003DF345CE6F79C2 = {
- isa = PBXFileReference;
- lastKnownFileType = image.icns;
- path = XDarwin.icns;
- refType = 4;
- sourceTree = "<group>";
- };
- 0157A37D002CF6D7CE6F79C2 = {
- children = (
- F533214601A4B45401000001,
- 0157A37E002CF6D7CE6F79C2,
- F58D65DF018F79B101000001,
- F533213D0193CBE001000001,
- 43B962E200617B93416877C2,
- F5ACD263C5BE031F01000001,
- F51BF62E02026E3501000001,
- F5ACD25CC5B5E96601000001,
- F587E16401924C6901000001,
- );
- isa = PBXVariantGroup;
- name = Credits.rtf;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 0157A37E002CF6D7CE6F79C2 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = English;
- path = English.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- 015EDCEA004203A8CE6F79C2 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = IOKit.framework;
- path = /System/Library/Frameworks/IOKit.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
- 018F40F2003E1902CE6F79C2 = {
- children = (
- 018F40F3003E1916CE6F79C2,
- 021D6BA9003E1BACCE6F79C2,
- 3E74E03600863F047F000001,
- F5A94EF10314BAC70100011B,
- 018F40F6003E1974CE6F79C2,
- 6E5F5F0005537A1A008FEAD7,
- );
- isa = PBXGroup;
- name = "X Server";
- path = ..;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40F3003E1916CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = darwin.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40F6003E1974CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = darwinKeyboard.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40F8003E1979CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartz.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40FA003E197ECE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = quartz.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40FC003E1983CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xfIOKit.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F40FE003E1988CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = xfIOKit.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 018F4100003E19E4CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xfIOKitCursor.c;
- refType = 4;
- sourceTree = "<group>";
- };
-//010
-//011
-//012
-//013
-//014
-//020
-//021
-//022
-//023
-//024
- 021D6BA9003E1BACCE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = darwin.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 02A1FEA6006D34BE416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xfIOKitStartup.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 02A1FEA8006D38F0416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartzStartup.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 02E03CA000348209CE6F79C2 = {
- children = (
- F533214701A4B48301000001,
- 02E03CA100348209CE6F79C2,
- F58D65E0018F79C001000001,
- F533213E0193CBF401000001,
- 43B962E300617B93416877C2,
- F5ACD268C5BE046401000001,
- F51BF62F02026E5C01000001,
- F5ACD261C5B5EA2001000001,
- F587E16501924C7401000001,
- );
- isa = PBXVariantGroup;
- name = XDarwinHelp.html;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 02E03CA100348209CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = English;
- path = English.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
-//020
-//021
-//022
-//023
-//024
-//030
-//031
-//032
-//033
-//034
- 0338412F0083BFE57F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = quartzCursor.h;
- refType = 4;
- sourceTree = "<group>";
- };
-//030
-//031
-//032
-//033
-//034
-//040
-//041
-//042
-//043
-//044
- 04329610000763920A000002 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = Preferences.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 04329611000763920A000002 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = Preferences.h;
- refType = 4;
- sourceTree = "<group>";
- };
-//040
-//041
-//042
-//043
-//044
-//080
-//081
-//082
-//083
-//084
- 080E96DDFE201D6D7F000001 = {
- children = (
- 04329610000763920A000002,
- 04329611000763920A000002,
- 0127909600074AF60A000002,
- 0127909800074B1A0A000002,
- 01279092000747AA0A000002,
- 1C4A3109004D8F24CE6F79C2,
- );
- isa = PBXGroup;
- name = Classes;
- refType = 4;
- sourceTree = "<group>";
- };
- 089C165CFE840E0CC02AAC07 = {
- children = (
- F533214301A4B3F001000001,
- 089C165DFE840E0CC02AAC07,
- F58D65DD018F798F01000001,
- F533213A0193CBA201000001,
- 43B962E100617B49416877C2,
- F5ACD269C5BE049301000001,
- F51BF62B02026DDA01000001,
- F5ACD262C5B5EA4D01000001,
- F587E16101924C2F01000001,
- );
- isa = PBXVariantGroup;
- name = InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- 089C165DFE840E0CC02AAC07 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = English;
- path = English.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
-//080
-//081
-//082
-//083
-//084
-//0A0
-//0A1
-//0A2
-//0A3
-//0A4
- 0A79E19E004499A1CE6F79C2 = {
- explicitFileType = wrapper.application;
- isa = PBXFileReference;
- path = XDarwin.app;
- refType = 3;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 0A79E19F004499A1CE6F79C2 = {
- buildPhases = (
- 0A79E1A0004499A1CE6F79C2,
- 0A79E1A1004499A1CE6F79C2,
- 0A79E1A2004499A1CE6F79C2,
- 0A79E1A3004499A1CE6F79C2,
- 0A79E1A4004499A1CE6F79C2,
- );
- buildSettings = {
- INSTALL_PATH = /;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = XDarwin;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = app;
- };
- dependencies = (
- 6EF065C903D4F0CA006877C2,
- 6EF065C703D4EE19006877C2,
- 6E11A986048BDFFB006877C2,
- 6E7904110500F33B00EEC080,
- );
- isa = PBXApplicationTarget;
- name = XDarwin;
- productInstallPath = /;
- productName = XDarwin;
- productReference = 0A79E19E004499A1CE6F79C2;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>x11app</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>X11 Application</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>****</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- </dict>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>tool</string>
- <string>*</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>UNIX Application</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>****</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- </dict>
- </array>
- <key>CFBundleExecutable</key>
- <string>XDarwin</string>
- <key>CFBundleGetInfoString</key>
- <string>XDarwin 1.4.0, X.Org Foundation</string>
- <key>CFBundleIconFile</key>
- <string>XDarwin.icns</string>
- <key>CFBundleIdentifier</key>
- <string>org.x.x11</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>XDarwin</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>XDarwin 1.4.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string></string>
- <key>NSHelpFile</key>
- <string>XDarwinHelp.html</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>XApplication</string>
-</dict>
-</plist>
-";
- };
- 0A79E1A0004499A1CE6F79C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 0A79E1A1004499A1CE6F79C2 = {
- buildActionMask = 2147483647;
- files = (
- 0A79E1A600449EB2CE6F79C2,
- 0A79E1A700449EB2CE6F79C2,
- 0A79E1A800449EB2CE6F79C2,
- 0A79E1A900449EB2CE6F79C2,
- 0A79E1AA00449EB2CE6F79C2,
- 1220774500712D2D416877C2,
- F54BF6ED017D506E01000001,
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 0A79E1A2004499A1CE6F79C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 0A79E1A3004499A1CE6F79C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 0A79E1A4004499A1CE6F79C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 0A79E1A600449EB2CE6F79C2 = {
- fileRef = 29B97318FDCFA39411CA2CEA;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 0A79E1A700449EB2CE6F79C2 = {
- fileRef = 089C165CFE840E0CC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 0A79E1A800449EB2CE6F79C2 = {
- fileRef = 0157A37D002CF6D7CE6F79C2;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 0A79E1A900449EB2CE6F79C2 = {
- fileRef = 02E03CA000348209CE6F79C2;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 0A79E1AA00449EB2CE6F79C2 = {
- fileRef = 015698ED003DF345CE6F79C2;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//0A0
-//0A1
-//0A2
-//0A3
-//0A4
-//100
-//101
-//102
-//103
-//104
- 1058C7A0FEA54F0111CA2CBB = {
- children = (
- F53321400193CCF001000001,
- 1BE4F84D0006C9890A000002,
- 1058C7A1FEA54F0111CA2CBB,
- F53321410193CCF001000001,
- 015EDCEA004203A8CE6F79C2,
- );
- isa = PBXGroup;
- name = "Linked Frameworks";
- refType = 4;
- sourceTree = "<group>";
- };
- 1058C7A1FEA54F0111CA2CBB = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = Cocoa.framework;
- path = /System/Library/Frameworks/Cocoa.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
- 1058C7A2FEA54F0111CA2CBB = {
- children = (
- 29B97325FDCFA39411CA2CEA,
- 29B97324FDCFA39411CA2CEA,
- );
- isa = PBXGroup;
- name = "Other Frameworks";
- refType = 4;
- sourceTree = "<group>";
- };
-//100
-//101
-//102
-//103
-//104
-//120
-//121
-//122
-//123
-//124
- 1220774300712D2D416877C2 = {
- children = (
- F533214501A4B42501000001,
- 1220774400712D2D416877C2,
- F58D65DE018F79A001000001,
- F533213C0193CBC901000001,
- 1220774600712D75416877C2,
- F5ACD266C5BE03C501000001,
- F51BF62D02026E1C01000001,
- F5ACD25FC5B5E9AA01000001,
- F587E16301924C5E01000001,
- );
- isa = PBXVariantGroup;
- name = Localizable.strings;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 1220774400712D2D416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = English;
- path = English.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- 1220774500712D2D416877C2 = {
- fileRef = 1220774300712D2D416877C2;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 1220774600712D75416877C2 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Japanese;
- path = Japanese.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
-//120
-//121
-//122
-//123
-//124
-//170
-//171
-//172
-//173
-//174
- 170DFAFF00729A35416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = XDarwinStartup.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 170DFB0000729C86416877C2 = {
- children = (
- 018F40FC003E1983CE6F79C2,
- 018F40FE003E1988CE6F79C2,
- 018F4100003E19E4CE6F79C2,
- 02A1FEA6006D34BE416877C2,
- );
- isa = PBXGroup;
- name = IOKit;
- path = ../iokit;
- refType = 4;
- sourceTree = "<group>";
- };
-//170
-//171
-//172
-//173
-//174
-//190
-//191
-//192
-//193
-//194
- 19C28FACFE9D520D11CA2CBB = {
- children = (
- 0A79E19E004499A1CE6F79C2,
- 6EF7C58703D3BC6D00000104,
- 6EF065C603D4EE19006877C2,
- 6E11A985048BDFEE006877C2,
- 6E7904100500F05600EEC080,
- );
- isa = PBXGroup;
- name = Products;
- refType = 4;
- sourceTree = "<group>";
- };
-//190
-//191
-//192
-//193
-//194
-//1B0
-//1B1
-//1B2
-//1B3
-//1B4
- 1BD8DE4200B8A3567F000001 = {
- children = (
- F533214401A4B40F01000001,
- 1BD8DE4300B8A3567F000001,
- F58D65DC018F794D01000001,
- F533213B0193CBB401000001,
- 1BD8DE4700B8A3C77F000001,
- F5ACD264C5BE035B01000001,
- F51BF62C02026E0601000001,
- F5ACD25DC5B5E97701000001,
- F587E16201924C5301000001,
- );
- isa = PBXVariantGroup;
- name = InfoPlist.strings.cpp;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 1BD8DE4300B8A3567F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = English;
- path = English.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- 1BD8DE4400B8A38E7F000001 = {
- children = (
- F533214801A4B4D701000001,
- 1BD8DE4500B8A38E7F000001,
- F58D65E1018F79E001000001,
- F533213F0193CC2501000001,
- 1BD8DE4800B8A4167F000001,
- F5ACD267C5BE03FC01000001,
- F51BF63002026E8D01000001,
- F5ACD260C5B5E9DF01000001,
- F587E16601924C9D01000001,
- );
- isa = PBXVariantGroup;
- name = XDarwinHelp.html.cpp;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 1BD8DE4500B8A38E7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = English;
- path = English.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- 1BD8DE4700B8A3C77F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Japanese;
- path = Japanese.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- 1BD8DE4800B8A4167F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Japanese;
- path = Japanese.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- 1BE4F84D0006C9890A000002 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = Carbon.framework;
- path = /System/Library/Frameworks/Carbon.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
-//1B0
-//1B1
-//1B2
-//1B3
-//1B4
-//1C0
-//1C1
-//1C2
-//1C3
-//1C4
- 1C4A3109004D8F24CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = XServer.h;
- refType = 4;
- sourceTree = "<group>";
- };
-//1C0
-//1C1
-//1C2
-//1C3
-//1C4
-//230
-//231
-//232
-//233
-//234
- 237A34C10076E37E7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartzAudio.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 237A34C20076E37E7F000001 = {
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- OPTIMIZATION_CFLAGS = "-O0";
- ZERO_LINK = YES;
- };
- isa = PBXBuildStyle;
- name = Development;
- };
- 237A34C30076E37E7F000001 = {
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- ZERO_LINK = NO;
- };
- isa = PBXBuildStyle;
- name = Deployment;
- };
- 237A34C40076F4F07F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = quartzAudio.h;
- refType = 4;
- sourceTree = "<group>";
- };
-//230
-//231
-//232
-//233
-//234
-//290
-//291
-//292
-//293
-//294
- 29B97313FDCFA39411CA2CEA = {
- buildSettings = {
- };
- buildStyles = (
- 237A34C20076E37E7F000001,
- 237A34C30076E37E7F000001,
- );
- hasScannedForEncodings = 1;
- isa = PBXProject;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- Swedish,
- Dutch,
- Spanish,
- ko,
- Portuguese,
- );
- mainGroup = 29B97314FDCFA39411CA2CEA;
- projectDirPath = "";
- targets = (
- 0A79E19F004499A1CE6F79C2,
- 6EF7C58603D3BC6D00000104,
- 6E11A984048BDFEE006877C2,
- 6EF065C503D4EE19006877C2,
- 6E79040F0500F05600EEC080,
- );
- };
- 29B97314FDCFA39411CA2CEA = {
- children = (
- 080E96DDFE201D6D7F000001,
- 018F40F2003E1902CE6F79C2,
- 170DFB0000729C86416877C2,
- 43B962CE00617089416877C2,
- F5614B3D025112D901000114,
- 6EC4A64C042A9597006877C2,
- 32FEE13C00E07C3E7F000001,
- 6EE1214104968658006877C2,
- 6EC4A66D042A97FC006877C2,
- 29B97315FDCFA39411CA2CEA,
- 29B97317FDCFA39411CA2CEA,
- 29B97323FDCFA39411CA2CEA,
- 19C28FACFE9D520D11CA2CBB,
- );
- isa = PBXGroup;
- name = "Xmaster-Cocoa";
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 29B97315FDCFA39411CA2CEA = {
- children = (
- 170DFAFF00729A35416877C2,
- );
- isa = PBXGroup;
- name = "Other Sources";
- path = "";
- refType = 2;
- sourceTree = SOURCE_ROOT;
- };
- 29B97317FDCFA39411CA2CEA = {
- children = (
- 29B97318FDCFA39411CA2CEA,
- 089C165CFE840E0CC02AAC07,
- 1BD8DE4200B8A3567F000001,
- 1220774300712D2D416877C2,
- 0157A37D002CF6D7CE6F79C2,
- 02E03CA000348209CE6F79C2,
- 1BD8DE4400B8A38E7F000001,
- 015698ED003DF345CE6F79C2,
- F54BF6EA017D500901000001,
- F54BF6EC017D506E01000001,
- );
- isa = PBXGroup;
- name = Resources;
- path = ../bundle;
- refType = 4;
- sourceTree = "<group>";
- };
- 29B97318FDCFA39411CA2CEA = {
- children = (
- F533214201A4B3CE01000001,
- 29B97319FDCFA39411CA2CEA,
- F58D65DB018F793801000001,
- F53321390193CB6A01000001,
- 43B962E000617B49416877C2,
- F5ACD265C5BE038601000001,
- F51BF62A02026DAF01000001,
- F5ACD25EC5B5E98D01000001,
- F587E16001924C1D01000001,
- );
- isa = PBXVariantGroup;
- name = MainMenu.nib;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 29B97319FDCFA39411CA2CEA = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = English;
- path = English.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- 29B97323FDCFA39411CA2CEA = {
- children = (
- 1058C7A0FEA54F0111CA2CBB,
- 1058C7A2FEA54F0111CA2CBB,
- );
- isa = PBXGroup;
- name = Frameworks;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 29B97324FDCFA39411CA2CEA = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = AppKit.framework;
- path = /System/Library/Frameworks/AppKit.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
- 29B97325FDCFA39411CA2CEA = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = Foundation.framework;
- path = /System/Library/Frameworks/Foundation.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
-//290
-//291
-//292
-//293
-//294
-//320
-//321
-//322
-//323
-//324
- 32FEE13C00E07C3E7F000001 = {
- children = (
- F5269C2D01D5BC3501000001,
- F5269C2E01D5BC3501000001,
- );
- isa = PBXGroup;
- name = "Old Cocoa Imp";
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
-//320
-//321
-//322
-//323
-//324
-//350
-//351
-//352
-//353
-//354
- 3576829A0077B8F17F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartzCursor.c;
- refType = 4;
- sourceTree = "<group>";
- };
-//350
-//351
-//352
-//353
-//354
-//3E0
-//3E1
-//3E2
-//3E3
-//3E4
- 3E74E03600863F047F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = darwinClut8.h;
- refType = 4;
- sourceTree = "<group>";
- };
-//3E0
-//3E1
-//3E2
-//3E3
-//3E4
-//430
-//431
-//432
-//433
-//434
- 43B962CE00617089416877C2 = {
- children = (
- 6EE9B21604E859C200CA7FEA,
- 6E97A0F505079F9100B8294C,
- 6E5F5F030553815A008FEAD7,
- 6E5F5F040553815A008FEAD7,
- 018F40F8003E1979CE6F79C2,
- 018F40FA003E197ECE6F79C2,
- 237A34C10076E37E7F000001,
- 237A34C40076F4F07F000001,
- 43B962CF00617089416877C2,
- F5582948015DAD3B01000001,
- 6E5F5F0105537A5F008FEAD7,
- 43B962D000617089416877C2,
- 43B962D100617089416877C2,
- 02A1FEA8006D38F0416877C2,
- );
- isa = PBXGroup;
- name = Quartz;
- path = "";
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962CF00617089416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = quartzCocoa.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962D000617089416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartzPasteboard.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962D100617089416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = quartzPasteboard.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962E000617B49416877C2 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = Japanese;
- path = Japanese.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962E100617B49416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Japanese;
- path = Japanese.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962E200617B93416877C2 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = Japanese;
- path = Japanese.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- 43B962E300617B93416877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = Japanese;
- path = Japanese.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
-//430
-//431
-//432
-//433
-//434
-//6E0
-//6E1
-//6E2
-//6E3
-//6E4
- 6E11A97F048BDFEE006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E11A980048BDFEE006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E11A981048BDFEE006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E11A982048BDFEE006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E11A983048BDFEE006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E11A984048BDFEE006877C2 = {
- buildPhases = (
- 6E11A97F048BDFEE006877C2,
- 6E11A980048BDFEE006877C2,
- 6E11A981048BDFEE006877C2,
- 6E11A982048BDFEE006877C2,
- 6E11A983048BDFEE006877C2,
- );
- buildSettings = {
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = glxCGL;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = bundle;
- };
- dependencies = (
- );
- isa = PBXBundleTarget;
- name = glxCGL;
- productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
- productName = glxCGL;
- productReference = 6E11A985048BDFEE006877C2;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>glxCGL</string>
- <key>CFBundleGetInfoString</key>
- <string></string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string></string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>GLX bundle using Apple's OpenGL</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.1</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>0.1</string>
-</dict>
-</plist>
-";
- };
- 6E11A985048BDFEE006877C2 = {
- explicitFileType = wrapper.cfbundle;
- isa = PBXFileReference;
- path = glxCGL.bundle;
- refType = 3;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 6E11A986048BDFFB006877C2 = {
- isa = PBXTargetDependency;
- target = 6E11A984048BDFEE006877C2;
- targetProxy = 6E4CAF650702464F001A7398;
- };
- 6E4CAF630702464F001A7398 = {
- containerPortal = 29B97313FDCFA39411CA2CEA;
- isa = PBXContainerItemProxy;
- proxyType = 1;
- remoteGlobalIDString = 6EF7C58603D3BC6D00000104;
- remoteInfo = glxAGL;
- };
- 6E4CAF640702464F001A7398 = {
- containerPortal = 29B97313FDCFA39411CA2CEA;
- isa = PBXContainerItemProxy;
- proxyType = 1;
- remoteGlobalIDString = 6E79040F0500F05600EEC080;
- remoteInfo = xpr;
- };
- 6E4CAF650702464F001A7398 = {
- containerPortal = 29B97313FDCFA39411CA2CEA;
- isa = PBXContainerItemProxy;
- proxyType = 1;
- remoteGlobalIDString = 6E11A984048BDFEE006877C2;
- remoteInfo = glxCGL;
- };
- 6E4CAF660702464F001A7398 = {
- containerPortal = 29B97313FDCFA39411CA2CEA;
- isa = PBXContainerItemProxy;
- proxyType = 1;
- remoteGlobalIDString = 6EF065C503D4EE19006877C2;
- remoteInfo = glxMesa;
- };
- 6E5F5F0005537A1A008FEAD7 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = darwinKeyboard.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E5F5F0105537A5F008FEAD7 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = quartzKeyboard.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E5F5F030553815A008FEAD7 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = keysym2ucs.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E5F5F040553815A008FEAD7 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = keysym2ucs.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656EC048832CF006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = "x-hook.c";
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656ED048832CF006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = "x-hook.h";
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656F0048832EC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = dri.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656F1048832EC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = dri.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656F2048832EC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = dristruct.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E6656F3048832F9006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = appledri.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E79040104FD5ED900EEC080 = {
- children = (
- 6E79040204FD5EDA00EEC080,
- 6E79040304FD5EDA00EEC080,
- 6E79040404FD5EDA00EEC080,
- );
- isa = PBXGroup;
- name = "Safe Alpha";
- path = safeAlpha;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E79040204FD5EDA00EEC080 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = safeAlpha.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E79040304FD5EDA00EEC080 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = safeAlphaPicture.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E79040404FD5EDA00EEC080 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = safeAlphaWindow.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E79040A0500F05600EEC080 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E79040B0500F05600EEC080 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E79040C0500F05600EEC080 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E79040D0500F05600EEC080 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E79040E0500F05600EEC080 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6E79040F0500F05600EEC080 = {
- buildPhases = (
- 6E79040A0500F05600EEC080,
- 6E79040B0500F05600EEC080,
- 6E79040C0500F05600EEC080,
- 6E79040D0500F05600EEC080,
- 6E79040E0500F05600EEC080,
- );
- buildSettings = {
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = xpr;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = bundle;
- };
- dependencies = (
- );
- isa = PBXBundleTarget;
- name = xpr;
- productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
- productName = xpr;
- productReference = 6E7904100500F05600EEC080;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>xpr</string>
- <key>CFBundleGetInfoString</key>
- <string></string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string></string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Xplugin rootless implementation</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.1</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>0.1</string>
-</dict>
-</plist>
-";
- };
- 6E7904100500F05600EEC080 = {
- explicitFileType = wrapper.cfbundle;
- isa = PBXFileReference;
- path = xpr.bundle;
- refType = 3;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 6E7904110500F33B00EEC080 = {
- isa = PBXTargetDependency;
- target = 6E79040F0500F05600EEC080;
- targetProxy = 6E4CAF640702464F001A7398;
- };
- 6E97A0F2050798B100B8294C = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xprAppleWM.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E97A0F305079B6500B8294C = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = crAppleWM.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 6E97A0F505079F9100B8294C = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = applewmExt.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3AF0544A9CC006877C2 = {
- children = (
- 6EA0B3B00544A9CC006877C2,
- 6EA0B3B10544A9CC006877C2,
- 6EA0B3B20544A9CC006877C2,
- 6EA0B3B30544A9CC006877C2,
- 6EA0B3B40544A9CC006877C2,
- 6EA0B3B50544A9CC006877C2,
- 6EA0B3B60544A9CC006877C2,
- 6EA0B3B70544A9CC006877C2,
- );
- isa = PBXGroup;
- name = Acceleration;
- path = accel;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B00544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = rlAccel.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B10544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlBlt.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B20544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlCopy.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B30544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlFill.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B40544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlFillRect.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B50544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlFillSpans.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B60544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlGlyph.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA0B3B70544A9CC006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rlSolid.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EA8EEC80445E25C006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = rootlessConfig.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A64C042A9597006877C2 = {
- children = (
- 6EC4A65D042A9654006877C2,
- 6EC4A65E042A9654006877C2,
- 6EC4A65F042A9654006877C2,
- 6EA8EEC80445E25C006877C2,
- 6EC4A661042A9654006877C2,
- 6EC4A662042A9654006877C2,
- 6EC4A660042A9654006877C2,
- 6EC4A663042A9654006877C2,
- 6EC4A664042A9654006877C2,
- 6EA0B3AF0544A9CC006877C2,
- 6E79040104FD5ED900EEC080,
- );
- isa = PBXGroup;
- name = Rootless;
- path = ../../../miext/rootless;
- refType = 2;
- sourceTree = SOURCE_ROOT;
- };
- 6EC4A65D042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = rootless.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A65E042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rootlessCommon.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A65F042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = rootlessCommon.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A660042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = rootlessWindow.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A661042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rootlessScreen.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A662042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rootlessWindow.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A663042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rootlessGC.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A664042A9654006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = rootlessValTree.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EC4A66D042A97FC006877C2 = {
- children = (
- 6EF471A004478DE0006877C2,
- 6E6656F3048832F9006877C2,
- 6E6656F0048832EC006877C2,
- 6E6656F1048832EC006877C2,
- 6E6656F2048832EC006877C2,
- 6ECF218404589E4D006877C2,
- 6E97A0F2050798B100B8294C,
- 6ECF218604589F40006877C2,
- 6EF4719E04478B08006877C2,
- 6EDDB2DF04508B2C006877C2,
- 6EF471A204479263006877C2,
- 6EF471A404479263006877C2,
- 6E6656EC048832CF006877C2,
- 6E6656ED048832CF006877C2,
- 6EF471A504479263006877C2,
- 6EF471A304479263006877C2,
- );
- isa = PBXGroup;
- path = xpr;
- refType = 4;
- sourceTree = "<group>";
- };
- 6ECF218404589E4D006877C2 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = xpr.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6ECF218604589F40006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xprCursor.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EDDB2DF04508B2C006877C2 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xprScreen.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214104968658006877C2 = {
- children = (
- 6EE1214304968692006877C2,
- 6EE1214404968692006877C2,
- 6EE1214204968692006877C2,
- 6E97A0F305079B6500B8294C,
- 6EE1214504968692006877C2,
- 6EE1214604968692006877C2,
- );
- isa = PBXGroup;
- path = cr;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214204968692006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = cr.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214304968692006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = XView.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214404968692006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = XView.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214504968692006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = crFrame.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE1214604968692006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- path = crScreen.m;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EE9B21604E859C200CA7FEA = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = applewm.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF065C003D4EE19006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF065C103D4EE19006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF065C203D4EE19006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF065C303D4EE19006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF065C403D4EE19006877C2 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF065C503D4EE19006877C2 = {
- buildPhases = (
- 6EF065C003D4EE19006877C2,
- 6EF065C103D4EE19006877C2,
- 6EF065C203D4EE19006877C2,
- 6EF065C303D4EE19006877C2,
- 6EF065C403D4EE19006877C2,
- );
- buildSettings = {
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = glxMesa;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = bundle;
- };
- dependencies = (
- );
- isa = PBXBundleTarget;
- name = glxMesa;
- productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
- productName = glxMesa;
- productReference = 6EF065C603D4EE19006877C2;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>glxMesa</string>
- <key>CFBundleGetInfoString</key>
- <string></string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string></string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>GLX bundle with Mesa</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.1</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>0.1</string>
-</dict>
-</plist>
-";
- };
- 6EF065C603D4EE19006877C2 = {
- explicitFileType = wrapper.cfbundle;
- isa = PBXFileReference;
- path = glxMesa.bundle;
- refType = 3;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 6EF065C703D4EE19006877C2 = {
- isa = PBXTargetDependency;
- target = 6EF065C503D4EE19006877C2;
- targetProxy = 6E4CAF660702464F001A7398;
- };
- 6EF065C903D4F0CA006877C2 = {
- isa = PBXTargetDependency;
- target = 6EF7C58603D3BC6D00000104;
- targetProxy = 6E4CAF630702464F001A7398;
- };
- 6EF4719E04478B08006877C2 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = xprFrame.c;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF471A004478DE0006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = Xplugin.h;
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF471A204479263006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = "x-hash.c";
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF471A304479263006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = "x-list.h";
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF471A404479263006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = "x-hash.h";
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF471A504479263006877C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = "x-list.c";
- refType = 4;
- sourceTree = "<group>";
- };
- 6EF7C58103D3BC6D00000104 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF7C58203D3BC6D00000104 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF7C58303D3BC6D00000104 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF7C58403D3BC6D00000104 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF7C58503D3BC6D00000104 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6EF7C58603D3BC6D00000104 = {
- buildPhases = (
- 6EF7C58103D3BC6D00000104,
- 6EF7C58203D3BC6D00000104,
- 6EF7C58303D3BC6D00000104,
- 6EF7C58403D3BC6D00000104,
- 6EF7C58503D3BC6D00000104,
- );
- buildSettings = {
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = glxAGL;
- SECTORDER_FLAGS = "";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = bundle;
- };
- dependencies = (
- );
- isa = PBXBundleTarget;
- name = glxAGL;
- productName = glxAGL;
- productReference = 6EF7C58703D3BC6D00000104;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>glxAGL</string>
- <key>CFBundleGetInfoString</key>
- <string></string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string></string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>GLX bundle using AGL framework</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>0.1</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>0.1</string>
-</dict>
-</plist>
-";
- };
- 6EF7C58703D3BC6D00000104 = {
- explicitFileType = wrapper.cfbundle;
- isa = PBXFileReference;
- path = glxAGL.bundle;
- refType = 3;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
-//6E0
-//6E1
-//6E2
-//6E3
-//6E4
-//F50
-//F51
-//F52
-//F53
-//F54
- F51BF62A02026DAF01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = Portuguese;
- path = Portuguese.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF62B02026DDA01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Portuguese;
- path = Portuguese.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF62C02026E0601000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Portuguese;
- path = Portuguese.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF62D02026E1C01000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Portuguese;
- path = Portuguese.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF62E02026E3501000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = Portuguese;
- path = Portuguese.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF62F02026E5C01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = Portuguese;
- path = Portuguese.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F51BF63002026E8D01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Portuguese;
- path = Portuguese.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5269C2D01D5BC3501000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = pseudoramiX.c;
- refType = 4;
- sourceTree = "<group>";
- };
- F5269C2E01D5BC3501000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = pseudoramiX.h;
- refType = 4;
- sourceTree = "<group>";
- };
- F53321390193CB6A01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = German;
- path = German.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213A0193CBA201000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = German;
- path = German.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213B0193CBB401000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = German;
- path = German.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213C0193CBC901000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = German;
- path = German.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213D0193CBE001000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = German;
- path = German.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213E0193CBF401000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = German;
- path = German.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F533213F0193CC2501000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = German;
- path = German.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F53321400193CCF001000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = ApplicationServices.framework;
- path = /System/Library/Frameworks/ApplicationServices.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
- F53321410193CCF001000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.framework;
- name = CoreAudio.framework;
- path = /System/Library/Frameworks/CoreAudio.framework;
- refType = 0;
- sourceTree = "<absolute>";
- };
- F533214201A4B3CE01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = Dutch;
- path = Dutch.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214301A4B3F001000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Dutch;
- path = Dutch.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214401A4B40F01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Dutch;
- path = Dutch.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214501A4B42501000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Dutch;
- path = Dutch.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214601A4B45401000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = Dutch;
- path = Dutch.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214701A4B48301000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = Dutch;
- path = Dutch.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F533214801A4B4D701000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Dutch;
- path = Dutch.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F54BF6EA017D500901000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- path = startXClients.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F54BF6EC017D506E01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.script.sh;
- path = startXClients;
- refType = 4;
- sourceTree = "<group>";
- };
- F54BF6ED017D506E01000001 = {
- fileRef = F54BF6EC017D506E01000001;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5582948015DAD3B01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = quartzCommon.h;
- refType = 4;
- sourceTree = "<group>";
- };
- F5614B3B0251124C01000114 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = fullscreen.c;
- refType = 4;
- sourceTree = "<group>";
- };
- F5614B3D025112D901000114 = {
- children = (
- F5614B3B0251124C01000114,
- 3576829A0077B8F17F000001,
- 0338412F0083BFE57F000001,
- );
- isa = PBXGroup;
- path = fullscreen;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16001924C1D01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = Swedish;
- path = Swedish.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16101924C2F01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Swedish;
- path = Swedish.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16201924C5301000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Swedish;
- path = Swedish.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16301924C5E01000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Swedish;
- path = Swedish.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16401924C6901000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = Swedish;
- path = Swedish.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16501924C7401000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = Swedish;
- path = Swedish.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F587E16601924C9D01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Swedish;
- path = Swedish.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65DB018F793801000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = French;
- path = French.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65DC018F794D01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = French;
- path = French.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65DD018F798F01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = French;
- path = French.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65DE018F79A001000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = French;
- path = French.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65DF018F79B101000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = French;
- path = French.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65E0018F79C001000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = French;
- path = French.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F58D65E1018F79E001000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = French;
- path = French.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5A94EF10314BAC70100011B = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- path = darwinEvents.c;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD25CC5B5E96601000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = Spanish;
- path = Spanish.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD25DC5B5E97701000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Spanish;
- path = Spanish.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD25EC5B5E98D01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = Spanish;
- path = Spanish.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD25FC5B5E9AA01000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Spanish;
- path = Spanish.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD260C5B5E9DF01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = Spanish;
- path = Spanish.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD261C5B5EA2001000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = Spanish;
- path = Spanish.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD262C5B5EA4D01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = Spanish;
- path = Spanish.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD263C5BE031F01000001 = {
- isa = PBXFileReference;
- lastKnownFileType = text.rtf;
- name = ko;
- path = ko.lproj/Credits.rtf;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD264C5BE035B01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = ko;
- path = ko.lproj/InfoPlist.strings.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD265C5BE038601000001 = {
- isa = PBXFileReference;
- lastKnownFileType = wrapper.nib;
- name = ko;
- path = ko.lproj/MainMenu.nib;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD266C5BE03C501000001 = {
- fileEncoding = 10;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = ko;
- path = ko.lproj/Localizable.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD267C5BE03FC01000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = ko;
- path = ko.lproj/XDarwinHelp.html.cpp;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD268C5BE046401000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.html;
- name = ko;
- path = ko.lproj/XDarwinHelp.html;
- refType = 4;
- sourceTree = "<group>";
- };
- F5ACD269C5BE049301000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = text.plist.strings;
- name = ko;
- path = ko.lproj/InfoPlist.strings;
- refType = 4;
- sourceTree = "<group>";
- };
- };
- rootObject = 29B97313FDCFA39411CA2CEA;
-}
diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c
deleted file mode 100644
index 8041e32d5..000000000
--- a/hw/darwin/quartz/XDarwinStartup.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/**************************************************************
- *
- * Startup program for Darwin X servers
- *
- * This program selects the appropriate X server to launch:
- * XDarwin IOKit X server (default)
- * XDarwinQuartz A soft link to the Quartz X server
- * executable (-quartz etc. option)
- *
- * If told to idle, the program will simply pause and not
- * launch any X server. This is to support startx being
- * run by XDarwin.app.
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * TORREY T. LYONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Torrey T. Lyons shall not
- * be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from
- * Torrey T. Lyons.
- */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/syslimits.h>
-#include <ApplicationServices/ApplicationServices.h>
-
-// Macros to build the path name
-#ifndef XBINDIR
-#define XBINDIR /usr/X11/bin
-#endif
-#define STR(s) #s
-#define XSTRPATH(s) STR(s) "/"
-#define XPATH(file) XSTRPATH(XBINDIR) STR(file)
-
-int main(
- int argc,
- char *argv[] )
-{
- int i, j, quartzMode = -1;
- char **newargv;
-
- // Check if we are going to run in Quartz mode or idle
- // to support startx from the Quartz server. The last
- // parameter in the list is the one used.
- for (i = argc-1; i; i--) {
- if (!strcmp(argv[i], "-idle")) {
- pause();
- return 0;
-
- } else if (!strcmp(argv[i], "-quartz") ||
- !strcmp(argv[i], "-rootless") ||
- !strcmp(argv[i], "-fullscreen"))
- {
- quartzMode = 1;
- break;
-
- } else if (!strcmp(argv[i], "-iokit")) {
- quartzMode = 0;
- break;
- }
- }
-
- if (quartzMode == -1) {
-#ifdef HAS_CG_MACH_PORT
- // Check if the CoreGraphics window server is running.
- // Mike Paquette says this is the fastest way to determine if it is running.
- CFMachPortRef cgMachPortRef = CGWindowServerCFMachPort();
- if (cgMachPortRef == NULL)
- quartzMode = 0;
- else
- quartzMode = 1;
-#else
- // On older systems we assume IOKit mode.
- quartzMode = 0;
-#endif
- }
-
- if (quartzMode) {
- // Launch the X server for the quartz modes
-
- char quartzPath[PATH_MAX+1];
- int pathLength;
- OSStatus theStatus;
- CFURLRef appURL;
- CFStringRef appPath;
- Boolean success;
-
- // Build the new argument list
- newargv = (char **) malloc((argc+2) * sizeof(char *));
- for (j = argc; j; j--)
- newargv[j] = argv[j];
- newargv[argc] = "-nostartx";
- newargv[argc+1] = NULL;
-
- // Use the XDarwinQuartz soft link if it is valid
- pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX);
- if (pathLength != -1) {
- quartzPath[pathLength] = '\0';
- newargv[0] = quartzPath;
- execv(newargv[0], newargv);
- }
-
- // Otherwise query LaunchServices for the location of the XDarwin application
- theStatus = LSFindApplicationForInfo(kLSUnknownCreator,
- CFSTR("org.x.x11"),
- NULL, NULL, &appURL);
- if (theStatus) {
- fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus);
- fprintf(stderr, "Launch XDarwin once from the Finder.\n");
- return theStatus;
- }
-
- appPath = CFURLCopyFileSystemPath (appURL, kCFURLPOSIXPathStyle);
- success = CFStringGetCString(appPath, quartzPath, PATH_MAX, CFStringGetSystemEncoding());
- if (! success) {
- fprintf(stderr, "Could not find path to XDarwin application.\n");
- return success;
- }
-
- // Launch the XDarwin application
- strncat(quartzPath, "/Contents/MacOS/XDarwin", PATH_MAX);
- newargv[0] = quartzPath;
- execv(newargv[0], newargv);
- fprintf(stderr, "Could not start XDarwin application at %s.\n", newargv[0]);
- return errno;
-
- } else {
-
- // Build the new argument list
- newargv = (char **) malloc((argc+1) * sizeof(char *));
- for (j = argc; j; j--)
- newargv[j] = argv[j];
- newargv[0] = "XDarwin";
- newargv[argc] = NULL;
-
- // Launch the IOKit X server
- execvp(newargv[0], newargv);
- fprintf(stderr, "Could not start XDarwin IOKit X server.\n");
- return errno;
- }
-}
diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man
deleted file mode 100644
index 1ad3bbced..000000000
--- a/hw/darwin/quartz/XDarwinStartup.man
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH XDarwinStartup 1
-.SH NAME
-XDarwinStartup - Startup program for the XDarwin X window server
-.SH SYNOPSIS
-.B XDarwinStartup
-[\fI-iokit\fP]
-[\fI-fullscreen\fP]
-[\fI-rootless\fP]
-[\fI-quartz\fP]
-[\fI-idle\fP]
-[\fIoptions\fP]
-.SH DESCRIPTION
-The \fIXDarwin(1)\fP X window server can be run in a variety of different
-modes and is actually two different executables. The IOKit X server,
-XDarwin, is used when running from the console. It is most commonly
-located in __XBinDir__. The Quartz X server, for running in parallel with
-Aqua, is a full-fledged Mac OS X application that can be started from
-the Finder. Its application bundle is XDarwin.app, which is typically
-located in /Applications.
-.I XDarwinStartup
-allows easy switching between these X servers and auto-detection of the
-appropriate one to use when launching from the command line.
-When run without any arguments,
-.I XDarwinStartup
-will start the Quartz X server if the Core Graphics window server
-is currently running. Otherwise it will start the IOKit X server.
-.PP
-To locate the Quartz X server,
-.I XDarwinStartup
-will try to read the soft link at __XBinDir__/XDarwinQuartz.
-This is typically a soft link to the executable of the XDarwin.app
-application. If this fails,
-.I XDarwinStartup
-will call Launch Services to locate XDarwin.app.
-.PP
-To start the IOKit X server,
-.I XDarwinStartup
-will run the XDarwin executable, which should be present in the
-user's path.
-.SH OPTIONS
-.I XDarwinStartup
-accepts and passes on all options to the X server it
-launches. In addition the following options have specific effects:
-.TP 8
-.B \-iokit
-Launch the IOKit X server.
-.TP 8
-.B \-fullscreen
-Launch the Quartz X server to run in full screen mode.
-.TP 8
-.B \-rootless
-Launch the Quartz X server to run in rootless mode.
-.TP 8
-.B \-quartz
-Launch the Quartz X server.
-.TP 8
-.B \-idle
-Pause and do nothing. This option is used by XDarwin.app when it is
-started from the Finder.
-.SH FILES
-.TP 30
-__XBinDir__/XDarwin
-IOKit mode X server
-.TP 30
-/Applications/XDarwin.app
-Quartz mode X server
-.TP 30
-__XBinDir__/XDarwinQuartz
-Soft link to Quartz mode X server executable
-.SH SEE ALSO
-XDarwin(1)
-.SH BUGS
-The path to XDarwinQuartz should not be hard coded.
-
diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h
deleted file mode 100644
index 030ccb51f..000000000
--- a/hw/darwin/quartz/XServer.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// XServer.h
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#define BOOL xBOOL
-#include <X11/Xproto.h>
-#undef BOOL
-
-#import <Cocoa/Cocoa.h>
-
-@interface XServer : NSObject {
- // Server state
- int serverState;
- NSRecursiveLock *serverLock;
- NSMutableArray *pendingClients;
- BOOL serverVisible;
- BOOL rootlessMenuBarVisible;
- BOOL queueShowServer;
- BOOL quitWithoutQuery;
- BOOL pendingAppQuitReply;
- UInt32 mouseState;
- unsigned short swallowedKey;
- BOOL sendServerEvents;
- BOOL x11Active;
-
- // Aqua interface
- IBOutlet NSWindow *modeWindow;
- IBOutlet NSButton *startupModeButton;
- IBOutlet NSButton *startFullScreenButton;
- IBOutlet NSButton *startRootlessButton;
- IBOutlet NSWindow *helpWindow;
- IBOutlet NSButton *startupHelpButton;
- IBOutlet NSPanel *switchWindow;
-
- // Menu elements setable by Apple-WM extension
- IBOutlet NSMenu *windowMenu;
- IBOutlet NSMenuItem *windowSeparator;
- IBOutlet NSMenu *dockMenu;
- int checkedWindowItem;
-}
-
-- (id)init;
-
-- (BOOL)translateEvent:(NSEvent *)anEvent;
-- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent;
-
-- (NSString *)makeSafePath:(NSString *)path;
-
-- (BOOL)loadDisplayBundle;
-- (void)startX;
-- (void)finishStartX;
-- (BOOL)startXClients;
-- (void)runClient:(NSString *)filename;
-- (void)run;
-- (void)toggle;
-- (void)showServer:(BOOL)show;
-- (void)forceShowServer:(BOOL)show;
-- (void)setRootClip:(BOOL)enable;
-- (void)readPasteboard;
-- (void)writePasteboard;
-- (void)quitServer;
-- (void)sendXEvent:(xEvent *)xe;
-- (void)sendShowHide:(BOOL)show;
-- (void)clientProcessDone:(int)clientStatus;
-- (void)activateX11:(BOOL)state;
-- (void)windowBecameKey:(NSNotification *)notification;
-- (void)setX11WindowList:(NSArray *)list;
-- (void)setX11WindowCheck:(NSNumber *)nn;
-
-// Aqua interface actions
-- (IBAction)startFullScreen:(id)sender;
-- (IBAction)startRootless:(id)sender;
-- (IBAction)closeHelpAndShow:(id)sender;
-- (IBAction)showSwitchPanel:(id)sender;
-- (IBAction)showAction:(id)sender;
-- (IBAction)itemSelected:(id)sender;
-- (IBAction)nextWindow:(id)sender;
-- (IBAction)previousWindow:(id)sender;
-- (IBAction)performClose:(id)sender;
-- (IBAction)performMiniaturize:(id)sender;
-- (IBAction)performZoom:(id)sender;
-- (IBAction)bringAllToFront:(id)sender;
-- (IBAction)copy:(id)sender;
-
-// NSApplication delegate
-- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
-- (void)applicationWillTerminate:(NSNotification *)aNotification;
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
-- (void)applicationDidHide:(NSNotification *)aNotification;
-- (void)applicationDidUnhide:(NSNotification *)aNotification;
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
-- (void)applicationWillResignActive:(NSNotification *)aNotification;
-- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
-- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
-
-// NSPort delegate
-- (void)handlePortMessage:(NSPortMessage *)portMessage;
-
-@end
-
-// X server states
-enum {
- server_NotStarted,
- server_Starting,
- server_Running,
- server_Quitting,
- server_Done
-};
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
deleted file mode 100644
index f8173cb7f..000000000
--- a/hw/darwin/quartz/XServer.m
+++ /dev/null
@@ -1,1538 +0,0 @@
-//
-// XServer.m
-//
-// This class handles the interaction between the Cocoa front-end
-// and the Darwin X server thread.
-//
-// Created by Andreas Monitzer on January 6, 2001.
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- * Copyright (c) 2002-2005 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization.
- */
-
-#include <dix-config.h>
-#include "quartzCommon.h"
-
-#define BOOL xBOOL
-#include "X11/X.h"
-#include "X11/Xproto.h"
-#include "os.h"
-#include "opaque.h"
-#include "darwin.h"
-#include "quartz.h"
-#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
-#include "applewmExt.h"
-#undef BOOL
-
-#import "XServer.h"
-#import "Preferences.h"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/syslimits.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <pwd.h>
-#include <signal.h>
-#include <fcntl.h>
-
-// For power management notifications
-#import <mach/mach_port.h>
-#import <mach/mach_interface.h>
-#import <mach/mach_init.h>
-#import <IOKit/pwr_mgt/IOPMLib.h>
-#import <IOKit/IOMessage.h>
-
-// Types of shells
-enum {
- shell_Unknown,
- shell_Bourne,
- shell_C
-};
-
-typedef struct {
- char *name;
- int type;
-} shellList_t;
-
-static shellList_t const shellList[] = {
- { "csh", shell_C }, // standard C shell
- { "tcsh", shell_C }, // ... needs no introduction
- { "sh", shell_Bourne }, // standard Bourne shell
- { "zsh", shell_Bourne }, // Z shell
- { "bash", shell_Bourne }, // GNU Bourne again shell
- { NULL, shell_Unknown }
-};
-
-extern int argcGlobal;
-extern char **argvGlobal;
-extern char **envpGlobal;
-extern int main(int argc, char *argv[], char *envp[]);
-extern void HideMenuBar(void);
-extern void ShowMenuBar(void);
-static void childDone(int sig);
-static void powerDidChange(void *x, io_service_t y, natural_t messageType,
- void *messageArgument);
-
-static NSPort *signalPort;
-static NSPort *returnPort;
-static NSPortMessage *signalMessage;
-static pid_t clientPID;
-static XServer *oneXServer;
-static NSRect aquaMenuBarBox;
-static io_connect_t root_port;
-
-
-@implementation XServer
-
-- (id)init
-{
- self = [super init];
- oneXServer = self;
-
- serverState = server_NotStarted;
- serverLock = [[NSRecursiveLock alloc] init];
- pendingClients = nil;
- clientPID = 0;
- sendServerEvents = NO;
- x11Active = YES;
- serverVisible = NO;
- rootlessMenuBarVisible = YES;
- queueShowServer = YES;
- quartzServerQuitting = NO;
- pendingAppQuitReply = NO;
- mouseState = 0;
-
- // set up a port to safely send messages to main thread from server thread
- signalPort = [[NSPort port] retain];
- returnPort = [[NSPort port] retain];
- signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort
- receivePort:returnPort components:nil];
-
- // set up receiving end
- [signalPort setDelegate:self];
- [[NSRunLoop currentRunLoop] addPort:signalPort
- forMode:NSDefaultRunLoopMode];
- [[NSRunLoop currentRunLoop] addPort:signalPort
- forMode:NSModalPanelRunLoopMode];
-
- return self;
-}
-
-- (NSApplicationTerminateReply)
- applicationShouldTerminate:(NSApplication *)sender
-{
- // Quit if the X server is not running
- if ([serverLock tryLock]) {
- quartzServerQuitting = YES;
- serverState = server_Done;
- if (clientPID != 0)
- kill(clientPID, SIGINT);
- return NSTerminateNow;
- }
-
- // Hide the X server and stop sending it events
- [self showServer:NO];
- sendServerEvents = NO;
-
- if (!quitWithoutQuery && (clientPID != 0 || !quartzStartClients)) {
- int but;
-
- but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""),
- NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""),
- NSLocalizedString(@"Quit",@""),
- NSLocalizedString(@"Cancel",@""),
- nil);
-
- switch (but) {
- case NSAlertDefaultReturn: // quit
- break;
- case NSAlertAlternateReturn: // cancel
- if (serverState == server_Running)
- sendServerEvents = YES;
- return NSTerminateCancel;
- }
- }
-
- quartzServerQuitting = YES;
- if (clientPID != 0)
- kill(clientPID, SIGINT);
-
- // At this point the X server is either running or starting.
- if (serverState == server_Starting) {
- // Quit will be queued later when server is running
- pendingAppQuitReply = YES;
- return NSTerminateLater;
- } else if (serverState == server_Running) {
- [self quitServer];
- }
-
- return NSTerminateNow;
-}
-
-// Ensure that everything has quit cleanly
-- (void)applicationWillTerminate:(NSNotification *)aNotification
-{
- // Make sure the client process has finished
- if (clientPID != 0) {
- NSLog(@"Waiting on client process...");
- sleep(2);
-
- // If the client process hasn't finished yet, kill it off
- if (clientPID != 0) {
- int clientStatus;
- NSLog(@"Killing client process...");
- killpg(clientPID, SIGKILL);
- waitpid(clientPID, &clientStatus, 0);
- }
- }
-
- // Wait until the X server thread quits
- [serverLock lock];
-}
-
-// returns YES when event was handled
-- (BOOL)translateEvent:(NSEvent *)anEvent
-{
- xEvent xe;
- static BOOL mouse1Pressed = NO;
- NSEventType type;
- unsigned int flags;
-
- if (!sendServerEvents) {
- return NO;
- }
-
- type = [anEvent type];
- flags = [anEvent modifierFlags];
-
- if (!quartzRootless) {
- // Check for switch keypress
- if ((type == NSKeyDown) && (![anEvent isARepeat]) &&
- ([anEvent keyCode] == [Preferences keyCode]))
- {
- unsigned int switchFlags = [Preferences modifiers];
-
- // Switch if all the switch modifiers are pressed, while none are
- // pressed that should not be, except for caps lock.
- if (((flags & switchFlags) == switchFlags) &&
- ((flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0))
- {
- [self toggle];
- return YES;
- }
- }
-
- if (!serverVisible)
- return NO;
- }
-
- memset(&xe, 0, sizeof(xe));
-
- switch (type) {
- case NSLeftMouseUp:
- if (quartzRootless && !mouse1Pressed) {
- // MouseUp after MouseDown in menu - ignore
- return NO;
- }
- mouse1Pressed = NO;
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonRelease;
- xe.u.u.detail = 1;
- break;
-
- case NSLeftMouseDown:
- if (quartzRootless) {
- // Check that event is in X11 window
- if (!quartzProcs->IsX11Window([anEvent window],
- [anEvent windowNumber]))
- {
- if (x11Active)
- [self activateX11:NO];
- return NO;
- } else {
- if (!x11Active)
- [self activateX11:YES];
- }
- }
- mouse1Pressed = YES;
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonPress;
- xe.u.u.detail = 1;
- break;
-
- case NSRightMouseUp:
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonRelease;
- xe.u.u.detail = 3;
- break;
-
- case NSRightMouseDown:
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonPress;
- xe.u.u.detail = 3;
- break;
-
- case NSOtherMouseUp:
- {
- int hwButton = [anEvent buttonNumber];
-
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonRelease;
- xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1;
- break;
- }
-
- case NSOtherMouseDown:
- {
- int hwButton = [anEvent buttonNumber];
-
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = ButtonPress;
- xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1;
- break;
- }
-
- case NSMouseMoved:
- case NSLeftMouseDragged:
- case NSRightMouseDragged:
- case NSOtherMouseDragged:
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = MotionNotify;
- break;
-
- case NSScrollWheel:
- [self getMousePosition:&xe fromEvent:anEvent];
- xe.u.u.type = kXDarwinScrollWheel;
- xe.u.clientMessage.u.s.shorts0 = [anEvent deltaX] +
- [anEvent deltaY];
- break;
-
- case NSKeyDown:
- case NSKeyUp:
- if (!x11Active) {
- swallowedKey = 0;
- return NO;
- }
-
- if (type == NSKeyDown) {
- // If the mouse is not on the valid X display area,
- // don't send the X server key events.
- if (![self getMousePosition:&xe fromEvent:nil]) {
- swallowedKey = [anEvent keyCode];
- return NO;
- }
-
- // See if there are any global shortcuts for this key combo.
- if (quartzEnableKeyEquivalents
- && [[NSApp mainMenu] performKeyEquivalent:anEvent])
- {
- swallowedKey = [anEvent keyCode];
- return YES;
- }
- } else {
- // If the down key event was a valid key combo,
- // don't pass the up event to X11.
- if (swallowedKey != 0 && [anEvent keyCode] == swallowedKey) {
- swallowedKey = 0;
- return NO;
- }
- }
-
- xe.u.u.type = (type == NSKeyDown) ? KeyPress : KeyRelease;
- xe.u.u.detail = [anEvent keyCode];
- break;
-
- case NSFlagsChanged:
- if (!x11Active)
- return NO;
- xe.u.u.type = kXDarwinUpdateModifiers;
- xe.u.clientMessage.u.l.longs0 = flags;
- break;
-
- default:
- return NO;
- }
-
- [self sendXEvent:&xe];
-
- // Rootless: Send first NSLeftMouseDown to Cocoa windows and views so
- // window ordering can be suppressed.
- // Don't pass further events - they (incorrectly?) bring the window
- // forward no matter what.
- if (quartzRootless &&
- (type == NSLeftMouseDown || type == NSLeftMouseUp) &&
- [anEvent clickCount] == 1 && [anEvent window])
- {
- return NO;
- }
-
- return YES;
-}
-
-// Return mouse coordinates, inverting y coordinate.
-// The coordinates are extracted from an event or the current mouse position.
-// For rootless mode, the menu bar is treated as not part of the usable
-// X display area and the cursor position is adjusted accordingly.
-// Returns YES if the cursor is not in the menu bar.
-- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent
-{
- NSPoint pt;
-
- if (anEvent) {
- NSWindow *eventWindow = [anEvent window];
-
- if (eventWindow) {
- pt = [anEvent locationInWindow];
- pt.x += [eventWindow frame].origin.x;
- pt.y += [eventWindow frame].origin.y;
- } else {
- pt = [NSEvent mouseLocation];
- }
- } else {
- pt = [NSEvent mouseLocation];
- }
-
- xe->u.keyButtonPointer.rootX = (int)(pt.x);
-
- if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) {
- // mouse in menu bar - tell X11 that it's just below instead
- xe->u.keyButtonPointer.rootY = aquaMenuBarHeight;
- return NO;
- } else {
- xe->u.keyButtonPointer.rootY =
- NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y);
- return YES;
- }
-}
-
-
-// Make a safe path
-//
-// Return the path in single quotes in case there are problematic characters in it.
-// We still have to worry about there being single quotes in the path. So, replace
-// all instances of the ' character in the path with '\''.
-- (NSString *)makeSafePath:(NSString *)path
-{
- NSMutableString *safePath = [NSMutableString stringWithString:path];
- NSRange aRange = NSMakeRange(0, [safePath length]);
-
- while (aRange.length) {
- aRange = [safePath rangeOfString:@"'" options:0 range:aRange];
- if (!aRange.length)
- break;
- [safePath replaceCharactersInRange:aRange
- withString:@"\'\\'\'"];
- aRange.location += 4;
- aRange.length = [safePath length] - aRange.location;
- }
-
- safePath = [NSMutableString stringWithFormat:@"'%@'", safePath];
-
- return safePath;
-}
-
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
- // Block SIGPIPE
- // SIGPIPE repeatably killed the (rootless) server when closing a
- // dozen xterms in rapid succession. Those SIGPIPEs should have been
- // sent to the X server thread, which ignores them, but somehow they
- // ended up in this thread instead.
- {
- sigset_t set;
- sigemptyset(&set);
- sigaddset(&set, SIGPIPE);
- // pthread_sigmask not implemented yet
- // pthread_sigmask(SIG_BLOCK, &set, NULL);
- sigprocmask(SIG_BLOCK, &set, NULL);
- }
-
- if (quartzRootless == -1) {
- // The display mode was not set from the command line.
- // Show mode pick panel?
- if ([Preferences modeWindow]) {
- if ([Preferences rootless])
- [startRootlessButton setKeyEquivalent:@"\r"];
- else
- [startFullScreenButton setKeyEquivalent:@"\r"];
- [modeWindow makeKeyAndOrderFront:nil];
- } else {
- // Otherwise use default mode
- quartzRootless = [Preferences rootless];
- [self startX];
- }
- } else {
- [self startX];
- }
-}
-
-
-// Load the appropriate display mode bundle
-- (BOOL)loadDisplayBundle
-{
- if (quartzRootless) {
- NSEnumerator *enumerator = [[Preferences displayModeBundles]
- objectEnumerator];
- NSString *bundleName;
-
- while ((bundleName = [enumerator nextObject])) {
- if (QuartzLoadDisplayBundle([bundleName cString]))
- return YES;
- }
-
- return NO;
- } else {
- return QuartzLoadDisplayBundle("fullscreen.bundle");
- }
-}
-
-
-// Start the X server thread and the client process
-- (void)startX
-{
- NSDictionary *appDictionary;
- NSString *appVersion;
-
- [modeWindow close];
-
- // Calculate the height of the menu bar so rootless mode can avoid it
- if (quartzRootless) {
- aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
- NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1;
- aquaMenuBarBox =
- NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1,
- NSWidth([[NSScreen mainScreen] frame]),
- aquaMenuBarHeight);
- }
-
- // Write the XDarwin version to the console log
- appDictionary = [[NSBundle mainBundle] infoDictionary];
- appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"];
- if (appVersion)
- NSLog(@"\n%@", appVersion);
- else
- NSLog(@"No version");
-
- if (![self loadDisplayBundle])
- [NSApp terminate:nil];
-
- if (quartzRootless) {
- // We need to track whether the key window is an X11 window
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(windowBecameKey:)
- name:NSWindowDidBecomeKeyNotification
- object:nil];
-
- // Request notification of screen layout changes even when this
- // is not the active application
- [[NSDistributedNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(applicationDidChangeScreenParameters:)
- name:NSApplicationDidChangeScreenParametersNotification
- object:nil];
- }
-
- // Start the X server thread
- serverState = server_Starting;
- [NSThread detachNewThreadSelector:@selector(run) toTarget:self
- withObject:nil];
-
- // Start the X clients if started from GUI
- if (quartzStartClients) {
- [self startXClients];
- }
-
- if (quartzRootless) {
- // There is no help window for rootless; just start
- [helpWindow close];
- helpWindow = nil;
- } else {
- IONotificationPortRef notify;
- io_object_t anIterator;
-
- // Register for system power notifications
- root_port = IORegisterForSystemPower(0, &notify, powerDidChange,
- &anIterator);
- if (root_port) {
- CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop],
- IONotificationPortGetRunLoopSource(notify),
- kCFRunLoopDefaultMode);
- } else {
- NSLog(@"Failed to register for system power notifications.");
- }
-
- // Show the X switch window if not using dock icon switching
- if (![Preferences dockSwitch])
- [switchWindow orderFront:nil];
-
- if ([Preferences startupHelp]) {
- // display the full screen mode help
- [helpWindow makeKeyAndOrderFront:nil];
- queueShowServer = NO;
- } else {
- // start running full screen and make sure X is visible
- ShowMenuBar();
- [self closeHelpAndShow:nil];
- }
- }
-}
-
-// Finish starting the X server thread
-// This includes anything that must be done after the X server is
-// ready to process events after the first or subsequent generations.
-- (void)finishStartX
-{
- sendServerEvents = YES;
- serverState = server_Running;
-
- if (quartzRootless) {
- [self forceShowServer:[NSApp isActive]];
- } else {
- [self forceShowServer:queueShowServer];
- }
-
- if (quartzServerQuitting) {
- [self quitServer];
- if (pendingAppQuitReply)
- [NSApp replyToApplicationShouldTerminate:YES];
- return;
- }
-
- if (pendingClients) {
- NSEnumerator *enumerator = [pendingClients objectEnumerator];
- NSString *filename;
-
- while ((filename = [enumerator nextObject])) {
- [self runClient:filename];
- }
-
- [pendingClients release];
- pendingClients = nil;
- }
-}
-
-// Start the first X clients in a separate process
-- (BOOL)startXClients
-{
- struct passwd *passwdUser;
- NSString *shellPath, *dashShellName, *commandStr, *startXPath;
- NSString *safeStartXPath;
- NSBundle *thisBundle;
- const char *shellPathStr, *newargv[3], *shellNameStr;
- int fd[2], outFD, length, shellType, i;
-
- // Register to catch the signal when the client processs finishes
- signal(SIGCHLD, childDone);
-
- // Get user's password database entry
- passwdUser = getpwuid(getuid());
-
- // Find the shell to use
- if ([Preferences useDefaultShell])
- shellPath = [NSString stringWithCString:passwdUser->pw_shell];
- else
- shellPath = [Preferences shellString];
-
- dashShellName = [NSString stringWithFormat:@"-%@",
- [shellPath lastPathComponent]];
- shellPathStr = [shellPath cString];
- shellNameStr = [[shellPath lastPathComponent] cString];
-
- if (access(shellPathStr, X_OK)) {
- NSLog(@"Shell %s is not valid!", shellPathStr);
- return NO;
- }
-
- // Find the type of shell
- for (i = 0; shellList[i].name; i++) {
- if (!strcmp(shellNameStr, shellList[i].name))
- break;
- }
- shellType = shellList[i].type;
-
- newargv[0] = [dashShellName cString];
- if (shellType == shell_Bourne) {
- // Bourne shells need to be told they are interactive to make
- // sure they read all their initialization files.
- newargv[1] = "-i";
- newargv[2] = NULL;
- } else {
- newargv[1] = NULL;
- }
-
- // Create a pipe to communicate with the X client process
- NSAssert(pipe(fd) == 0, @"Could not create new pipe.");
-
- // Open a file descriptor for writing to stdout and stderr
- outFD = open("/dev/console", O_WRONLY, 0);
- if (outFD == -1) {
- outFD = open("/dev/null", O_WRONLY, 0);
- NSAssert(outFD != -1, @"Could not open shell output.");
- }
-
- // Fork process to start X clients in user's default shell
- // Sadly we can't use NSTask because we need to start a login shell.
- // Login shells are started by passing "-" as the first character of
- // argument 0. NSTask forces argument 0 to be the shell's name.
- clientPID = vfork();
- if (clientPID == 0) {
-
- // Inside the new process:
- if (fd[0] != STDIN_FILENO) {
- dup2(fd[0], STDIN_FILENO); // Take stdin from pipe
- close(fd[0]);
- }
- close(fd[1]); // Close write end of pipe
- if (outFD == STDOUT_FILENO) { // Setup stdout and stderr
- dup2(outFD, STDERR_FILENO);
- } else if (outFD == STDERR_FILENO) {
- dup2(outFD, STDOUT_FILENO);
- } else {
- dup2(outFD, STDERR_FILENO);
- dup2(outFD, STDOUT_FILENO);
- close(outFD);
- }
-
- // Setup environment
- setenv("HOME", passwdUser->pw_dir, 1);
- setenv("SHELL", shellPathStr, 1);
- setenv("LOGNAME", passwdUser->pw_name, 1);
- setenv("USER", passwdUser->pw_name, 1);
- setenv("TERM", "unknown", 1);
- if (chdir(passwdUser->pw_dir)) // Change to user's home dir
- NSLog(@"Could not change to user's home directory.");
-
- execv(shellPathStr, (char * const *)newargv); // Start user's shell
-
- NSLog(@"Could not start X client process with errno = %i.", errno);
- _exit(127);
- }
-
- // In parent process:
- close(fd[0]); // Close read end of pipe
- close(outFD); // Close output file descriptor
-
- thisBundle = [NSBundle bundleForClass:[self class]];
- startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil];
- if (!startXPath) {
- NSLog(@"Could not find startXClients in application bundle!");
- return NO;
- }
-
- safeStartXPath = [self makeSafePath:startXPath];
-
- if ([Preferences addToPath]) {
- commandStr = [NSString stringWithFormat:@"%@ :%d %@\n",
- safeStartXPath, [Preferences display],
- [Preferences addToPathString]];
- } else {
- commandStr = [NSString stringWithFormat:@"%@ :%d\n",
- safeStartXPath, [Preferences display]];
- }
-
- length = [commandStr cStringLength];
- if (write(fd[1], [commandStr cString], length) != length) {
- NSLog(@"Write to X client process failed.");
- return NO;
- }
-
- // Close the pipe so that shell will terminate when xinit quits
- close(fd[1]);
-
- return YES;
-}
-
-// Start the specified client in its own task
-// FIXME: This should be unified with startXClients
-- (void)runClient:(NSString *)filename
-{
- const char *command = [[self makeSafePath:filename] UTF8String];
- const char *shell;
- const char *argv[5];
- int child1, child2 = 0;
- int status;
-
- shell = getenv("SHELL");
- if (shell == NULL)
- shell = "/bin/bash";
-
- /* At least [ba]sh, [t]csh and zsh all work with this syntax. We
- need to use an interactive shell to force it to load the user's
- environment. */
-
- argv[0] = shell;
- argv[1] = "-i";
- argv[2] = "-c";
- argv[3] = command;
- argv[4] = NULL;
-
- /* Do the fork-twice trick to avoid having to reap zombies */
-
- child1 = fork();
-
- switch (child1) {
- case -1: /* error */
- break;
-
- case 0: /* child1 */
- child2 = fork();
-
- switch (child2) {
- int max_files, i;
- char buf[1024], *tem;
-
- case -1: /* error */
- _exit(1);
-
- case 0: /* child2 */
- /* close all open files except for standard streams */
- max_files = sysconf(_SC_OPEN_MAX);
- for (i = 3; i < max_files; i++)
- close(i);
-
- /* ensure stdin is on /dev/null */
- close(0);
- open("/dev/null", O_RDONLY);
-
- /* cd $HOME */
- tem = getenv("HOME");
- if (tem != NULL)
- chdir(tem);
-
- /* Setup environment */
-// snprintf(buf, sizeof(buf), ":%s", display);
-// setenv("DISPLAY", buf, TRUE);
- tem = getenv("PATH");
- if (tem != NULL && tem[0] != NULL)
- snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", tem);
- else
- snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin");
- setenv("PATH", buf, TRUE);
-
- execvp(argv[0], (char **const) argv);
-
- _exit(2);
-
- default: /* parent (child1) */
- _exit(0);
- }
- break;
-
- default: /* parent */
- waitpid(child1, &status, 0);
- }
-}
-
-// Run the X server thread
-- (void)run
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- [serverLock lock];
- main(argcGlobal, argvGlobal, envpGlobal);
- serverVisible = NO;
- [pool release];
- [serverLock unlock];
- QuartzMessageMainThread(kQuartzServerDied, nil, 0);
-}
-
-// Full screen mode was picked in the mode pick panel
-- (IBAction)startFullScreen:(id)sender
-{
- [Preferences setModeWindow:[startupModeButton intValue]];
- [Preferences saveToDisk];
- quartzRootless = FALSE;
- [self startX];
-}
-
-// Rootless mode was picked in the mode pick panel
-- (IBAction)startRootless:(id)sender
-{
- [Preferences setModeWindow:[startupModeButton intValue]];
- [Preferences saveToDisk];
- quartzRootless = TRUE;
- [self startX];
-}
-
-// Close the help splash screen and show the X server
-- (IBAction)closeHelpAndShow:(id)sender
-{
- if (sender) {
- int helpVal = [startupHelpButton intValue];
- [Preferences setStartupHelp:helpVal];
- [Preferences saveToDisk];
- }
- [helpWindow close];
- helpWindow = nil;
-
- [self forceShowServer:YES];
- [NSApp activateIgnoringOtherApps:YES];
-}
-
-// Show the Aqua-X11 switch panel useful for fullscreen mode
-- (IBAction)showSwitchPanel:(id)sender
-{
- [switchWindow orderFront:nil];
-}
-
-// Show the X server when sent message from GUI
-- (IBAction)showAction:(id)sender
-{
- [self forceShowServer:YES];
-}
-
-// Show or hide the X server or menu bar in rootless mode
-- (void)toggle
-{
- if (quartzRootless) {
-#if 0
- // FIXME: Remove or add option to not dodge menubar
- if (rootlessMenuBarVisible)
- HideMenuBar();
- else
- ShowMenuBar();
- rootlessMenuBarVisible = !rootlessMenuBarVisible;
-#endif
- } else {
- [self showServer:!serverVisible];
- }
-}
-
-// Show or hide the X server on screen
-- (void)showServer:(BOOL)show
-{
- // Do not show or hide multiple times in a row
- if (serverVisible == show)
- return;
-
- if (sendServerEvents) {
- [self sendShowHide:show];
- } else if (serverState == server_Starting) {
- queueShowServer = show;
- }
-}
-
-// Show or hide the X server irregardless of the current state
-- (void)forceShowServer:(BOOL)show
-{
- serverVisible = !show;
- [self showServer:show];
-}
-
-// Tell the X server to show or hide itself.
-// This ignores the current X server visible state.
-//
-// In full screen mode, the order we do things is important and must be
-// preserved between the threads. X drawing operations have to be performed
-// in the X server thread. It appears that we have the additional
-// constraint that we must hide and show the menu bar in the main thread.
-//
-// To show the X server:
-// 1. Capture the displays. (Main thread)
-// 2. Hide the menu bar. (Must be in main thread)
-// 3. Send event to X server thread to redraw X screen.
-// 4. Redraw the X screen. (Must be in X server thread)
-//
-// To hide the X server:
-// 1. Send event to X server thread to stop drawing.
-// 2. Stop drawing to the X screen. (Must be in X server thread)
-// 3. Message main thread that drawing is stopped.
-// 4. If main thread still wants X server hidden:
-// a. Release the displays. (Main thread)
-// b. Unhide the menu bar. (Must be in main thread)
-// Otherwise we have already queued an event to start drawing again.
-//
-- (void)sendShowHide:(BOOL)show
-{
- xEvent xe;
-
- [self getMousePosition:&xe fromEvent:nil];
-
- if (show) {
- if (!quartzRootless) {
- quartzProcs->CaptureScreens();
- HideMenuBar();
- }
- [self activateX11:YES];
-
- // the mouse location will have moved; track it
- xe.u.u.type = MotionNotify;
- [self sendXEvent:&xe];
-
- // inform the X server of the current modifier state
- xe.u.u.type = kXDarwinUpdateModifiers;
- xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags];
- [self sendXEvent:&xe];
-
- // If there is no AppleWM-aware cut and paste manager, do what we can.
- if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) {
- // put the pasteboard into the X cut buffer
- [self readPasteboard];
- }
- } else {
- // If there is no AppleWM-aware cut and paste manager, do what we can.
- if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) {
- // put the X cut buffer on the pasteboard
- [self writePasteboard];
- }
-
- [self activateX11:NO];
- }
-
- serverVisible = show;
-}
-
-// Enable or disable rendering to the X screen
-- (void)setRootClip:(BOOL)enable
-{
- xEvent xe;
-
- xe.u.u.type = kXDarwinSetRootClip;
- xe.u.clientMessage.u.l.longs0 = enable;
- [self sendXEvent:&xe];
-}
-
-// Tell the X server to read from the pasteboard into the X cut buffer
-- (void)readPasteboard
-{
- xEvent xe;
-
- xe.u.u.type = kXDarwinReadPasteboard;
- [self sendXEvent:&xe];
-}
-
-// Tell the X server to write the X cut buffer into the pasteboard
-- (void)writePasteboard
-{
- xEvent xe;
-
- xe.u.u.type = kXDarwinWritePasteboard;
- [self sendXEvent:&xe];
-}
-
-- (void)quitServer
-{
- xEvent xe;
-
- xe.u.u.type = kXDarwinQuit;
- [self sendXEvent:&xe];
-
- // Revert to the Mac OS X arrow cursor. The main thread sets the cursor
- // and it won't be responding to future requests to change it.
- [[NSCursor arrowCursor] set];
-
- serverState = server_Quitting;
-}
-
-- (void)sendXEvent:(xEvent *)xe
-{
- // This field should be filled in for every event
- xe->u.keyButtonPointer.time = GetTimeInMillis();
-
- DarwinEQEnqueue(xe);
-}
-
-// Handle messages from the X server thread
-- (void)handlePortMessage:(NSPortMessage *)portMessage
-{
- unsigned msg = [portMessage msgid];
-
- switch (msg) {
- case kQuartzServerHidden:
- // Make sure the X server wasn't queued to be shown again while
- // the hide was pending.
- if (!quartzRootless && !serverVisible) {
- quartzProcs->ReleaseScreens();
- ShowMenuBar();
- }
- break;
-
- case kQuartzServerStarted:
- [self finishStartX];
- break;
-
- case kQuartzServerDied:
- sendServerEvents = NO;
- serverState = server_Done;
- if (!quartzServerQuitting) {
- [NSApp terminate:nil]; // quit if we aren't already
- }
- break;
-
- case kQuartzCursorUpdate:
- if (quartzProcs->CursorUpdate)
- quartzProcs->CursorUpdate();
- break;
-
- case kQuartzPostEvent:
- {
- const xEvent *xe = [[[portMessage components] lastObject] bytes];
- DarwinEQEnqueue(xe);
- break;
- }
-
- case kQuartzSetWindowMenu:
- {
- NSArray *list;
- [[[portMessage components] lastObject] getBytes:&list];
- [self setX11WindowList:list];
- [list release];
- break;
- }
-
- case kQuartzSetWindowMenuCheck:
- {
- int n;
- [[[portMessage components] lastObject] getBytes:&n];
- [self setX11WindowCheck:[NSNumber numberWithInt:n]];
- break;
- }
-
- case kQuartzSetFrontProcess:
- [NSApp activateIgnoringOtherApps:YES];
- break;
-
- case kQuartzSetCanQuit:
- {
- int n;
- [[[portMessage components] lastObject] getBytes:&n];
- quitWithoutQuery = (BOOL) n;
- break;
- }
-
- default:
- NSLog(@"Unknown message from server thread.");
- }
-}
-
-// Quit the X server when the X client process finishes
-- (void)clientProcessDone:(int)clientStatus
-{
- if (WIFEXITED(clientStatus)) {
- int exitStatus = WEXITSTATUS(clientStatus);
- if (exitStatus != 0)
- NSLog(@"X client process terminated with status %i.", exitStatus);
- } else {
- NSLog(@"X client process terminated abnormally.");
- }
-
- if (!quartzServerQuitting) {
- [NSApp terminate:nil]; // quit if we aren't already
- }
-}
-
-// User selected an X11 window from a menu
-- (IBAction)itemSelected:(id)sender
-{
- xEvent xe;
-
- [NSApp activateIgnoringOtherApps:YES];
-
- // Notify the client of the change through the X server thread
- xe.u.u.type = kXDarwinControllerNotify;
- xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuItem;
- xe.u.clientMessage.u.l.longs1 = [sender tag];
- [self sendXEvent:&xe];
-}
-
-// User selected Next from window menu
-- (IBAction)nextWindow:(id)sender
-{
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMNextWindow);
-}
-
-// User selected Previous from window menu
-- (IBAction)previousWindow:(id)sender
-{
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMPreviousWindow);
-}
-
-/*
- * The XPR implementation handles close, minimize, and zoom actions for X11
- * windows here, while CR handles these in the NSWindow class.
- */
-
-// Handle Close from window menu for X11 window in XPR implementation
-- (IBAction)performClose:(id)sender
-{
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMCloseWindow);
-}
-
-// Handle Minimize from window menu for X11 window in XPR implementation
-- (IBAction)performMiniaturize:(id)sender
-{
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMMinimizeWindow);
-}
-
-// Handle Zoom from window menu for X11 window in XPR implementation
-- (IBAction)performZoom:(id)sender
-{
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMZoomWindow);
-}
-
-// Handle "Bring All to Front" from window menu
-- (IBAction)bringAllToFront:(id)sender
-{
- if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMBringAllToFront);
- } else {
- [NSApp arrangeInFront:nil];
- }
-}
-
-// This ends up at the end of the responder chain.
-- (IBAction)copy:(id)sender
-{
- QuartzMessageServerThread(kXDarwinPasteboardNotify, 1,
- AppleWMCopyToPasteboard);
-}
-
-// Set whether or not X11 is active and should receive all key events
-- (void)activateX11:(BOOL)state
-{
- if (state) {
- QuartzMessageServerThread(kXDarwinActivate, 0);
- }
- else {
- QuartzMessageServerThread(kXDarwinDeactivate, 0);
- }
-
- x11Active = state;
-}
-
-// Some NSWindow became the key window
-- (void)windowBecameKey:(NSNotification *)notification
-{
- NSWindow *window = [notification object];
-
- if (quartzProcs->IsX11Window(window, [window windowNumber])) {
- if (!x11Active)
- [self activateX11:YES];
- } else {
- if (x11Active)
- [self activateX11:NO];
- }
-}
-
-// Set the Apple-WM specifiable part of the window menu
-- (void)setX11WindowList:(NSArray *)list
-{
- NSMenuItem *item;
- int first, count, i;
- xEvent xe;
-
- /* Work backwards so we don't mess up the indices */
- first = [windowMenu indexOfItem:windowSeparator] + 1;
- if (first > 0) {
- count = [windowMenu numberOfItems];
- for (i = count - 1; i >= first; i--)
- [windowMenu removeItemAtIndex:i];
- } else {
- windowSeparator = (NSMenuItem *)[windowMenu addItemWithTitle:@""
- action:nil
- keyEquivalent:@""];
- }
-
- count = [dockMenu numberOfItems];
- for (i = 0; i < count; i++)
- [dockMenu removeItemAtIndex:0];
-
- count = [list count];
-
- for (i = 0; i < count; i++)
- {
- NSString *name, *shortcut;
-
- name = [[list objectAtIndex:i] objectAtIndex:0];
- shortcut = [[list objectAtIndex:i] objectAtIndex:1];
-
- item = (NSMenuItem *)[windowMenu addItemWithTitle:name
- action:@selector(itemSelected:)
- keyEquivalent:shortcut];
- [item setTarget:self];
- [item setTag:i];
- [item setEnabled:YES];
-
- item = (NSMenuItem *)[dockMenu insertItemWithTitle:name
- action:@selector(itemSelected:)
- keyEquivalent:shortcut atIndex:i];
- [item setTarget:self];
- [item setTag:i];
- [item setEnabled:YES];
- }
-
- if (checkedWindowItem >= 0 && checkedWindowItem < count)
- {
- item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem];
- [item setState:NSOnState];
- item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem];
- [item setState:NSOnState];
- }
-
- // Notify the client of the change through the X server thread
- xe.u.u.type = kXDarwinControllerNotify;
- xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuNotify;
- [self sendXEvent:&xe];
-}
-
-// Set the checked item on the Apple-WM specifiable window menu
-- (void)setX11WindowCheck:(NSNumber *)nn
-{
- NSMenuItem *item;
- int first, count;
- int n = [nn intValue];
-
- first = [windowMenu indexOfItem:windowSeparator] + 1;
- count = [windowMenu numberOfItems] - first;
-
- if (checkedWindowItem >= 0 && checkedWindowItem < count)
- {
- item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem];
- [item setState:NSOffState];
- item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem];
- [item setState:NSOffState];
- }
- if (n >= 0 && n < count)
- {
- item = (NSMenuItem *)[windowMenu itemAtIndex:first + n];
- [item setState:NSOnState];
- item = (NSMenuItem *)[dockMenu itemAtIndex:n];
- [item setState:NSOnState];
- }
- checkedWindowItem = n;
-}
-
-// Return whether or not a menu item should be enabled
-- (BOOL)validateMenuItem:(NSMenuItem *)item
-{
- NSMenu *menu = [item menu];
-
- if (menu == windowMenu && [item tag] == 30) {
- // Mode switch panel is for fullscreen only
- return !quartzRootless;
- }
- else if ((menu == windowMenu && [item tag] != 40) || menu == dockMenu) {
- // The special window and dock menu items should not be active unless
- // there is an AppleWM-aware window manager running.
- return (AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0;
- }
- else {
- return TRUE;
- }
-}
-
-/*
- * Application Delegate Methods
- */
-
-- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification
-{
- if (quartzProcs->ScreenChanged)
- quartzProcs->ScreenChanged();
-}
-
-- (void)applicationDidHide:(NSNotification *)aNotification
-{
- if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMHideAll);
- } else {
- if (quartzProcs->HideWindows)
- quartzProcs->HideWindows(YES);
- }
-}
-
-- (void)applicationDidUnhide:(NSNotification *)aNotification
-{
- if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
- QuartzMessageServerThread(kXDarwinControllerNotify, 1,
- AppleWMShowAll);
- } else {
- if (quartzProcs->HideWindows)
- quartzProcs->HideWindows(NO);
- }
-}
-
-// Called when the user clicks the application icon,
-// but not when Cmd-Tab is used.
-// Rootless: Don't switch until applicationWillBecomeActive.
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication
- hasVisibleWindows:(BOOL)flag
-{
- if ([Preferences dockSwitch] && !quartzRootless) {
- [self showServer:YES];
- }
- return NO;
-}
-
-- (void)applicationWillResignActive:(NSNotification *)aNotification
-{
- [self showServer:NO];
-}
-
-- (void)applicationWillBecomeActive:(NSNotification *)aNotification
-{
- if (quartzRootless) {
- [self showServer:YES];
-
- // If there is no AppleWM-aware window manager, we can't allow
- // interleaving of Aqua and X11 windows.
- if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) == 0) {
- [NSApp arrangeInFront:nil];
- }
- }
-}
-
-// Called when the user opens a document type that we claim (ie. an X11 executable).
-- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
-{
- if (serverState == server_Running) {
- [self runClient:filename];
- return YES;
- }
- else if (serverState == server_NotStarted || serverState == server_Starting) {
- if ([filename UTF8String][0] != ':') { // Ignore display names
- if (!pendingClients) {
- pendingClients = [[NSMutableArray alloc] initWithCapacity:1];
- }
- [pendingClients addObject:filename];
- return YES; // Assume it will launch successfully
- }
- return NO;
- }
-
- // If the server is quitting or done,
- // its too late to launch new clients this time.
- return NO;
-}
-
-@end
-
-
-// Send a message to the main thread, which calls handlePortMessage in
-// response. Must only be called from the X server thread because
-// NSPort is not thread safe.
-void QuartzMessageMainThread(unsigned msg, void *data, unsigned length)
-{
- if (length > 0) {
- NSData *eventData = [NSData dataWithBytes:data length:length];
- NSArray *eventArray = [NSArray arrayWithObject:eventData];
- NSPortMessage *newMessage =
- [[NSPortMessage alloc]
- initWithSendPort:signalPort
- receivePort:returnPort components:eventArray];
- [newMessage setMsgid:msg];
- [newMessage sendBeforeDate:[NSDate distantPast]];
- [newMessage release];
- } else {
- [signalMessage setMsgid:msg];
- [signalMessage sendBeforeDate:[NSDate distantPast]];
- }
-}
-
-void
-QuartzSetWindowMenu(int nitems, const char **items,
- const char *shortcuts)
-{
- NSMutableArray *array;
- int i;
-
- array = [[NSMutableArray alloc] initWithCapacity:nitems];
-
- for (i = 0; i < nitems; i++) {
- NSMutableArray *subarray = [NSMutableArray arrayWithCapacity:2];
- NSString *string = [NSString stringWithUTF8String:items[i]];
-
- [subarray addObject:string];
-
- if (shortcuts[i] != 0) {
- NSString *number = [NSString stringWithFormat:@"%d",
- shortcuts[i]];
- [subarray addObject:number];
- } else
- [subarray addObject:@""];
-
- [array addObject:subarray];
- }
-
- /* Send the array of strings over to the main thread. */
- /* Will be released in main thread. */
- QuartzMessageMainThread(kQuartzSetWindowMenu, &array, sizeof(NSArray *));
-}
-
-// Handle SIGCHLD signals
-static void childDone(int sig)
-{
- int clientStatus;
-
- if (clientPID == 0)
- return;
-
- // Make sure it was the client task that finished
- if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) {
- if (WIFSTOPPED(clientStatus))
- return;
- clientPID = 0;
- [oneXServer clientProcessDone:clientStatus];
- }
-}
-
-static void powerDidChange(
- void *x,
- io_service_t y,
- natural_t messageType,
- void *messageArgument)
-{
- switch (messageType) {
- case kIOMessageSystemWillSleep:
- if (!quartzRootless) {
- [oneXServer setRootClip:FALSE];
- }
- IOAllowPowerChange(root_port, (long)messageArgument);
- break;
- case kIOMessageCanSystemSleep:
- IOAllowPowerChange(root_port, (long)messageArgument);
- break;
- case kIOMessageSystemHasPoweredOn:
- if (!quartzRootless) {
- [oneXServer setRootClip:TRUE];
- }
- break;
- }
-
-}
diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m
deleted file mode 100644
index 8379f9476..000000000
--- a/hw/darwin/quartz/cr/XView.m
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * NSView subclass for Mac OS X rootless X server
- *
- * Each rootless window contains an instance of this class.
- * This class handles events while drawing is handled by Carbon
- * code in the rootless Aqua implementation.
- *
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#import "XView.h"
-
-@implementation XView
-
-- (BOOL)isFlipped
-{
- return NO;
-}
-
-- (BOOL)isOpaque
-{
- return YES;
-}
-
-- (BOOL)acceptsFirstResponder
-{
- return YES;
-}
-
-- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
-{
- return YES;
-}
-
-- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent
-{
- return YES;
-}
-
-- (void)mouseDown:(NSEvent *)anEvent
-{
- // Only X is allowed to restack windows.
- [NSApp preventWindowOrdering];
- if (! [NSApp isActive]) {
- [NSApp activateIgnoringOtherApps:YES];
- }
- [[self nextResponder] mouseDown:anEvent];
-}
-
-@end
diff --git a/hw/darwin/quartz/cr/cr.h b/hw/darwin/quartz/cr/cr.h
deleted file mode 100644
index d6779ae7d..000000000
--- a/hw/darwin/quartz/cr/cr.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Internal definitions of the Cocoa rootless implementation
- */
-/*
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _CR_H
-#define _CR_H
-
-#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
-#import "XView.h"
-#else
-typedef struct OpaqueNSWindow NSWindow;
-typedef struct OpaqueXView XView;
-#endif
-
-#undef BOOL
-#define BOOL xBOOL
-#include "screenint.h"
-#include "window.h"
-#undef BOOL
-
-// Predefined style for the window which is about to be framed
-extern WindowPtr nextWindowToFrame;
-extern unsigned int nextWindowStyle;
-
-typedef struct {
- NSWindow *window;
- XView *view;
- GrafPtr port;
- CGContextRef context;
-} CRWindowRec, *CRWindowPtr;
-
-Bool CRInit(ScreenPtr pScreen);
-void CRAppleWMInit(void);
-
-#endif /* _CR_H */
diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m
deleted file mode 100644
index a0259c3f8..000000000
--- a/hw/darwin/quartz/cr/crAppleWM.m
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Cocoa rootless implementation functions for AppleWM extension
- *
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "quartz/quartzCommon.h"
-#include "quartz/cr/cr.h"
-
-#undef BOOL
-#define BOOL xBOOL
-#include "rootless.h"
-#include "X11/X.h"
-#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
-#include "quartz/applewmExt.h"
-#undef BOOL
-
-#define StdDocumentStyleMask (NSTitledWindowMask | \
- NSClosableWindowMask | \
- NSMiniaturizableWindowMask | \
- NSResizableWindowMask)
-
-static int
-CRDisableUpdate(void)
-{
- return Success;
-}
-
-
-static int
-CREnableUpdate(void)
-{
- return Success;
-}
-
-
-static int CRSetWindowLevel(
- WindowPtr pWin,
- int level)
-{
- CRWindowPtr crWinPtr;
-
- crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE);
- if (crWinPtr == 0)
- return BadWindow;
-
- RootlessStopDrawing(pWin, FALSE);
-
- [crWinPtr->window setLevel:level];
-
- return Success;
-}
-
-
-static int CRFrameGetRect(
- int type,
- int class,
- const BoxRec *outer,
- const BoxRec *inner,
- BoxRec *ret)
-{
- return Success;
-}
-
-
-static int CRFrameHitTest(
- int class,
- int x,
- int y,
- const BoxRec *outer,
- const BoxRec *inner,
- int *ret)
-{
- return 0;
-}
-
-
-static int CRFrameDraw(
- WindowPtr pWin,
- int class,
- unsigned int attr,
- const BoxRec *outer,
- const BoxRec *inner,
- unsigned int title_len,
- const unsigned char *title_bytes)
-{
- CRWindowPtr crWinPtr;
- NSWindow *window;
- Bool hasResizeIndicator;
-
- /* We assume the window has not yet been framed so
- RootlessFrameForWindow() will cause it to be. Record the window
- style so that the appropriate one will be used when it is framed.
- If the window is already framed, we can't change the window
- style and the following will have no effect. */
-
- nextWindowToFrame = pWin;
- if (class == AppleWMFrameClassDocument)
- nextWindowStyle = StdDocumentStyleMask;
- else
- nextWindowStyle = NSBorderlessWindowMask;
-
- crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE);
- if (crWinPtr == 0)
- return BadWindow;
-
- window = crWinPtr->window;
-
- [window setTitle:[NSString stringWithCString:title_bytes
- length:title_len]];
-
- hasResizeIndicator = (attr & AppleWMFrameGrowBox) ? YES : NO;
- [window setShowsResizeIndicator:hasResizeIndicator];
-
- return Success;
-}
-
-
-static AppleWMProcsRec crAppleWMProcs = {
- CRDisableUpdate,
- CREnableUpdate,
- CRSetWindowLevel,
- CRFrameGetRect,
- CRFrameHitTest,
- CRFrameDraw
-};
-
-
-void CRAppleWMInit(void)
-{
- AppleWMExtensionInit(&crAppleWMProcs);
-}
diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m
deleted file mode 100644
index 79697fbac..000000000
--- a/hw/darwin/quartz/cr/crFrame.m
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * Cocoa rootless implementation frame functions
- *
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "quartz/quartzCommon.h"
-#include "quartz/cr/cr.h"
-
-#undef BOOL
-#define BOOL xBOOL
-#include "rootless.h"
-#include "quartz/applewmExt.h"
-#include "windowstr.h"
-#undef BOOL
-
-WindowPtr nextWindowToFrame = NULL;
-unsigned int nextWindowStyle = 0;
-
-static void CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape);
-
-
-/*
- * CRCreateFrame
- * Create a new physical window.
- * Rootless windows must not autodisplay! Autodisplay can cause a deadlock.
- * Event thread - autodisplay: locks view hierarchy, then window
- * X Server thread - window resize: locks window, then view hierarchy
- * Deadlock occurs if each thread gets one lock and waits for the other.
- */
-static Bool
-CRCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
- int newX, int newY, RegionPtr pShape)
-{
- CRWindowPtr crWinPtr;
- NSRect bounds;
- NSWindow *theWindow;
- XView *theView;
- unsigned int theStyleMask = NSBorderlessWindowMask;
-
- crWinPtr = (CRWindowPtr) xalloc(sizeof(CRWindowRec));
-
- bounds = NSMakeRect(newX,
- NSHeight([[NSScreen mainScreen] frame]) -
- newY - pFrame->height,
- pFrame->width, pFrame->height);
-
- // Check if AppleWM has specified a style for this window
- if (pFrame->win == nextWindowToFrame) {
- theStyleMask = nextWindowStyle;
- }
- nextWindowToFrame = NULL;
-
- // Create an NSWindow for the new X11 window
- theWindow = [[NSWindow alloc] initWithContentRect:bounds
- styleMask:theStyleMask
- backing:NSBackingStoreBuffered
-#ifdef DEFER_NSWINDOW
- defer:YES];
-#else
- defer:NO];
-#endif
-
- if (!theWindow) return FALSE;
-
- [theWindow setBackgroundColor:[NSColor clearColor]]; // erase transparent
- [theWindow setAlphaValue:1.0]; // draw opaque
- [theWindow setOpaque:YES]; // changed when window is shaped
-
- [theWindow useOptimizedDrawing:YES]; // Has no overlapping sub-views
- [theWindow setAutodisplay:NO]; // See comment above
- [theWindow disableFlushWindow]; // We do all the flushing manually
- [theWindow setHasShadow:YES]; // All windows have shadows
- [theWindow setReleasedWhenClosed:YES]; // Default, but we want to be sure
-
- theView = [[XView alloc] initWithFrame:bounds];
- [theWindow setContentView:theView];
- [theWindow setInitialFirstResponder:theView];
-
-#ifdef DEFER_NSWINDOW
- // We need the NSWindow to actually be created now.
- // If we had to defer creating it, we have to order it
- // onto the screen to force it to be created.
-
- if (pFrame->win->prevSib) {
- CRWindowPtr crWinPtr = (CRWindowPtr) RootlessFrameForWindow(
- pFrame->win->prevSib, FALSE);
- int upperNum = [crWinPtr->window windowNumber];
- [theWindow orderWindow:NSWindowBelow relativeTo:upperNum];
- } else {
- [theWindow orderFront:nil];
- }
-#endif
-
- [theWindow setAcceptsMouseMovedEvents:YES];
-
- crWinPtr->window = theWindow;
- crWinPtr->view = theView;
-
- [theView lockFocus];
- // Fill the window with white to make sure alpha channel is set
- NSEraseRect(bounds);
- crWinPtr->port = [theView qdPort];
- crWinPtr->context = [[NSGraphicsContext currentContext] graphicsPort];
- // CreateCGContextForPort(crWinPtr->port, &crWinPtr->context);
- [theView unlockFocus];
-
- // Store the implementation private frame ID
- pFrame->wid = (RootlessFrameID) crWinPtr;
-
- // Reshape the frame if it was created shaped.
- if (pShape != NULL)
- CRReshapeFrame(pFrame->wid, pShape);
-
- return TRUE;
-}
-
-
-/*
- * CRDestroyFrame
- * Destroy a frame.
- */
-static void
-CRDestroyFrame(RootlessFrameID wid)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
-
- [crWinPtr->window orderOut:nil];
- [crWinPtr->window close];
- [crWinPtr->view release];
- free(crWinPtr);
-}
-
-
-/*
- * CRMoveFrame
- * Move a frame on screen.
- */
-static void
-CRMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- NSPoint topLeft;
-
- topLeft = NSMakePoint(newX,
- NSHeight([[NSScreen mainScreen] frame]) - newY);
-
- [crWinPtr->window setFrameTopLeftPoint:topLeft];
-}
-
-
-/*
- * CRResizeFrame
- * Move and resize a frame.
- */
-static void
-CRResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
- int newX, int newY, unsigned int newW, unsigned int newH,
- unsigned int gravity)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- NSRect bounds = NSMakeRect(newX, NSHeight([[NSScreen mainScreen] frame]) -
- newY - newH, newW, newH);
-
- [crWinPtr->window setFrame:bounds display:NO];
-}
-
-
-/*
- * CRRestackFrame
- * Change the frame order. Put the frame behind nextWid or on top if
- * it is NULL. Unmapped frames are mapped by restacking them.
- */
-static void
-CRRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- CRWindowPtr crNextWinPtr = (CRWindowPtr) nextWid;
-
- if (crNextWinPtr) {
- int upperNum = [crNextWinPtr->window windowNumber];
-
- [crWinPtr->window orderWindow:NSWindowBelow relativeTo:upperNum];
- } else {
- [crWinPtr->window makeKeyAndOrderFront:nil];
- }
-}
-
-
-/*
- * CRReshapeFrame
- * Set the shape of a frame.
- */
-static void
-CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- NSRect bounds = [crWinPtr->view frame];
- int winHeight = NSHeight(bounds);
- BoxRec localBox = {0, 0, NSWidth(bounds), winHeight};
-
- [crWinPtr->view lockFocus];
-
- if (pShape != NULL) {
- // Calculate the region outside the new shape.
- miInverse(pShape, pShape, &localBox);
- }
-
- // If window is currently shaped we need to undo the previous shape.
- if (![crWinPtr->window isOpaque]) {
- [[NSColor whiteColor] set];
- NSRectFillUsingOperation(bounds, NSCompositeDestinationAtop);
- }
-
- if (pShape != NULL) {
- int count = REGION_NUM_RECTS(pShape);
- BoxRec *extRects = REGION_RECTS(pShape);
- BoxRec *rects, *end;
-
- // Make transparent if window is now shaped.
- [crWinPtr->window setOpaque:NO];
-
- // Clear the areas outside the window shape
- [[NSColor clearColor] set];
- for (rects = extRects, end = extRects+count; rects < end; rects++) {
- int rectHeight = rects->y2 - rects->y1;
- NSRectFill( NSMakeRect(rects->x1,
- winHeight - rects->y1 - rectHeight,
- rects->x2 - rects->x1, rectHeight) );
- }
- [[NSGraphicsContext currentContext] flushGraphics];
-
- // force update of window shadow
- [crWinPtr->window setHasShadow:NO];
- [crWinPtr->window setHasShadow:YES];
-
- } else {
- [crWinPtr->window setOpaque:YES];
- [[NSGraphicsContext currentContext] flushGraphics];
- }
-
- [crWinPtr->view unlockFocus];
-}
-
-
-/*
- * CRUnmapFrame
- * Unmap a frame.
- */
-static void
-CRUnmapFrame(RootlessFrameID wid)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
-
- [crWinPtr->window orderOut:nil];
-}
-
-
-/*
- * CRStartDrawing
- * When a window's buffer is not being drawn to, the CoreGraphics
- * window server may compress or move it. Call this routine
- * to lock down the buffer during direct drawing. It returns
- * a pointer to the backing buffer.
- */
-static void
-CRStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- PixMapHandle pix;
-
- [crWinPtr->view lockFocus];
- crWinPtr->port = [crWinPtr->view qdPort];
- LockPortBits(crWinPtr->port);
- [crWinPtr->view unlockFocus];
- pix = GetPortPixMap(crWinPtr->port);
-
- *pixelData = GetPixBaseAddr(pix);
- *bytesPerRow = GetPixRowBytes(pix) & 0x3fff; // fixme is mask needed?
-}
-
-
-/*
- * CRStopDrawing
- * When direct access to a window's buffer is no longer needed, this
- * routine should be called to allow CoreGraphics to compress or
- * move it.
- */
-static void
-CRStopDrawing(RootlessFrameID wid, Bool flush)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
-
- UnlockPortBits(crWinPtr->port);
-
- if (flush) {
- QDFlushPortBuffer(crWinPtr->port, NULL);
- }
-}
-
-
-/*
- * CRUpdateRegion
- * Flush a region from a window's backing buffer to the screen.
- */
-static void
-CRUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
-
-#ifdef ROOTLESS_TRACK_DAMAGE
- int count = REGION_NUM_RECTS(pDamage);
- BoxRec *rects = REGION_RECTS(pDamage);
- BoxRec *end;
-
- static RgnHandle rgn = NULL;
- static RgnHandle box = NULL;
-
- if (!rgn) rgn = NewRgn();
- if (!box) box = NewRgn();
-
- for (end = rects+count; rects < end; rects++) {
- Rect qdRect;
- qdRect.left = rects->x1;
- qdRect.top = rects->y1;
- qdRect.right = rects->x2;
- qdRect.bottom = rects->y2;
-
- RectRgn(box, &qdRect);
- UnionRgn(rgn, box, rgn);
- }
-
- QDFlushPortBuffer(crWinPtr->port, rgn);
-
- SetEmptyRgn(rgn);
- SetEmptyRgn(box);
-
-#else /* !ROOTLESS_TRACK_DAMAGE */
- QDFlushPortBuffer(crWinPtr->port, NULL);
-#endif
-}
-
-
-/*
- * CRDamageRects
- * Mark damaged rectangles as requiring redisplay to screen.
- */
-static void
-CRDamageRects(RootlessFrameID wid, int count, const BoxRec *rects,
- int shift_x, int shift_y)
-{
- CRWindowPtr crWinPtr = (CRWindowPtr) wid;
- const BoxRec *end;
-
- for (end = rects + count; rects < end; rects++) {
- Rect qdRect;
- qdRect.left = rects->x1 + shift_x;
- qdRect.top = rects->y1 + shift_y;
- qdRect.right = rects->x2 + shift_x;
- qdRect.bottom = rects->y2 + shift_y;
-
- QDAddRectToDirtyRegion(crWinPtr->port, &qdRect);
- }
-}
-
-
-/*
- * Called to check if the frame should be reordered when it is restacked.
- */
-Bool CRDoReorderWindow(RootlessWindowPtr pFrame)
-{
- WindowPtr pWin = pFrame->win;
-
- return AppleWMDoReorderWindow(pWin);
-}
-
-
-static RootlessFrameProcsRec CRRootlessProcs = {
- CRCreateFrame,
- CRDestroyFrame,
- CRMoveFrame,
- CRResizeFrame,
- CRRestackFrame,
- CRReshapeFrame,
- CRUnmapFrame,
- CRStartDrawing,
- CRStopDrawing,
- CRUpdateRegion,
- CRDamageRects,
- NULL,
- CRDoReorderWindow,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-
-/*
- * Initialize CR implementation
- */
-Bool
-CRInit(ScreenPtr pScreen)
-{
- RootlessInit(pScreen, &CRRootlessProcs);
-
- rootless_CopyBytes_threshold = 0;
- rootless_FillBytes_threshold = 0;
- rootless_CompositePixels_threshold = 0;
- rootless_CopyWindow_threshold = 0;
-
- return TRUE;
-}
diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m
deleted file mode 100644
index 504e7b37a..000000000
--- a/hw/darwin/quartz/cr/crScreen.m
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * Cocoa rootless implementation initialization
- *
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "quartz/quartzCommon.h"
-#include "quartz/cr/cr.h"
-
-#undef BOOL
-#define BOOL xBOOL
-#include "darwin.h"
-#include "quartz/quartz.h"
-#include "quartz/quartzCursor.h"
-#include "rootless.h"
-#include "safeAlpha/safeAlpha.h"
-#include "quartz/pseudoramiX.h"
-#include "quartz/applewmExt.h"
-
-#include "regionstr.h"
-#include "scrnintstr.h"
-#include "picturestr.h"
-#include "globals.h"
-#ifdef DAMAGE
-# include "damage.h"
-#endif
-#undef BOOL
-
-// Name of GLX bundle using AGL framework
-static const char *crOpenGLBundle = "glxAGL.bundle";
-
-static Class classXView = nil;
-
-
-/*
- * CRDisplayInit
- * Find all screens.
- *
- * Multihead note: When rootless mode uses PseudoramiX, the
- * X server only sees one screen; only PseudoramiX itself knows
- * about all of the screens.
- */
-static void
-CRDisplayInit(void)
-{
- ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n");
-
- if (noPseudoramiXExtension) {
- darwinScreensFound = [[NSScreen screens] count];
- } else {
- darwinScreensFound = 1; // only PseudoramiX knows about the rest
- }
-
- CRAppleWMInit();
-}
-
-
-/*
- * CRAddPseudoramiXScreens
- * Add a single virtual screen encompassing all the physical screens
- * with PseudoramiX.
- */
-static void
-CRAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
-{
- int i;
- NSRect unionRect = NSMakeRect(0, 0, 0, 0);
- NSArray *screens = [NSScreen screens];
-
- // Get the union of all screens (minus the menu bar on main screen)
- for (i = 0; i < [screens count]; i++) {
- NSScreen *screen = [screens objectAtIndex:i];
- NSRect frame = [screen frame];
- frame.origin.y = [[NSScreen mainScreen] frame].size.height -
- frame.size.height - frame.origin.y;
- if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) {
- frame.origin.y += aquaMenuBarHeight;
- frame.size.height -= aquaMenuBarHeight;
- }
- unionRect = NSUnionRect(unionRect, frame);
- }
-
- // Use unionRect as the screen size for the X server.
- *x = unionRect.origin.x;
- *y = unionRect.origin.y;
- *width = unionRect.size.width;
- *height = unionRect.size.height;
-
- // Tell PseudoramiX about the real screens.
- // InitOutput() will move the big screen to (0,0),
- // so compensate for that here.
- for (i = 0; i < [screens count]; i++) {
- NSScreen *screen = [screens objectAtIndex:i];
- NSRect frame = [screen frame];
- int j;
-
- // Skip this screen if it's a mirrored copy of an earlier screen.
- for (j = 0; j < i; j++) {
- if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) {
- ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n",
- i, j);
- break;
- }
- }
- if (j < i) continue; // this screen is a mirrored copy
-
- frame.origin.y = [[NSScreen mainScreen] frame].size.height -
- frame.size.height - frame.origin.y;
-
- if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) {
- frame.origin.y += aquaMenuBarHeight;
- frame.size.height -= aquaMenuBarHeight;
- }
-
- ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
- (int)frame.size.width, (int)frame.size.height,
- (int)frame.origin.x, (int)frame.origin.y);
-
- frame.origin.x -= unionRect.origin.x;
- frame.origin.y -= unionRect.origin.y;
-
- ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
- i, (int)frame.origin.x, (int)frame.origin.y);
-
- PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
- frame.size.width, frame.size.height);
- }
-}
-
-
-/*
- * CRScreenParams
- * Set the basic screen parameters.
- */
-static void
-CRScreenParams(int index, DarwinFramebufferPtr dfb)
-{
- dfb->bitsPerComponent = CGDisplayBitsPerSample(kCGDirectMainDisplay);
- dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
- dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent;
-
- if (noPseudoramiXExtension) {
- NSScreen *screen = [[NSScreen screens] objectAtIndex:index];
- NSRect frame = [screen frame];
-
- // set x, y so (0,0) is top left of main screen
- dfb->x = NSMinX(frame);
- dfb->y = NSHeight([[NSScreen mainScreen] frame]) -
- NSHeight(frame) - NSMinY(frame);
-
- dfb->width = NSWidth(frame);
- dfb->height = NSHeight(frame);
-
- // Shift the usable part of main screen down to avoid the menu bar.
- if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) {
- dfb->y += aquaMenuBarHeight;
- dfb->height -= aquaMenuBarHeight;
- }
-
- } else {
- CRAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height);
- }
-}
-
-
-/*
- * CRAddScreen
- * Init the framebuffer and record pixmap parameters for the screen.
- */
-static Bool
-CRAddScreen(int index, ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen);
- CGRect cgRect;
- CGDisplayCount numDisplays;
- CGDisplayCount allocatedDisplays = 0;
- CGDirectDisplayID *displays = NULL;
- CGDisplayErr cgErr;
-
- CRScreenParams(index, dfb);
-
- dfb->colorType = TrueColor;
-
- /* Passing zero width (pitch) makes miCreateScreenResources set the
- screen pixmap to the framebuffer pointer, i.e. NULL. The generic
- rootless code takes care of making this work. */
- dfb->pitch = 0;
- dfb->framebuffer = NULL;
-
- // Get all CoreGraphics displays covered by this X11 display.
- cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height);
- do {
- cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays);
- if (cgErr) break;
- allocatedDisplays = numDisplays;
- displays = xrealloc(displays,
- numDisplays * sizeof(CGDirectDisplayID));
- cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays,
- &numDisplays);
- if (cgErr != CGDisplayNoErr) break;
- } while (numDisplays > allocatedDisplays);
-
- if (cgErr != CGDisplayNoErr || numDisplays == 0) {
- ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n",
- index, dfb->width, dfb->height, dfb->x, dfb->y);
- return FALSE;
- }
-
- // This X11 screen covers all CoreGraphics displays we just found.
- // If there's more than one CG display, then video mirroring is on
- // or PseudoramiX is on.
- displayInfo->displayCount = allocatedDisplays;
- displayInfo->displayIDs = displays;
-
- return TRUE;
-}
-
-
-/*
- * CRSetupScreen
- * Setup the screen for rootless access.
- */
-static Bool
-CRSetupScreen(int index, ScreenPtr pScreen)
-{
- // Add alpha protecting replacements for fb screen functions
- pScreen->PaintWindowBackground = SafeAlphaPaintWindow;
- pScreen->PaintWindowBorder = SafeAlphaPaintWindow;
-
-#ifdef RENDER
- {
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- ps->Composite = SafeAlphaComposite;
- }
-#endif /* RENDER */
-
- // Initialize accelerated rootless drawing
- // Note that this must be done before DamageSetup().
- RootlessAccelInit(pScreen);
-
-#ifdef DAMAGE
- // The Damage extension needs to wrap underneath the
- // generic rootless layer, so do it now.
- if (!DamageSetup(pScreen))
- return FALSE;
-#endif
-
- // Initialize generic rootless code
- return CRInit(pScreen);
-}
-
-
-/*
- * CRScreenChanged
- * Configuration of displays has changed.
- */
-static void
-CRScreenChanged(void)
-{
- QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
-}
-
-
-/*
- * CRUpdateScreen
- * Update screen after configuation change.
- */
-static void
-CRUpdateScreen(ScreenPtr pScreen)
-{
- rootlessGlobalOffsetX = darwinMainScreenX;
- rootlessGlobalOffsetY = darwinMainScreenY;
-
- AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]);
-
- RootlessRepositionWindows(pScreen);
- RootlessUpdateScreenPixmap(pScreen);
-}
-
-
-/*
- * CRInitInput
- * Finalize CR specific setup.
- */
-static void
-CRInitInput(int argc, char **argv)
-{
- int i;
-
- rootlessGlobalOffsetX = darwinMainScreenX;
- rootlessGlobalOffsetY = darwinMainScreenY;
-
- for (i = 0; i < screenInfo.numScreens; i++)
- AppleWMSetScreenOrigin(WindowTable[i]);
-}
-
-
-/*
- * CRIsX11Window
- * Returns TRUE if cr is displaying this window.
- */
-static Bool
-CRIsX11Window(void *nsWindow, int windowNumber)
-{
- NSWindow *theWindow = nsWindow;
-
- if (!theWindow)
- return FALSE;
-
- if ([[theWindow contentView] isKindOfClass:classXView])
- return TRUE;
- else
- return FALSE;
-}
-
-
-/*
- * Quartz display mode function list.
- */
-static QuartzModeProcsRec crModeProcs = {
- CRDisplayInit,
- CRAddScreen,
- CRSetupScreen,
- CRInitInput,
- QuartzInitCursor,
- QuartzReallySetCursor,
- QuartzSuspendXCursor,
- QuartzResumeXCursor,
- NULL, // No capture or release in rootless mode
- NULL,
- CRScreenChanged,
- CRAddPseudoramiXScreens,
- CRUpdateScreen,
- CRIsX11Window,
- NULL, // Cocoa NSWindows hide themselves
- RootlessFrameForWindow,
- TopLevelParent,
- NULL, // No support for DRI surfaces
- NULL
-};
-
-
-/*
- * QuartzModeBundleInit
- * Initialize the display mode bundle after loading.
- */
-Bool
-QuartzModeBundleInit(void)
-{
- quartzProcs = &crModeProcs;
- quartzOpenGLBundle = crOpenGLBundle;
- classXView = [XView class];
- return TRUE;
-}
diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c
deleted file mode 100644
index 2021ea2d3..000000000
--- a/hw/darwin/quartz/fullscreen/fullscreen.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * Screen routines for full screen Quartz mode
- *
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * TORREY T. LYONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "quartz/quartzCommon.h"
-#include "darwin.h"
-#include "quartz/quartz.h"
-#include "quartz/quartzCursor.h"
-#include "colormapst.h"
-#include "scrnintstr.h"
-#include "micmap.h"
-#include "shadow.h"
-
-// Full screen specific per screen storage structure
-typedef struct {
- CGDirectDisplayID displayID;
- CFDictionaryRef xDisplayMode;
- CFDictionaryRef aquaDisplayMode;
- CGDirectPaletteRef xPalette;
- CGDirectPaletteRef aquaPalette;
- unsigned char *framebuffer;
- unsigned char *shadowPtr;
-} FSScreenRec, *FSScreenPtr;
-
-#define FULLSCREEN_PRIV(pScreen) \
- ((FSScreenPtr)pScreen->devPrivates[fsScreenIndex].ptr)
-
-static int fsScreenIndex;
-static CGDirectDisplayID *quartzDisplayList = NULL;
-static int quartzNumScreens = 0;
-static FSScreenPtr quartzScreens[MAXSCREENS];
-
-static int darwinCmapPrivateIndex = -1;
-static unsigned long darwinCmapGeneration = 0;
-
-#define CMAP_PRIV(pCmap) \
- ((CGDirectPaletteRef) (pCmap)->devPrivates[darwinCmapPrivateIndex].ptr)
-
-/*
- =============================================================================
-
- Colormap handling
-
- =============================================================================
-*/
-
-/*
- * FSInitCmapPrivates
- * Colormap privates may be allocated after the default colormap has
- * already been created for some screens. This initialization procedure
- * is called for each default colormap that is found.
- */
-static Bool
-FSInitCmapPrivates(
- ColormapPtr pCmap)
-{
- return TRUE;
-}
-
-
-/*
- * FSCreateColormap
- * This is a callback from X after a new colormap is created.
- * We allocate a new CoreGraphics pallete for each colormap.
- */
-static Bool
-FSCreateColormap(
- ColormapPtr pCmap)
-{
- CGDirectPaletteRef pallete;
-
- // Allocate private storage for the hardware dependent colormap info.
- if (darwinCmapGeneration != serverGeneration) {
- if ((darwinCmapPrivateIndex =
- AllocateColormapPrivateIndex(FSInitCmapPrivates)) < 0)
- {
- return FALSE;
- }
- darwinCmapGeneration = serverGeneration;
- }
-
- pallete = CGPaletteCreateDefaultColorPalette();
- if (!pallete) return FALSE;
-
- CMAP_PRIV(pCmap) = pallete;
- return TRUE;
-}
-
-
-/*
- * FSDestroyColormap
- * This is called by DIX FreeColormap after it has uninstalled a colormap
- * and notified all interested parties. We deallocated the corresponding
- * CoreGraphics pallete.
- */
-static void
-FSDestroyColormap(
- ColormapPtr pCmap)
-{
- CGPaletteRelease( CMAP_PRIV(pCmap) );
-}
-
-
-/*
- * FSInstallColormap
- * Set the current CoreGraphics pallete to the pallete corresponding
- * to the provided colormap.
- */
-static void
-FSInstallColormap(
- ColormapPtr pCmap)
-{
- CGDirectPaletteRef palette = CMAP_PRIV(pCmap);
- ScreenPtr pScreen = pCmap->pScreen;
- FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen);
-
- // Inform all interested parties that the map is being changed.
- miInstallColormap(pCmap);
-
- if (quartzServerVisible)
- CGDisplaySetPalette(fsDisplayInfo->displayID, palette);
-
- fsDisplayInfo->xPalette = palette;
-}
-
-
-/*
- * FSStoreColors
- * This is a callback from X to change the hardware colormap
- * when using PsuedoColor in full screen mode.
- */
-static void
-FSStoreColors(
- ColormapPtr pCmap,
- int numEntries,
- xColorItem *pdefs)
-{
- CGDirectPaletteRef palette = CMAP_PRIV(pCmap);
- ScreenPtr pScreen = pCmap->pScreen;
- FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen);
- CGDeviceColor color;
- int i;
-
- if (! palette)
- return;
-
- for (i = 0; i < numEntries; i++) {
- color.red = pdefs[i].red / 65535.0;
- color.green = pdefs[i].green / 65535.0;
- color.blue = pdefs[i].blue / 65535.0;
- CGPaletteSetColorAtIndex(palette, color, pdefs[i].pixel);
- }
-
- // Update hardware colormap
- if (quartzServerVisible)
- CGDisplaySetPalette(fsDisplayInfo->displayID, palette);
-}
-
-
-/*
- =============================================================================
-
- Switching between Aqua and X
-
- =============================================================================
-*/
-
-/*
- * FSCapture
- * Capture the screen so we can draw. Called directly from the main thread
- * to synchronize with hiding the menubar.
- */
-static void FSCapture(void)
-{
- int i;
-
- if (quartzRootless) return;
-
- for (i = 0; i < quartzNumScreens; i++) {
- FSScreenPtr fsDisplayInfo = quartzScreens[i];
- CGDirectDisplayID cgID = fsDisplayInfo->displayID;
-
- if (!CGDisplayIsCaptured(cgID)) {
- CGDisplayCapture(cgID);
- fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID);
- if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode)
- CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode);
- if (fsDisplayInfo->xPalette)
- CGDisplaySetPalette(cgID, fsDisplayInfo->xPalette);
- }
- }
-}
-
-
-/*
- * FSRelease
- * Release the screen so others can draw.
- */
-static void FSRelease(void)
-{
- int i;
-
- if (quartzRootless) return;
-
- for (i = 0; i < quartzNumScreens; i++) {
- FSScreenPtr fsDisplayInfo = quartzScreens[i];
- CGDirectDisplayID cgID = fsDisplayInfo->displayID;
-
- if (CGDisplayIsCaptured(cgID)) {
- if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode)
- CGDisplaySwitchToMode(cgID, fsDisplayInfo->aquaDisplayMode);
- if (fsDisplayInfo->aquaPalette)
- CGDisplaySetPalette(cgID, fsDisplayInfo->aquaPalette);
- CGDisplayRelease(cgID);
- }
- }
-}
-
-
-/*
- * FSSuspendScreen
- * Suspend X11 cursor and drawing to the screen.
- */
-static void FSSuspendScreen(
- ScreenPtr pScreen)
-{
- QuartzSuspendXCursor(pScreen);
- xf86SetRootClip(pScreen, FALSE);
-}
-
-
-/*
- * FSResumeScreen
- * Resume X11 cursor and drawing to the screen.
- */
-static void FSResumeScreen(
- ScreenPtr pScreen,
- int x, // cursor location
- int y )
-{
- QuartzResumeXCursor(pScreen, x, y);
- xf86SetRootClip(pScreen, TRUE);
-}
-
-
-/*
- =============================================================================
-
- Screen initialization
-
- =============================================================================
-*/
-
-/*
- * FSDisplayInit
- * Full screen specific initialization called from InitOutput.
- */
-static void FSDisplayInit(void)
-{
- static unsigned long generation = 0;
- CGDisplayCount quartzDisplayCount = 0;
-
- ErrorF("Display mode: Full screen Quartz -- Direct Display\n");
-
- // Allocate private storage for each screen's mode specific info
- if (generation != serverGeneration) {
- fsScreenIndex = AllocateScreenPrivateIndex();
- generation = serverGeneration;
- }
-
- // Find all the CoreGraphics displays
- CGGetActiveDisplayList(0, NULL, &quartzDisplayCount);
- quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID));
- CGGetActiveDisplayList(quartzDisplayCount, quartzDisplayList,
- &quartzDisplayCount);
-
- darwinScreensFound = quartzDisplayCount;
- atexit(FSRelease);
-}
-
-
-/*
- * FSFindDisplayMode
- * Find the appropriate display mode to use in full screen mode.
- * If display mode is not the same as the current Aqua mode, switch
- * to the new mode.
- */
-static Bool FSFindDisplayMode(
- FSScreenPtr fsDisplayInfo)
-{
- CGDirectDisplayID cgID = fsDisplayInfo->displayID;
- size_t height, width, bpp;
- boolean_t exactMatch;
-
- fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID);
-
- // If no user options, use current display mode
- if (darwinDesiredWidth == 0 && darwinDesiredDepth == -1 &&
- darwinDesiredRefresh == -1)
- {
- fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode;
- return TRUE;
- }
-
- // If the user has no choice for size, use current
- if (darwinDesiredWidth == 0) {
- width = CGDisplayPixelsWide(cgID);
- height = CGDisplayPixelsHigh(cgID);
- } else {
- width = darwinDesiredWidth;
- height = darwinDesiredHeight;
- }
-
- switch (darwinDesiredDepth) {
- case 0:
- bpp = 8;
- break;
- case 1:
- bpp = 16;
- break;
- case 2:
- bpp = 32;
- break;
- default:
- bpp = CGDisplayBitsPerPixel(cgID);
- }
-
- if (darwinDesiredRefresh == -1) {
- fsDisplayInfo->xDisplayMode =
- CGDisplayBestModeForParameters(cgID, bpp, width, height,
- &exactMatch);
- } else {
- fsDisplayInfo->xDisplayMode =
- CGDisplayBestModeForParametersAndRefreshRate(cgID, bpp,
- width, height, darwinDesiredRefresh, &exactMatch);
- }
- if (!exactMatch) {
- fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode;
- return FALSE;
- }
-
- // Switch to the new display mode
- CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode);
- return TRUE;
-}
-
-
-/*
- * FSAddScreen
- * Do initialization of each screen for Quartz in full screen mode.
- */
-static Bool FSAddScreen(
- int index,
- ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen);
- CGDirectDisplayID cgID = quartzDisplayList[index];
- CGRect bounds;
- FSScreenPtr fsDisplayInfo;
-
- // Allocate space for private per screen fullscreen specific storage.
- fsDisplayInfo = xalloc(sizeof(FSScreenRec));
- FULLSCREEN_PRIV(pScreen) = fsDisplayInfo;
-
- displayInfo->displayCount = 1;
- displayInfo->displayIDs = xrealloc(displayInfo->displayIDs,
- 1 * sizeof(CGDirectDisplayID));
- displayInfo->displayIDs[0] = cgID;
-
- fsDisplayInfo->displayID = cgID;
- fsDisplayInfo->xDisplayMode = 0;
- fsDisplayInfo->aquaDisplayMode = 0;
- fsDisplayInfo->xPalette = 0;
- fsDisplayInfo->aquaPalette = 0;
-
- // Capture full screen because X doesn't like read-only framebuffer.
- // We need to do this before we (potentially) switch the display mode.
- CGDisplayCapture(cgID);
-
- if (! FSFindDisplayMode(fsDisplayInfo)) {
- ErrorF("Could not support specified display mode on screen %i.\n",
- index);
- xfree(fsDisplayInfo);
- return FALSE;
- }
-
- // Don't need to flip y-coordinate as CoreGraphics treats (0, 0)
- // as the top left of main screen.
- bounds = CGDisplayBounds(cgID);
- dfb->x = bounds.origin.x;
- dfb->y = bounds.origin.y;
- dfb->width = bounds.size.width;
- dfb->height = bounds.size.height;
- dfb->pitch = CGDisplayBytesPerRow(cgID);
- dfb->bitsPerPixel = CGDisplayBitsPerPixel(cgID);
-
- if (dfb->bitsPerPixel == 8) {
- if (CGDisplayCanSetPalette(cgID)) {
- dfb->colorType = PseudoColor;
- } else {
- dfb->colorType = StaticColor;
- }
- dfb->bitsPerComponent = 8;
- dfb->colorBitsPerPixel = 8;
- } else {
- dfb->colorType = TrueColor;
- dfb->bitsPerComponent = CGDisplayBitsPerSample(cgID);
- dfb->colorBitsPerPixel = CGDisplaySamplesPerPixel(cgID) *
- dfb->bitsPerComponent;
- }
-
- fsDisplayInfo->framebuffer = CGDisplayBaseAddress(cgID);
-
- // allocate shadow framebuffer
- fsDisplayInfo->shadowPtr = xalloc(dfb->pitch * dfb->height);
- dfb->framebuffer = fsDisplayInfo->shadowPtr;
-
- return TRUE;
-}
-
-
-/*
- * FSShadowUpdate
- * Update the damaged regions of the shadow framebuffer on the display.
- */
-static void FSShadowUpdate(
- ScreenPtr pScreen,
- shadowBufPtr pBuf)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen);
- RegionPtr damage = &pBuf->damage;
- int numBox = REGION_NUM_RECTS(damage);
- BoxPtr pBox = REGION_RECTS(damage);
- int pitch = dfb->pitch;
- int bpp = dfb->bitsPerPixel/8;
-
- // Don't update if the X server is not visible
- if (!quartzServerVisible)
- return;
-
- // Loop through all the damaged boxes
- while (numBox--) {
- int width, height, offset;
- unsigned char *src, *dst;
-
- width = (pBox->x2 - pBox->x1) * bpp;
- height = pBox->y2 - pBox->y1;
- offset = (pBox->y1 * pitch) + (pBox->x1 * bpp);
- src = fsDisplayInfo->shadowPtr + offset;
- dst = fsDisplayInfo->framebuffer + offset;
-
- while (height--) {
- memcpy(dst, src, width);
- dst += pitch;
- src += pitch;
- }
-
- // Get the next box
- pBox++;
- }
-}
-
-
-/*
- * FSSetupScreen
- * Finalize full screen specific setup of each screen.
- */
-static Bool FSSetupScreen(
- int index,
- ScreenPtr pScreen)
-{
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
- FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen);
- CGDirectDisplayID cgID = fsDisplayInfo->displayID;
-
- // Initialize shadow framebuffer support
- if (! shadowInit(pScreen, FSShadowUpdate, NULL)) {
- ErrorF("Failed to initalize shadow framebuffer for screen %i.\n",
- index);
- return FALSE;
- }
-
- if (dfb->colorType == PseudoColor) {
- // Initialize colormap handling
- size_t aquaBpp;
-
- // If Aqua is using 8 bits we need to keep track of its pallete.
- CFNumberGetValue(CFDictionaryGetValue(fsDisplayInfo->aquaDisplayMode,
- kCGDisplayBitsPerPixel), kCFNumberLongType, &aquaBpp);
- if (aquaBpp <= 8)
- fsDisplayInfo->aquaPalette = CGPaletteCreateWithDisplay(cgID);
-
- pScreen->CreateColormap = FSCreateColormap;
- pScreen->DestroyColormap = FSDestroyColormap;
- pScreen->InstallColormap = FSInstallColormap;
- pScreen->StoreColors = FSStoreColors;
-
- }
-
- quartzScreens[quartzNumScreens++] = fsDisplayInfo;
- return TRUE;
-}
-
-
-/*
- * Quartz display mode function list.
- */
-static QuartzModeProcsRec fsModeProcs = {
- FSDisplayInit,
- FSAddScreen,
- FSSetupScreen,
- NULL, // Not needed
- QuartzInitCursor,
- QuartzReallySetCursor,
- FSSuspendScreen,
- FSResumeScreen,
- FSCapture,
- FSRelease,
- NULL, // No dynamic screen change support
- NULL,
- NULL,
- NULL, // No rootless code in fullscreen
- NULL,
- NULL,
- NULL,
- NULL, // No support for DRI surfaces
- NULL
-};
-
-
-/*
- * QuartzModeBundleInit
- * Initialize the display mode bundle after loading.
- */
-Bool
-QuartzModeBundleInit(void)
-{
- quartzProcs = &fsModeProcs;
- quartzOpenGLBundle = NULL; // Only Mesa support for now
- return TRUE;
-}
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c
deleted file mode 100644
index a97a36d88..000000000
--- a/hw/darwin/quartz/fullscreen/quartzCursor.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/**************************************************************
- *
- * Support for using the Quartz Window Manager cursor
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <dix-config.h>
-
-#include "quartz/quartzCommon.h"
-#include "quartz/quartzCursor.h"
-#include "darwin.h"
-
-#include <pthread.h>
-
-#include "mi.h"
-#include "scrnintstr.h"
-#include "cursorstr.h"
-#include "mipointrst.h"
-#include "globals.h"
-
-// Size of the QuickDraw cursor
-#define CURSORWIDTH 16
-#define CURSORHEIGHT 16
-
-typedef struct {
- int qdCursorMode;
- int qdCursorVisible;
- int useQDCursor;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
-} QuartzCursorScreenRec, *QuartzCursorScreenPtr;
-
-static int darwinCursorScreenIndex = -1;
-static unsigned long darwinCursorGeneration = 0;
-static CursorPtr quartzLatentCursor = NULL;
-static QD_Cursor gQDArrow; // QuickDraw arrow cursor
-
-// Cursor for the main thread to set (NULL = arrow cursor).
-static CCrsrHandle currentCursor = NULL;
-static pthread_mutex_t cursorMutex;
-static pthread_cond_t cursorCondition;
-
-#define CURSOR_PRIV(pScreen) \
- ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr)
-
-#define HIDE_QD_CURSOR(pScreen, visible) \
- if (visible) { \
- int ix; \
- for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \
- CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \
- } \
- visible = FALSE; \
- } ((void)0)
-
-#define SHOW_QD_CURSOR(pScreen, visible) \
- { \
- int ix; \
- for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \
- CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \
- } \
- visible = TRUE; \
- } ((void)0)
-
-#define CHANGE_QD_CURSOR(cursorH) \
- if (!quartzServerQuitting) { \
- /* Acquire lock and tell the main thread to change cursor */ \
- pthread_mutex_lock(&cursorMutex); \
- currentCursor = (CCrsrHandle) (cursorH); \
- QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \
- \
- /* Wait for the main thread to change the cursor */ \
- pthread_cond_wait(&cursorCondition, &cursorMutex); \
- pthread_mutex_unlock(&cursorMutex); \
- } ((void)0)
-
-
-/*
- * MakeQDCursor helpers: CTAB_ENTER, interleave
- */
-
-// Add a color entry to a ctab
-#define CTAB_ENTER(ctab, index, r, g, b) \
- ctab->ctTable[index].value = index; \
- ctab->ctTable[index].rgb.red = r; \
- ctab->ctTable[index].rgb.green = g; \
- ctab->ctTable[index].rgb.blue = b
-
-// Make an unsigned short by interleaving the bits of bytes c1 and c2.
-// High bit of c1 is first; low bit of c2 is last.
-// Interleave is a built-in INTERCAL operator.
-static unsigned short
-interleave(
- unsigned char c1,
- unsigned char c2 )
-{
- return
- ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) |
- ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) |
- ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) |
- ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) |
- ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) |
- ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) |
- ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) |
- ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ;
-}
-
-/*
- * MakeQDCursor
- * Make a QuickDraw color cursor from the given X11 cursor.
- * Warning: This code is nasty. Color cursors were meant to be read
- * from resources; constructing the structures programmatically is messy.
- */
-/*
- QuickDraw cursor representation:
- Our color cursor is a 2 bit per pixel pixmap.
- Each pixel's bits are (source<<1 | mask) from the original X cursor pixel.
- The cursor's color table maps the colors like this:
- (2-bit value | X result | colortable | Mac result)
- 00 | transparent | white | transparent (white outside mask)
- 01 | back color | back color | back color
- 10 | undefined | black | invert background (just for fun)
- 11 | fore color | fore color | fore color
-*/
-static CCrsrHandle
-MakeQDCursor(
- CursorPtr pCursor )
-{
- CCrsrHandle result;
- CCrsrPtr curs;
- int i, w, h;
- unsigned short rowMask;
- PixMap *pix;
- ColorTable *ctab;
- unsigned short *image;
-
- result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr));
- if (!result) return NULL;
- HLock((Handle)result);
- curs = *result;
-
- // Initialize CCrsr
- curs->crsrType = 0x8001; // 0x8000 = b&w, 0x8001 = color
- curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap));
- if (!curs->crsrMap) goto pixAllocFailed;
- HLock((Handle)curs->crsrMap);
- pix = *curs->crsrMap;
- curs->crsrData = NULL; // raw cursor image data (set below)
- curs->crsrXData = NULL; // QD's processed data
- curs->crsrXValid = 0; // zero means QD must re-process cursor data
- curs->crsrXHandle = NULL; // reserved
- memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data
- memset(curs->crsrMask, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask
- curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot
- curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot
- curs->crsrXTable = 0; // reserved
- curs->crsrID = GetCTSeed(); // unique ID from Color Manager
-
- // Set the b&w data and mask
- w = min(pCursor->bits->width, CURSORWIDTH);
- h = min(pCursor->bits->height, CURSORHEIGHT);
- rowMask = ~((1 << (CURSORWIDTH - w)) - 1);
- for (i = 0; i < h; i++) {
- curs->crsr1Data[i] = rowMask &
- ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]);
- curs->crsrMask[i] = rowMask &
- ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]);
- }
-
- // Set the color data and mask
- // crsrMap: defines bit depth and size and colortable only
- pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap
- SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020
- pix->pixelSize = 2;
- pix->cmpCount = 1;
- pix->cmpSize = 2;
- // pix->pmTable set below
-
- // crsrData is the pixel data. crsrMap's baseAddr is not used.
- curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8);
- if (!curs->crsrData) goto imageAllocFailed;
- HLock((Handle)curs->crsrData);
- image = (unsigned short *) *curs->crsrData;
- // Pixel data is just 1-bit data and mask interleaved (see above)
- for (i = 0; i < h; i++) {
- unsigned char s, m;
- s = pCursor->bits->source[i*4] & (rowMask >> 8);
- m = pCursor->bits->mask[i*4] & (rowMask >> 8);
- image[2*i] = interleave(s, m);
- s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff);
- m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff);
- image[2*i+1] = interleave(s, m);
- }
-
- // Build the color table (entries described above)
- // NewPixMap allocates a color table handle.
- pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3
- * sizeof(ColorSpec));
- if (!pix->pmTable) goto ctabAllocFailed;
- HLock((Handle)pix->pmTable);
- ctab = *pix->pmTable;
- ctab->ctSeed = GetCTSeed();
- ctab->ctFlags = 0;
- ctab->ctSize = 3; // color count - 1
- CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff);
- CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen,
- pCursor->backBlue);
- CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000);
- CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen,
- pCursor->foreBlue);
-
- HUnlock((Handle)pix->pmTable); // ctab
- HUnlock((Handle)curs->crsrData); // image data
- HUnlock((Handle)curs->crsrMap); // pix
- HUnlock((Handle)result); // cursor
-
- return result;
-
- // "What we have here is a failure to allocate"
-ctabAllocFailed:
- HUnlock((Handle)curs->crsrData);
- DisposeHandle((Handle)curs->crsrData);
-imageAllocFailed:
- HUnlock((Handle)curs->crsrMap);
- DisposeHandle((Handle)curs->crsrMap);
-pixAllocFailed:
- HUnlock((Handle)result);
- DisposeHandle((Handle)result);
- return NULL;
-}
-
-
-/*
- * FreeQDCursor
- * Destroy a QuickDraw color cursor created with MakeQDCursor().
- * The cursor must not currently be on screen.
- */
-static void FreeQDCursor(CCrsrHandle cursHandle)
-{
- CCrsrPtr curs;
- PixMap *pix;
-
- HLock((Handle)cursHandle);
- curs = *cursHandle;
- HLock((Handle)curs->crsrMap);
- pix = *curs->crsrMap;
- DisposeHandle((Handle)pix->pmTable);
- HUnlock((Handle)curs->crsrMap);
- DisposeHandle((Handle)curs->crsrMap);
- DisposeHandle((Handle)curs->crsrData);
- HUnlock((Handle)cursHandle);
- DisposeHandle((Handle)cursHandle);
-}
-
-
-/*
-===========================================================================
-
- Pointer sprite functions
-
-===========================================================================
-*/
-
-/*
- * QuartzRealizeCursor
- * Convert the X cursor representation to QuickDraw format if possible.
- */
-Bool
-QuartzRealizeCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor )
-{
- CCrsrHandle qdCursor;
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- if(!pCursor || !pCursor->bits)
- return FALSE;
-
- // if the cursor is too big we use a software cursor
- if ((pCursor->bits->height > CURSORHEIGHT) ||
- (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor)
- {
- if (quartzRootless) {
- // rootless can't use a software cursor
- return TRUE;
- } else {
- return (*ScreenPriv->spriteFuncs->RealizeCursor)
- (pScreen, pCursor);
- }
- }
-
- // make new cursor image
- qdCursor = MakeQDCursor(pCursor);
- if (!qdCursor) return FALSE;
-
- // save the result
- pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor;
-
- return TRUE;
-}
-
-
-/*
- * QuartzUnrealizeCursor
- * Free the storage space associated with a realized cursor.
- */
-Bool
-QuartzUnrealizeCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor )
-{
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- if ((pCursor->bits->height > CURSORHEIGHT) ||
- (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor)
- {
- if (quartzRootless) {
- return TRUE;
- } else {
- return (*ScreenPriv->spriteFuncs->UnrealizeCursor)
- (pScreen, pCursor);
- }
- } else {
- CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum];
-
- if (currentCursor != oldCursor) {
- // This should only fail when quitting, in which case we just leak.
- FreeQDCursor(oldCursor);
- }
- pCursor->devPriv[pScreen->myNum] = NULL;
- return TRUE;
- }
-}
-
-
-/*
- * QuartzSetCursor
- * Set the cursor sprite and position.
- * Use QuickDraw cursor if possible.
- */
-static void
-QuartzSetCursor(
- ScreenPtr pScreen,
- CursorPtr pCursor,
- int x,
- int y)
-{
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- quartzLatentCursor = pCursor;
-
- // Don't touch Mac OS cursor if X is hidden!
- if (!quartzServerVisible)
- return;
-
- if (!pCursor) {
- // Remove the cursor completely.
- HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
- if (! ScreenPriv->qdCursorMode)
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
- }
- else if ((pCursor->bits->height <= CURSORHEIGHT) &&
- (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor)
- {
- // Cursor is small enough to use QuickDraw directly.
- if (! ScreenPriv->qdCursorMode) // remove the X cursor
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
- ScreenPriv->qdCursorMode = TRUE;
-
- CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]);
- SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
- }
- else if (quartzRootless) {
- // Rootless can't use a software cursor, so we just use Mac OS arrow.
- CHANGE_QD_CURSOR(NULL);
- SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
- }
- else {
- // Cursor is too big for QuickDraw. Use X software cursor.
- HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
- ScreenPriv->qdCursorMode = FALSE;
- (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y);
- }
-}
-
-
-/*
- * QuartzReallySetCursor
- * Set the QuickDraw cursor. Called from the main thread since changing the
- * cursor with QuickDraw is not thread safe on dual processor machines.
- */
-void
-QuartzReallySetCursor()
-{
- pthread_mutex_lock(&cursorMutex);
-
- if (currentCursor) {
- SetCCursor(currentCursor);
- } else {
- SetCursor(&gQDArrow);
- }
-
- pthread_cond_signal(&cursorCondition);
- pthread_mutex_unlock(&cursorMutex);
-}
-
-
-/*
- * QuartzMoveCursor
- * Move the cursor. This is a noop for QuickDraw.
- */
-static void
-QuartzMoveCursor(
- ScreenPtr pScreen,
- int x,
- int y)
-{
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- // only the X cursor needs to be explicitly moved
- if (!ScreenPriv->qdCursorMode)
- (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y);
-}
-
-
-static miPointerSpriteFuncRec quartzSpriteFuncsRec = {
- QuartzRealizeCursor,
- QuartzUnrealizeCursor,
- QuartzSetCursor,
- QuartzMoveCursor
-};
-
-
-/*
-===========================================================================
-
- Pointer screen functions
-
-===========================================================================
-*/
-
-/*
- * QuartzCursorOffScreen
- */
-static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y)
-{
- return FALSE;
-}
-
-
-/*
- * QuartzCrossScreen
- */
-static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering)
-{
- return;
-}
-
-
-/*
- * QuartzWarpCursor
- * Change the cursor position without generating an event or motion history.
- * The input coordinates (x,y) are in pScreen-local X11 coordinates.
- *
- */
-static void
-QuartzWarpCursor(
- ScreenPtr pScreen,
- int x,
- int y)
-{
- static int neverMoved = TRUE;
-
- if (neverMoved) {
- // Don't move the cursor the first time. This is the jump-to-center
- // initialization, and it's annoying because we may still be in MacOS.
- neverMoved = FALSE;
- return;
- }
-
- if (quartzServerVisible) {
- CGDisplayErr cgErr;
- CGPoint cgPoint;
- // Only need to do this for one display. Any display will do.
- CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0];
- CGRect cgRect = CGDisplayBounds(cgID);
-
- // Convert (x,y) to CoreGraphics screen-local CG coordinates.
- // This is necessary because the X11 screen and CG screen may not
- // coincide. (e.g. X11 screen may be moved to dodge the menu bar)
-
- // Make point in X11 global coordinates
- cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x,
- y + dixScreenOrigins[pScreen->myNum].y);
- // Shift to CoreGraphics global screen coordinates
- cgPoint.x += darwinMainScreenX;
- cgPoint.y += darwinMainScreenY;
- // Shift to CoreGraphics screen-local coordinates
- cgPoint.x -= cgRect.origin.x;
- cgPoint.y -= cgRect.origin.y;
-
- cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint);
- if (cgErr != CGDisplayNoErr) {
- ErrorF("Could not set cursor position with error code 0x%x.\n",
- cgErr);
- }
- }
-
- miPointerWarpCursor(pScreen, x, y);
- miPointerUpdate();
-}
-
-
-static miPointerScreenFuncRec quartzScreenFuncsRec = {
- QuartzCursorOffScreen,
- QuartzCrossScreen,
- QuartzWarpCursor,
- DarwinEQPointerPost,
- DarwinEQSwitchScreen
-};
-
-
-/*
-===========================================================================
-
- Other screen functions
-
-===========================================================================
-*/
-
-/*
- * QuartzCursorQueryBestSize
- * Handle queries for best cursor size
- */
-static void
-QuartzCursorQueryBestSize(
- int class,
- unsigned short *width,
- unsigned short *height,
- ScreenPtr pScreen)
-{
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- if (class == CursorShape) {
- *width = CURSORWIDTH;
- *height = CURSORHEIGHT;
- } else {
- (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
- }
-}
-
-
-/*
- * QuartzInitCursor
- * Initialize cursor support
- */
-Bool
-QuartzInitCursor(
- ScreenPtr pScreen )
-{
- QuartzCursorScreenPtr ScreenPriv;
- miPointerScreenPtr PointPriv;
- DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
-
- // initialize software cursor handling (always needed as backup)
- if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) {
- return FALSE;
- }
-
- // allocate private storage for this screen's QuickDraw cursor info
- if (darwinCursorGeneration != serverGeneration) {
- if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- darwinCursorGeneration = serverGeneration;
- }
-
- ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) );
- if (!ScreenPriv) return FALSE;
-
- CURSOR_PRIV(pScreen) = ScreenPriv;
-
- // override some screen procedures
- ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
- pScreen->QueryBestSize = QuartzCursorQueryBestSize;
-
- // initialize QuickDraw cursor handling
- GetQDGlobalsArrow(&gQDArrow);
- PointPriv = (miPointerScreenPtr)
- pScreen->devPrivates[miPointerScreenIndex].ptr;
-
- ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
- PointPriv->spriteFuncs = &quartzSpriteFuncsRec;
-
- if (!quartzRootless)
- ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel);
- else
- ScreenPriv->useQDCursor = TRUE;
- ScreenPriv->qdCursorMode = TRUE;
- ScreenPriv->qdCursorVisible = TRUE;
-
- // initialize cursor mutex lock
- pthread_mutex_init(&cursorMutex, NULL);
-
- // initialize condition for waiting
- pthread_cond_init(&cursorCondition, NULL);
-
- return TRUE;
-}
-
-
-// X server is hiding. Restore the Aqua cursor.
-void QuartzSuspendXCursor(
- ScreenPtr pScreen )
-{
- QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
- CHANGE_QD_CURSOR(NULL);
- SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
-}
-
-
-// X server is showing. Restore the X cursor.
-void QuartzResumeXCursor(
- ScreenPtr pScreen,
- int x,
- int y )
-{
- QuartzSetCursor(pScreen, quartzLatentCursor, x, y);
-}
diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c
deleted file mode 100644
index 76392e44c..000000000
--- a/hw/darwin/quartz/quartzStartup.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/**************************************************************
- *
- * Startup code for the Quartz Darwin X Server
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <CoreFoundation/CoreFoundation.h>
-#include "quartzCommon.h"
-#include "darwin.h"
-#include "quartz.h"
-#include "opaque.h"
-#include "micmap.h"
-#include <assert.h>
-
-char **envpGlobal; // argcGlobal and argvGlobal
- // are from dix/globals.c
-
-#ifdef INXQUARTZ
-void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg);
-# ifdef GLXEXT
-void GlxExtensionInit(void);
-void GlxWrapInitVisuals(miInitVisualsProcPtr *);
-# endif
-
-static void server_thread (void *arg) {
- extern int main (int argc, char **argv, char **envp);
- exit (main (argcGlobal, argvGlobal, envpGlobal));
-}
-#else
-int NSApplicationMain(int argc, char *argv[]);
-typedef Bool (*QuartzModeBundleInitPtr)(void);
-
-# ifdef GLXEXT
-// GLX bundle function pointers
-typedef void (*GlxExtensionInitPtr)(void);
-static GlxExtensionInitPtr GlxExtensionInit = NULL;
-typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *);
-static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL;
-void * __DarwinglXMesaProvider = NULL;
-typedef void (*GlxPushProviderPtr)(void *);
-GlxPushProviderPtr GlxPushProvider = NULL;
-# endif
-#endif
-
-/*
- * DarwinHandleGUI
- * This function is called first from main(). The first time
- * it is called we start the Mac OS X front end. The front end
- * will call main() again from another thread to run the X
- * server. On the second call this function loads the user
- * preferences set by the Mac OS X front end.
- */
-void DarwinHandleGUI(
- int argc,
- char *argv[],
- char *envp[] )
-{
- static Bool been_here = FALSE;
- int main_exit, i;
- int fd[2];
-
- if (been_here) {
-#ifdef INXDARWINAPP
- QuartzReadPreferences();
-#endif
- return;
- }
- been_here = TRUE;
-
- // Make a pipe to pass events
- assert( pipe(fd) == 0 );
- darwinEventReadFD = fd[0];
- darwinEventWriteFD = fd[1];
- fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK);
-
- // Store command line arguments to pass back to main()
- argcGlobal = argc;
- argvGlobal = argv;
- envpGlobal = envp;
-
- quartzStartClients = 1;
- for (i = 1; i < argc; i++) {
- // Display version info without starting Mac OS X UI if requested
- if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) {
- DarwinPrintBanner();
- exit(0);
- }
-
- // Determine if we need to start X clients
- // and what display mode to use
- if (!strcmp(argv[i], "-nostartx")) {
- quartzStartClients = 0;
- } else if (!strcmp( argv[i], "-fullscreen")) {
- quartzRootless = 0;
- } else if (!strcmp( argv[i], "-rootless")) {
- quartzRootless = 1;
- }
- }
-
-#ifdef INXQUARTZ
- /* Initially I ran the X server on the main thread, and received
- events on the second thread. But now we may be using Carbon,
- that needs to run on the main thread. (Otherwise, when it's
- prebound, it will initialize itself on the wrong thread)
-
- grr.. but doing that means that if the X thread gets scheduled
- before the main thread when we're _not_ prebound, things fail,
- so initialize by hand. */
- extern void _InitHLTB(void);
-
- _InitHLTB();
-
- X11ControllerMain(argc, argv, server_thread, NULL);
-#else
- main_exit = NSApplicationMain(argc, argv);
-#endif
- exit(main_exit);
-}
-
-#ifndef INXQUARTZ
-/*
- * QuartzLoadDisplayBundle
- * Try to load the appropriate bundle containing the back end display code.
- */
-Bool QuartzLoadDisplayBundle(
- const char *dpyBundleName)
-{
- CFBundleRef mainBundle;
- CFStringRef bundleName;
- CFURLRef bundleURL;
- CFBundleRef dpyBundle;
- QuartzModeBundleInitPtr bundleInit;
-
- // Get the main bundle for the application
- mainBundle = CFBundleGetMainBundle();
-
- // Make CFString from bundle name
- bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault,
- dpyBundleName,
- kCFStringEncodingASCII,
- kCFAllocatorNull);
-
- // Look for the appropriate bundle in the main bundle
- bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName,
- NULL, NULL);
- if (!bundleURL) {
- ErrorF("Could not find display mode bundle %s.\n", dpyBundleName);
- return FALSE;
- }
-
- // Make a bundle instance using the URLRef
- dpyBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
-
- if (!CFBundleLoadExecutable(dpyBundle)) {
- ErrorF("Could not load display mode bundle %s.\n", dpyBundleName);
- return FALSE;
- }
-
- // Lookup the bundle initialization function
- bundleInit = (void *)
- CFBundleGetFunctionPointerForName(dpyBundle,
- CFSTR("QuartzModeBundleInit"));
- if (!bundleInit) {
- ErrorF("Could not initialize display mode bundle %s.\n",
- dpyBundleName);
- return FALSE;
- }
- if (!bundleInit())
- return FALSE;
-
- // Release the CF objects
- CFRelease(bundleName);
- CFRelease(bundleURL);
-
- return TRUE;
-}
-
-#ifdef GLXEXT
-/*
- * LoadGlxBundle
- * The Quartz mode X server needs to dynamically load the appropriate
- * bundle before initializing GLX.
- */
-static void LoadGlxBundle(void)
-{
- CFBundleRef mainBundle;
- CFStringRef bundleName;
- CFURLRef bundleURL;
- CFBundleRef glxBundle;
-
- // Get the main bundle for the application
- mainBundle = CFBundleGetMainBundle();
-
- // Choose the bundle to load
- ErrorF("Loading GLX bundle ");
- if (/*quartzUseAGL*/0) {
- bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault,
- quartzOpenGLBundle,
- kCFStringEncodingASCII,
- kCFAllocatorNull);
- ErrorF("%s (using Apple's OpenGL)\n", quartzOpenGLBundle);
- } else {
- bundleName = CFSTR("glxMesa.bundle");
- CFRetain(bundleName); // so we can release later
- ErrorF("glxMesa.bundle (using Mesa)\n");
- }
-
- // Look for the appropriate GLX bundle in the main bundle by name
- bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName,
- NULL, NULL);
- if (!bundleURL) {
- FatalError("Could not find GLX bundle.");
- }
-
- // Make a bundle instance using the URLRef
- glxBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
-
- if (!CFBundleLoadExecutable(glxBundle)) {
- FatalError("Could not load GLX bundle.");
- }
-
- // Find the GLX init functions
-
-
- __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName(
- glxBundle, CFSTR("__glXMesaProvider"));
-
- GlxPushProvider = (void *) CFBundleGetFunctionPointerForName(
- glxBundle, CFSTR("GlxPushProvider"));
-
- GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName(
- glxBundle, CFSTR("GlxExtensionInit"));
-
- GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName(
- glxBundle, CFSTR("GlxWrapInitVisuals"));
-
- if (!GlxExtensionInit || !GlxWrapInitVisuals) {
- FatalError("Could not initialize GLX bundle.");
- }
-
- // Release the CF objects
- CFRelease(bundleName);
- CFRelease(bundleURL);
-}
-# endif
-#else
-
-Bool QuartzLoadDisplayBundle(const char *dpyBundleName)
-{
- return TRUE;
- }
-
-#endif
-
-#ifdef GLXEXT
-void DarwinGlxPushProvider(void *impl)
-{
-#ifndef INXQUARTZ
- if (!GlxExtensionInit)
- LoadGlxBundle();
-#endif
-
- GlxPushProvider(impl);
-}
-
-/*
- * DarwinGlxExtensionInit
- * Initialize the GLX extension.
- */
-void DarwinGlxExtensionInit(void)
-{
-#ifndef INXQUARTZ
- if (!GlxExtensionInit)
- LoadGlxBundle();
-#endif
- GlxExtensionInit();
-}
-
-
-/*
- * DarwinGlxWrapInitVisuals
- */
-void DarwinGlxWrapInitVisuals(
- miInitVisualsProcPtr *procPtr)
-{
-#ifndef INXQUARTZ
- if (!GlxWrapInitVisuals)
- LoadGlxBundle();
-#endif
- GlxWrapInitVisuals(procPtr);
-}
-#endif
-
-int DarwinModeProcessArgument( int argc, char *argv[], int i )
-{
- // fullscreen: CoreGraphics full-screen mode
- // rootless: Cocoa rootless mode
- // quartz: Default, either fullscreen or rootless
-
- if ( !strcmp( argv[i], "-fullscreen" ) ) {
- ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" );
- return 1;
- }
-
- if ( !strcmp( argv[i], "-rootless" ) ) {
- ErrorF( "Running rootless inside Mac OS X window server.\n" );
- return 1;
- }
-
- if ( !strcmp( argv[i], "-quartz" ) ) {
- ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" );
- return 1;
- }
-
- // The Mac OS X front end uses this argument, which we just ignore here.
- if ( !strcmp( argv[i], "-nostartx" ) ) {
- return 1;
- }
-
- // This command line arg is passed when launched from the Aqua GUI.
- if ( !strncmp( argv[i], "-psn_", 5 ) ) {
- return 1;
- }
-
- return 0;
-}
diff --git a/hw/darwin/quartz/xpr/Xplugin.h b/hw/darwin/quartz/xpr/Xplugin.h
deleted file mode 100644
index a10b1b8e1..000000000
--- a/hw/darwin/quartz/xpr/Xplugin.h
+++ /dev/null
@@ -1,589 +0,0 @@
-/* Xplugin.h -- windowing API for rootless X11 server
-
- Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
- HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-
- Except as contained in this notice, the name(s) of the above
- copyright holders shall not be used in advertising or otherwise to
- promote the sale, use or other dealings in this Software without
- prior written authorization.
-
- Note that these interfaces are provided solely for the use of the
- X11 server. Any other uses are unsupported and strongly discouraged. */
-
-#ifndef XPLUGIN_H
-#define XPLUGIN_H 1
-
-#include <stdint.h>
-
-/* By default we use the X server definition of BoxRec to define xp_box,
- so that the compiler can silently convert between the two. But if
- XP_NO_X_HEADERS is defined, we'll define it ourselves. */
-
-#ifndef XP_NO_X_HEADERS
-# include "miscstruct.h"
- typedef BoxRec xp_box;
-#else
- struct xp_box_struct {
- short x1, y1, x2, y2;
- };
- typedef struct xp_box_struct xp_box;
-#endif
-
-typedef unsigned int xp_resource_id;
-typedef xp_resource_id xp_window_id;
-typedef xp_resource_id xp_surface_id;
-typedef unsigned int xp_client_id;
-typedef unsigned int xp_request_type;
-typedef int xp_error;
-typedef int xp_bool;
-
-
-/* Error codes that the functions declared here may return. They all
- numerically match their X equivalents, i.e. the XP_ can be dropped
- if <X11/X.h> has been included. */
-
-enum xp_error_enum {
- XP_Success = 0,
- XP_BadRequest = 1,
- XP_BadValue = 2,
- XP_BadWindow = 3,
- XP_BadMatch = 8,
- XP_BadAccess = 10,
- XP_BadImplementation = 17,
-};
-
-
-/* Event types generated by the plugin. */
-
-enum xp_event_type_enum {
- /* The global display configuration changed somehow. */
- XP_EVENT_DISPLAY_CHANGED = 1 << 0,
-
- /* A window changed state. Argument is xp_window_state_event */
- XP_EVENT_WINDOW_STATE_CHANGED = 1 << 1,
-
- /* An async request encountered an error. Argument is of type
- xp_async_error_event */
- XP_EVENT_ASYNC_ERROR = 1 << 2,
-
- /* Sent when a surface is destroyed as a side effect of destroying
- a window. Arg is of type xp_surface_id. */
- XP_EVENT_SURFACE_DESTROYED = 1 << 3,
-
- /* Sent when any GL contexts pointing at the given surface need to
- call xp_update_gl_context () to refresh their state (because the
- window moved or was resized. Arg is of type xp_surface_id. */
- XP_EVENT_SURFACE_CHANGED = 1 << 4,
-
- /* Sent when a window has been moved. Arg is of type xp_window_id. */
- XP_EVENT_WINDOW_MOVED = 1 << 5,
-};
-
-/* Function type used to receive events. */
-
-typedef void (xp_event_fun) (unsigned int type, const void *arg,
- unsigned int arg_size, void *user_data);
-
-
-/* Operation types. Used when reporting errors asynchronously. */
-
-enum xp_request_type_enum {
- XP_REQUEST_NIL = 0,
- XP_REQUEST_DESTROY_WINDOW = 1,
- XP_REQUEST_CONFIGURE_WINDOW = 2,
- XP_REQUEST_FLUSH_WINDOW = 3,
- XP_REQUEST_COPY_WINDOW = 4,
- XP_REQUEST_UNLOCK_WINDOW = 5,
- XP_REQUEST_DISABLE_UPDATE = 6,
- XP_REQUEST_REENABLE_UPDATE = 7,
- XP_REQUEST_HIDE_CURSOR = 8,
- XP_REQUEST_SHOW_CURSOR = 9,
- XP_REQUEST_FRAME_DRAW = 10,
-};
-
-/* Structure used to report an error asynchronously. Passed as the "arg"
- of an XP_EVENT_ASYNC_ERROR event. */
-
-struct xp_async_error_event_struct {
- xp_request_type request_type;
- xp_resource_id id;
- xp_error error;
-};
-
-typedef struct xp_async_error_event_struct xp_async_error_event;
-
-
-/* Possible window states. */
-
-enum xp_window_state_enum {
- /* The window is not in the global list of possibly-visible windows. */
- XP_WINDOW_STATE_OFFSCREEN = 1 << 0,
-
- /* Parts of the window may be obscured by other windows. */
- XP_WINDOW_STATE_OBSCURED = 1 << 1,
-};
-
-/* Structure passed as argument of an XP_EVENT_WINDOW_STATE_CHANGED event. */
-
-struct xp_window_state_event_struct {
- xp_window_id id;
- unsigned int state;
-};
-
-typedef struct xp_window_state_event_struct xp_window_state_event;
-
-
-/* Function type used to supply a colormap for indexed drawables. */
-
-typedef xp_error (xp_colormap_fun) (void *data, int first_color,
- int n_colors, uint32_t *colors);
-
-
-/* Window attributes structure. Used when creating and configuring windows.
- Also used when configuring surfaces attached to windows. Functions that
- take one of these structures also take a bit mask defining which
- fields are set to meaningful values. */
-
-enum xp_window_changes_enum {
- XP_ORIGIN = 1 << 0,
- XP_SIZE = 1 << 1,
- XP_BOUNDS = XP_ORIGIN | XP_SIZE,
- XP_SHAPE = 1 << 2,
- XP_STACKING = 1 << 3,
- XP_DEPTH = 1 << 4,
- XP_COLORMAP = 1 << 5,
- XP_WINDOW_LEVEL = 1 << 6,
-};
-
-struct xp_window_changes_struct {
- /* XP_ORIGIN */
- int x, y;
-
- /* XP_SIZE */
- unsigned int width, height;
- int bit_gravity; /* how to resize the backing store */
-
- /* XP_SHAPE */
- int shape_nrects; /* -1 = remove shape */
- xp_box *shape_rects;
- int shape_tx, shape_ty; /* translation for shape */
-
- /* XP_STACKING */
- int stack_mode;
- xp_window_id sibling; /* may be zero; in ABOVE/BELOW modes
- it may specify a relative window */
- /* XP_DEPTH, window-only */
- unsigned int depth;
-
- /* XP_COLORMAP, window-only */
- xp_colormap_fun *colormap;
- void *colormap_data;
-
- /* XP_WINDOW_LEVEL, window-only */
- int window_level;
-};
-
-typedef struct xp_window_changes_struct xp_window_changes;
-
-/* Values for bit_gravity field */
-
-enum xp_bit_gravity_enum {
- XP_GRAVITY_NONE = 0, /* no gravity, fill everything */
- XP_GRAVITY_NORTH_WEST = 1, /* anchor to top-left corner */
- XP_GRAVITY_NORTH_EAST = 2, /* anchor to top-right corner */
- XP_GRAVITY_SOUTH_EAST = 3, /* anchor to bottom-right corner */
- XP_GRAVITY_SOUTH_WEST = 4, /* anchor to bottom-left corner */
-};
-
-/* Values for stack_mode field */
-
-enum xp_window_stack_mode_enum {
- XP_UNMAPPED = 0, /* remove the window */
- XP_MAPPED_ABOVE = 1, /* display the window on top */
- XP_MAPPED_BELOW = 2, /* display the window at bottom */
-};
-
-/* Data formats for depth field and composite functions */
-
-enum xp_depth_enum {
- XP_DEPTH_NIL = 0, /* null source when compositing */
- XP_DEPTH_ARGB8888,
- XP_DEPTH_RGB555,
- XP_DEPTH_A8, /* for masks when compositing */
- XP_DEPTH_INDEX8,
-};
-
-/* Options that may be passed to the xp_init () function. */
-
-enum xp_init_options_enum {
- /* Don't mark that this process can be in the foreground. */
- XP_IN_BACKGROUND = 1 << 0,
-
- /* Deliver background pointer events to this process. */
- XP_BACKGROUND_EVENTS = 1 << 1,
-};
-
-
-
-/* Miscellaneous functions */
-
-/* Initialize the plugin library. Only the copy/fill/composite functions
- may be called without having previously called xp_init () */
-
-extern xp_error xp_init (unsigned int options);
-
-/* Sets the current set of requested notifications to MASK. When any of
- these arrive, CALLBACK will be invoked with CALLBACK-DATA. Note that
- calling this function cancels any previously requested notifications
- that aren't set in MASK. */
-
-extern xp_error xp_select_events (unsigned int mask,
- xp_event_fun *callback,
- void *callback_data);
-
-/* Waits for all initiated operations to complete. */
-
-extern xp_error xp_synchronize (void);
-
-/* Causes any display update initiated through the plugin libary to be
- queued until update is reenabled. Note that calls to these functions
- nest. */
-
-extern xp_error xp_disable_update (void);
-extern xp_error xp_reenable_update (void);
-
-
-
-/* Cursor functions. */
-
-/* Installs the specified cursor. ARGB-DATA should point to 32-bit
- premultiplied big-endian ARGB data. The HOT-X,HOT-Y parameters
- specify the offset to the cursor's hot spot from its top-left
- corner. */
-
-extern xp_error xp_set_cursor (unsigned int width, unsigned int height,
- unsigned int hot_x, unsigned int hot_y,
- const uint32_t *argb_data,
- unsigned int rowbytes);
-
-/* Hide and show the cursor if it's owned by the current process. Calls
- to these functions nest. */
-
-extern xp_error xp_hide_cursor (void);
-extern xp_error xp_show_cursor (void);
-
-
-
-/* Window functions. */
-
-/* Create a new window as defined by MASK and VALUES. MASK must contain
- XP_BOUNDS or an error is raised. The id of the newly created window
- is stored in *RET-ID if this function returns XP_Success. */
-
-extern xp_error xp_create_window (unsigned int mask,
- const xp_window_changes *values,
- xp_window_id *ret_id);
-
-/* Destroys the window identified by ID. */
-
-extern xp_error xp_destroy_window (xp_window_id id);
-
-/* Reconfigures the given window according to MASK and VALUES. */
-
-extern xp_error xp_configure_window (xp_window_id id, unsigned int mask,
- const xp_window_changes *values);
-
-
-/* Returns true if NATIVE-ID is a window created by the plugin library.
- If so and RET-ID is non-null, stores the id of the window in *RET-ID. */
-
-extern xp_bool xp_lookup_native_window (unsigned int native_id,
- xp_window_id *ret_id);
-
-/* If ID names a window created by the plugin library, stores it's native
- window id in *RET-NATIVE-ID. */
-
-extern xp_error xp_get_native_window (xp_window_id id,
- unsigned int *ret_native_id);
-
-
-/* Locks the rectangle IN-RECT (or, if null, the entire window) of the
- given window's backing store. Any other non-null parameters are filled
- in as follows:
-
- DEPTH = format of returned data. Currently either XP_DEPTH_ARGB8888
- or XP_DEPTH_RGB565 (possibly with 8 bit planar alpha). Data is
- always stored in native byte order.
-
- BITS[0] = pointer to top-left pixel of locked color data
- BITS[1] = pointer to top-left of locked alpha data, or null if window
- has no alpha. If the alpha data is meshed, then BITS[1] = BITS[0].
-
- ROWBYTES[0,1] = size in bytes of each row of color,alpha data
-
- OUT-RECT = rectangle specifying the current position and size of the
- locked region relative to the window origin.
-
- Note that an error is raised when trying to lock an already locked
- window. While the window is locked, the only operations that may
- be performed on it are to modify, access or flush its marked region. */
-
-extern xp_error xp_lock_window (xp_window_id id,
- const xp_box *in_rect,
- unsigned int *depth,
- void *bits[2],
- unsigned int rowbytes[2],
- xp_box *out_rect);
-
-/* Mark that the region specified by SHAPE-NRECTS, SHAPE-RECTS,
- SHAPE-TX, and SHAPE-TY in the specified window has been updated, and
- will need to subsequently be redisplayed. */
-
-extern xp_error xp_mark_window (xp_window_id id, int shape_nrects,
- const xp_box *shape_rects,
- int shape_tx, int shape_ty);
-
-/* Unlocks the specified window. If FLUSH is true, then any marked
- regions are immediately redisplayed. Note that it's an error to
- unlock an already unlocked window. */
-
-extern xp_error xp_unlock_window (xp_window_id id, xp_bool flush);
-
-/* If anything is marked in the given window for redisplay, do it now. */
-
-extern xp_error xp_flush_window (xp_window_id id);
-
-/* Moves the contents of the region DX,DY pixels away from that specified
- by DST_RECTS and DST_NRECTS in the window with SRC-ID to the
- destination region in the window DST-ID. Note that currently source
- and destination windows must be the same. */
-
-extern xp_error xp_copy_window (xp_window_id src_id, xp_window_id dst_id,
- int dst_nrects, const xp_box *dst_rects,
- int dx, int dy);
-
-/* Returns true if the given window has any regions marked for
- redisplay. */
-
-extern xp_bool xp_is_window_marked (xp_window_id id);
-
-/* If successful returns a superset of the region marked for update in
- the given window. Use xp_free_region () to release the returned data. */
-
-extern xp_error xp_get_marked_shape (xp_window_id id,
- int *ret_nrects, xp_box **ret_rects);
-
-extern void xp_free_shape (int nrects, xp_box *rects);
-
-/* Searches for the first window below ABOVE-ID containing the point X,Y,
- and returns it's window id in *RET-ID. If no window is found, *RET-ID
- is set to zero. If ABOVE-ID is zero, finds the topmost window
- containing the given point. */
-
-extern xp_error xp_find_window (int x, int y, xp_window_id above_id,
- xp_window_id *ret_id);
-
-/* Returns the current origin and size of the window ID in *BOUNDS-RET if
- successful. */
-extern xp_error xp_get_window_bounds (xp_window_id id, xp_box *bounds_ret);
-
-
-
-/* Window surface functions. */
-
-/* Create a new VRAM surface on the specified window. If successful,
- returns the identifier of the new surface in *RET-SID. */
-
-extern xp_error xp_create_surface (xp_window_id id, xp_surface_id *ret_sid);
-
-/* Destroys the specified surface. */
-
-extern xp_error xp_destroy_surface (xp_surface_id sid);
-
-/* Reconfigures the specified surface as defined by MASK and VALUES.
- Note that specifying XP_DEPTH is an error. */
-
-extern xp_error xp_configure_surface (xp_surface_id sid, unsigned int mask,
- const xp_window_changes *values);
-
-/* If successful, places the client identifier of the current process
- in *RET-CLIENT. */
-
-extern xp_error xp_get_client_id (xp_client_id *ret_client);
-
-/* Given a valid window,surface combination created by the current
- process, attempts to allow the specified external client access
- to that surface. If successful, returns two integers in RET-KEY
- which the client can use to import the surface into their process. */
-
-extern xp_error xp_export_surface (xp_window_id wid, xp_surface_id sid,
- xp_client_id client,
- unsigned int ret_key[2]);
-
-/* Given a two integer key returned from xp_export_surface (), tries
- to import the surface into the current process. If successful the
- local surface identifier is stored in *SID-RET. */
-
-extern xp_error xp_import_surface (const unsigned int key[2],
- xp_surface_id *sid_ret);
-
-/* If successful, stores the number of surfaces attached to the
- specified window in *RET. */
-
-extern xp_error xp_get_window_surface_count (xp_window_id id,
- unsigned int *ret);
-
-/* Attaches the CGLContextObj CGL-CTX to the specified surface. */
-
-extern xp_error xp_attach_gl_context (void *cgl_ctx, xp_surface_id sid);
-
-/* Updates the CGLContextObj CGL-CTX to reflect any recent changes to
- the surface it's attached to. */
-
-extern xp_error xp_update_gl_context (void *cgl_ctx);
-
-
-
-/* Window frame functions. */
-
-/* Possible arguments to xp_frame_get_rect (). */
-
-enum xp_frame_rect_enum {
- XP_FRAME_RECT_TITLEBAR = 1,
- XP_FRAME_RECT_TRACKING = 2,
- XP_FRAME_RECT_GROWBOX = 3,
-};
-
-/* Classes of window frame. */
-
-enum xp_frame_class_enum {
- XP_FRAME_CLASS_DOCUMENT = 1 << 0,
- XP_FRAME_CLASS_DIALOG = 1 << 1,
- XP_FRAME_CLASS_MODAL_DIALOG = 1 << 2,
- XP_FRAME_CLASS_SYSTEM_MODAL_DIALOG = 1 << 3,
- XP_FRAME_CLASS_UTILITY = 1 << 4,
- XP_FRAME_CLASS_TOOLBAR = 1 << 5,
- XP_FRAME_CLASS_MENU = 1 << 6,
- XP_FRAME_CLASS_SPLASH = 1 << 7,
- XP_FRAME_CLASS_BORDERLESS = 1 << 8,
-};
-
-/* Attributes of window frames. */
-
-enum xp_frame_attr_enum {
- XP_FRAME_ACTIVE = 0x0001,
- XP_FRAME_URGENT = 0x0002,
- XP_FRAME_TITLE = 0x0004,
- XP_FRAME_PRELIGHT = 0x0008,
- XP_FRAME_SHADED = 0x0010,
- XP_FRAME_CLOSE_BOX = 0x0100,
- XP_FRAME_COLLAPSE = 0x0200,
- XP_FRAME_ZOOM = 0x0400,
- XP_FRAME_ANY_BUTTON = 0x0700,
- XP_FRAME_CLOSE_BOX_CLICKED = 0x0800,
- XP_FRAME_COLLAPSE_BOX_CLICKED = 0x1000,
- XP_FRAME_ZOOM_BOX_CLICKED = 0x2000,
- XP_FRAME_ANY_CLICKED = 0x3800,
- XP_FRAME_GROW_BOX = 0x4000,
-};
-
-#define XP_FRAME_ATTR_IS_SET(a,b) (((a) & (b)) == (b))
-#define XP_FRAME_ATTR_IS_CLICKED(a,m) ((a) & ((m) << 3))
-#define XP_FRAME_ATTR_SET_CLICKED(a,m) ((a) |= ((m) << 3))
-#define XP_FRAME_ATTR_UNSET_CLICKED(a,m) ((a) &= ~((m) << 3))
-
-#define XP_FRAME_POINTER_ATTRS (XP_FRAME_PRELIGHT \
- | XP_FRAME_ANY_BUTTON \
- | XP_FRAME_ANY_CLICKED)
-
-extern xp_error xp_frame_get_rect (int type, int class, const xp_box *outer,
- const xp_box *inner, xp_box *ret);
-extern xp_error xp_frame_hit_test (int class, int x, int y,
- const xp_box *outer,
- const xp_box *inner, int *ret);
-extern xp_error xp_frame_draw (xp_window_id wid, int class, unsigned int attr,
- const xp_box *outer, const xp_box *inner,
- unsigned int title_len,
- const unsigned char *title_bytes);
-
-
-
-/* Memory manipulation functions. */
-
-enum xp_composite_op_enum {
- XP_COMPOSITE_SRC = 0,
- XP_COMPOSITE_OVER,
-};
-
-#define XP_COMPOSITE_FUNCTION(op, src_depth, mask_depth, dest_depth) \
- (((op) << 24) | ((src_depth) << 16) \
- | ((mask_depth) << 8) | ((dest_depth) << 0))
-
-#define XP_COMPOSITE_FUNCTION_OP(f) (((f) >> 24) & 255)
-#define XP_COMPOSITE_FUNCTION_SRC_DEPTH(f) (((f) >> 16) & 255)
-#define XP_COMPOSITE_FUNCTION_MASK_DEPTH(f) (((f) >> 8) & 255)
-#define XP_COMPOSITE_FUNCTION_DEST_DEPTH(f) (((f) >> 0) & 255)
-
-/* Composite WIDTH by HEIGHT pixels from source and mask to destination
- using a specified function (if source and destination overlap,
- undefined behavior results).
-
- For SRC and DEST, the first element of the array is the color data. If
- the second element is non-null it implies that there is alpha data
- (which may be meshed or planar). Data without alpha is assumed to be
- opaque.
-
- Passing a null SRC-ROWBYTES pointer implies that the data SRC points
- to is a single element.
-
- Operations that are not supported will return XP_BadImplementation. */
-
-extern xp_error xp_composite_pixels (unsigned int width, unsigned int height,
- unsigned int function,
- void *src[2], unsigned int src_rowbytes[2],
- void *mask, unsigned int mask_rowbytes,
- void *dest[2], unsigned int dest_rowbytes[2]);
-
-/* Fill HEIGHT rows of data starting at DST. Each row will have WIDTH
- bytes filled with the 32-bit pattern VALUE. Each row is DST-ROWBYTES
- wide in total. */
-
-extern void xp_fill_bytes (unsigned int width,
- unsigned int height, uint32_t value,
- void *dst, unsigned int dst_rowbytes);
-
-/* Copy HEIGHT rows of bytes from SRC to DST. Each row will have WIDTH
- bytes copied. SRC and DST may overlap, and the right thing will happen. */
-
-extern void xp_copy_bytes (unsigned int width, unsigned int height,
- const void *src, unsigned int src_rowbytes,
- void *dst, unsigned int dst_rowbytes);
-
-/* Suggestions for the minimum number of bytes or pixels for which it
- makes sense to use some of the xp_ functions */
-
-extern unsigned int xp_fill_bytes_threshold, xp_copy_bytes_threshold,
- xp_composite_area_threshold, xp_scroll_area_threshold;
-
-
-#endif /* XPLUGIN_H */
diff --git a/hw/darwin/utils/Makefile.am b/hw/darwin/utils/Makefile.am
deleted file mode 100644
index 11a26111e..000000000
--- a/hw/darwin/utils/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-bin_PROGRAMS = dumpkeymap
-
-dumpkeymap_SOURCES = dumpkeymap.c
-
-dumpkeymap_LDFLAGS = -Wl,-framework,IOKit
-
-man1_MANS = dumpkeymap.man
-
-EXTRA_DIST = \
- README.txt \
- dumpkeymap.man
diff --git a/hw/darwin/utils/README.txt b/hw/darwin/utils/README.txt
deleted file mode 100644
index fb6d4399e..000000000
--- a/hw/darwin/utils/README.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-dumpkeymap - Diagnostic dump and detailed description of .keymapping files
-Version 4
-
-Copyright (C)1999,2000 by Eric Sunshine <sunshine@sunshineco.com>
-Eric Sunshine, 1 December 2000
-
-OVERVIEW
-========
-This package contains the diagnostic utility dumpkeymap, as well as highly
-detailed documentation describing the internal layout of the Apple/NeXT
-.keymapping file.
-
-The dumpkeymap utility displays detailed information about each .keymapping
-file mentioned on the command-line. On Apple and NeXT platforms, if no
-.keymapping files are mentioned on the command-line, then it will instead
-dissect the key mapping currently in use by the WindowServer and AppKit.
-
-Documentation includes a thorough and detailed description of the internal
-layout of the .keymapping file, as well as an explanation of how to interpret
-the output of dumpkeymap.
-
-The complete set of documentation is available for perusal via dumpkeymap's
-manual page (dumpkeymap.1), as well as via the command-line options described
-below.
-
- --help
- Usage summary.
- --help-keymapping
- Detailed discussion of the internal format of a .keymapping file.
- --help-output
- Explanation of dumpkeymap's output.
- --help-files
- List of key mapping-related files and directories.
- --help-diagnostics
- Explanation of diagnostic messages.
-
-Once the manual page is been installed, documentation can also be accessed
-with the Unix `man' command:
-
- % man dumpkeymap
-
-
-COMPILATION
-===========
-MacOS/X, Darwin
-
- cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit
-
-MacOS/X DP4 (Developer Preview 4)
-
- cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit
-
-MacOS/X Server, OpenStep, NextStep
-
- cc -Wall -o dumpkeymap dumpkeymap.c
-
-By default, dumpkeymap is configured to interface with the HID driver (Apple)
-or event-status driver (NeXT), thus allowing it to dump the key mapping which
-is currently in use by the WindowServer and AppKit. However, these facilities
-are specific to Apple/NeXT. In order to build dumpkeymap for non-Apple/NeXT
-platforms, you must define the DUMPKEYMAP_FILE_ONLY flag when compiling the
-program. This flag inhibits use of the HID and event-status drivers and
-configures dumpkeymap to work strictly with raw key mapping files.
-
-For example, to compile for Linux:
-
- gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c
-
-
-INSTALLATION
-============
-Install the dumpkeymap executable image in a location mentioned in the PATH
-environment variable. Typicall locations for executable files are:
-
- /usr/local/bin
- $(HOME)/bin
-
-Install the manual page, dumpkeymap.1, in the `man1' subdirectory one of the
-standard manual page locations or in any other location mentioned by the
-MANPATH environment variable.
-
-Typical locations for manual pages on most Unix platforms are:
-
- /usr/local/man/man1
-
-Typical locations for manual pages on MacOS/X, Darwin, and MacOS/X Server are:
-
- /usr/local/man/man1
- /Local/Documentation/ManPages/man1
- /Network/Documentation/ManPages/man1
-
-Typical locations for manual pages on OpenStep and NextStep are:
-
- /usr/local/man/man1
- /LocalLibrary/Documentation/ManPages/man1
- /LocalDeveloper/Documentation/ManPages/man1
-
-
-CONCLUSION
-==========
-This program and its accompanying documentation were written by Eric Sunshine
-and are copyright (C)1999,2000 by Eric Sunshine <sunshine@sunshineco.com>.
-
-The implementation of dumpkeymap is based upon information gathered on
-September 3, 1997 by Eric Sunshine <sunshine@sunshineco.com> and Paul S.
-McCarthy <zarnuk@zarnuk.com> during an effort to reverse engineer the format
-of the NeXT .keymapping file.
-
-
-
-$XFree86: xc/programs/Xserver/hw/darwin/utils/README.txt,v 1.1 2000/12/01 19:47:39 dawes Exp $
diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c
deleted file mode 100644
index 0c8bdcd01..000000000
--- a/hw/darwin/utils/dumpkeymap.c
+++ /dev/null
@@ -1,1453 +0,0 @@
-//=============================================================================
-//
-// Copyright (C) 1999,2000 by Eric Sunshine <sunshine@sunshineco.com>
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
-// NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//=============================================================================
-//-----------------------------------------------------------------------------
-// dumpkeymap.c
-//
-// Prints a textual representation of each Apple/NeXT .keymapping file
-// mentioned on the command-line. If no files are mentioned and if the
-// local machine is an Apple or NeXT installation, then the key mapping
-// currently in use by the WindowServer and the AppKit is printed
-// instead.
-//
-// Invoke dumpkeymap with one of the options listed below in order to
-// view detailed documentation about .keymapping files and the use of
-// this program.
-//
-// --help: Usage summary.
-// --help-keymapping: Detailed discussion of the internal format of a
-// .keymapping file.
-// --help-output: Explanation of dumpkeymap's output.
-// --help-files: List of key mapping-related files and directories.
-// --help-diagnostics: Explanation of diagnostic messages.
-//
-// COMPILATION INSTRUCTIONS
-//
-// MacOS/X, Darwin
-// cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit
-//
-// MacOS/X DP4 (Developer Preview 4)
-// cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit
-//
-// MacOS/X Server, OpenStep, NextStep
-// cc -Wall -o dumpkeymap dumpkeymap.c
-//
-// By default, dumpkeymap is configured to interface with the HID driver
-// (Apple) or event-status driver (NeXT), thus allowing it to dump the
-// key mapping which is currently in use by the WindowServer and AppKit.
-// However, these facilities are specific to Apple/NeXT. In order to
-// build dumpkeymap for non-Apple/NeXT platforms, you must define the
-// DUMPKEYMAP_FILE_ONLY flag when compiling the program. This flag
-// inhibits use of the HID and event-status drivers and configures
-// dumpkeymap to work strictly with raw key mapping files.
-//
-// For example, to compile for Linux:
-// gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c
-//
-// CONCLUSION
-//
-// This program and its accompanying documentation were written by Eric
-// Sunshine and are copyright (C)1999,2000 by Eric Sunshine
-// <sunshine@sunshineco.com>.
-//
-// The implementation of dumpkeymap is based upon information gathered
-// on September 3, 1997 by Eric Sunshine <sunshine@sunshineco.com> and
-// Paul S. McCarthy <zarnuk@zarnuk.com> during an effort to reverse
-// engineer the format of the NeXT .keymapping file.
-//
-// HISTORY
-//
-// v4 2000/12/01 Eric Sunshine <sunshine@sunshineco.com>
-// Updated manual page to work with `rman', the `man' to `HTML'
-// translator. Unfortunately, however, rman is missing important
-// roff features such as diversions, indentation, and tab stops,
-// and is also hideously buggy, so getting the manual to work with
-// rman required quite a few work-arounds.
-// The manual page has now been tested with nroff (plain text), troff
-// (PostScript, etc.), groff (PostScript), and rman (HTML, etc.)
-//
-// v3 2000/11/28 Eric Sunshine <sunshine@sunshineco.com>
-// Considerably expanded the documentation.
-// Augmented the existing description of .keymapping internals.
-// Added these new documentation topics:
-// - Output: Very important section describing how to interpret
-// the output of dumpkeymap.
-// - Files: Lists files and directories related to key mappings.
-// - Diagnostics: Explains diagnostic messages issued by
-// dumpkeymap.
-// Created a manual page (dumpkeymap.1) which contains the complete
-// set of documentation for key mapping files and dumpkeymap.
-// Added command-line options (--help, --help-keymapping,
-// --help-output, --help-files, --help-diagnostics) which allow
-// access to all key mapping documentation. Previously the
-// description of the internal layout of a .keymapping file was
-// only available as source code comments.
-// Added --version option.
-// Ported to non-Apple/NeXT platforms. Defining the pre-processor
-// flag DUMPKEYMAP_FILE_ONLY at compilation time inhibits use of
-// Apple/NeXT-specific API.
-// Added a README file.
-//
-// v2 2000/11/13 Eric Sunshine <sunshine@sunshineco.com>
-// Converted from C++ to plain-C.
-// Now parses and takes into account the "number-size" flag stored
-// with each key map. This flag indicates the size, in bytes, of
-// all remaining numeric values in the mapping. Updated all code
-// to respect this flag. (Previously, the purpose of this field
-// was unknown, and it was thus denoted as
-// `KeyMapping::fill[2]'.)
-// Updated all documentation; especially the "KEY MAPPING
-// DESCRIPTION" section. Added discussion of the "number-size"
-// flag and revamped all structure definitions to use the generic
-// data type `number' instead of `uchar' or 'byte'. Clarified
-// several sections of the documentation and added missing
-// discussions about type definitions and the relationship of
-// `interface' and `handler_id' to .keymapping and .keyboard
-// files.
-// Updated compilation instructions to include directions for all
-// platforms on which this program might be built.
-// Now published under the formal BSD license rather than a
-// home-grown license.
-//
-// v1 1999/09/08 Eric Sunshine <sunshine@sunshineco.com>
-// Created.
-//-----------------------------------------------------------------------------
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#if !defined(DUMPKEYMAP_FILE_ONLY)
-#include <IOKit/hidsystem/event_status_driver.h>
-#endif
-
-#define PROG_NAME "dumpkeymap"
-#define PROG_VERSION "4"
-#define AUTHOR_NAME "Eric Sunshine"
-#define AUTHOR_EMAIL "sunshine@sunshineco.com"
-#define AUTHOR_INFO AUTHOR_NAME " <" AUTHOR_EMAIL ">"
-#define COPYRIGHT "Copyright (C) 1999,2000 by " AUTHOR_INFO
-
-typedef unsigned char byte;
-typedef unsigned short word;
-typedef unsigned int natural;
-typedef unsigned long dword;
-typedef dword number;
-
-#define ASCII_SET 0x00
-#define BIND_FUNCTION 0xfe
-#define BIND_SPECIAL 0xff
-
-#define OPT_SWITCH(X) { char const* switched_str__=(X); if (0) {
-#define OPT_CASE(X,Y) } else if (strcmp(switched_str__,(#X)) == 0 || \
- strcmp(switched_str__,(#Y)) == 0) {
-#define OPT_DEFAULT } else {
-#define OPT_SWITCH_END }}
-
-//-----------------------------------------------------------------------------
-// Translation Tables
-//-----------------------------------------------------------------------------
-static char const* const SPECIAL_CODE[] =
- {
- "sound-up",
- "sound-down",
- "brightness-up",
- "brightness-down",
- "alpha-lock",
- "help",
- "power",
- "secondary-up-arrow",
- "secondary-down-arrow"
- };
-#define N_SPECIAL_CODE (sizeof(SPECIAL_CODE) / sizeof(SPECIAL_CODE[0]))
-
-static char const* const MODIFIER_CODE[] =
- {
- "alpha-lock",
- "shift",
- "control",
- "alternate",
- "command",
- "keypad",
- "help"
- };
-#define N_MODIFIER_CODE (sizeof(MODIFIER_CODE) / sizeof(MODIFIER_CODE[0]))
-
-static char const* const MODIFIER_MASK[] =
- {
- "-----", // R = carriage-return
- "----L", // A = alternate
- "---S-", // C = control
- "---SL", // S = shift
- "--C--", // L = alpha-lock
- "--C-L",
- "--CS-",
- "--CSL",
- "-A---",
- "-A--L",
- "-A-S-",
- "-A-SL",
- "-AC--",
- "-AC-L",
- "-ACS-",
- "-ACSL",
- "R----",
- "R---L",
- "R--S-",
- "R--SL",
- "R-C--",
- "R-C-L",
- "R-CS-",
- "R-CSL",
- "RA---",
- "RA--L",
- "RA-S-",
- "RA-SL",
- "RAC--",
- "RAC-L",
- "RACS-",
- "RACSL",
- };
-#define N_MODIFIER_MASK (sizeof(MODIFIER_MASK) / sizeof(MODIFIER_MASK[0]))
-
-#define FUNCTION_KEY_FIRST 0x20
-static char const* const FUNCTION_KEY[] =
- {
- "F1", // 0x20
- "F2", // 0x21
- "F3", // 0x22
- "F4", // 0x23
- "F5", // 0x24
- "F6", // 0x25
- "F7", // 0x26
- "F8", // 0x27
- "F9", // 0x28
- "F10", // 0x29
- "F11", // 0x2a
- "F12", // 0x2b
- "insert", // 0x2c
- "delete", // 0x2d
- "home", // 0x2e
- "end", // 0x2f
- "page up", // 0x30
- "page down", // 0x31
- "print screen", // 0x32
- "scroll lock", // 0x33
- "pause", // 0x34
- "sys-request", // 0x35
- "break", // 0x36
- "reset (HIL)", // 0x37
- "stop (HIL)", // 0x38
- "menu (HIL)", // 0x39
- "user (HIL)", // 0x3a
- "system (HIL)", // 0x3b
- "print (HIL)", // 0x3c
- "clear line (HIL)", // 0x3d
- "clear display (HIL)", // 0x3e
- "insert line (HIL)", // 0x3f
- "delete line (HIL)", // 0x40
- "insert char (HIL)", // 0x41
- "delete char (HIL)", // 0x42
- "prev (HIL)", // 0x43
- "next (HIL)", // 0x44
- "select (HIL)", // 0x45
- };
-#define N_FUNCTION_KEY (sizeof(FUNCTION_KEY) / sizeof(FUNCTION_KEY[0]))
-
-
-//-----------------------------------------------------------------------------
-// Data Stream Object
-// Can be configured to treat embedded "numbers" as being composed of
-// either 1, 2, or 4 bytes, apiece.
-//-----------------------------------------------------------------------------
-typedef struct _DataStream
- {
- byte const* data;
- byte const* data_end;
- natural number_size; // Size in bytes of a "number" in the stream.
- } DataStream;
-
-static DataStream* new_data_stream( byte const* data, int size )
- {
- DataStream* s = (DataStream*)malloc( sizeof(DataStream) );
- s->data = data;
- s->data_end = data + size;
- s->number_size = 1; // Default to byte-sized numbers.
- return s;
- }
-
-static void destroy_data_stream( DataStream* s )
- {
- free(s);
- }
-
-static int end_of_stream( DataStream* s )
- {
- return (s->data >= s->data_end);
- }
-
-static void expect_nbytes( DataStream* s, int nbytes )
- {
- if (s->data + nbytes > s->data_end)
- {
- fputs( "Insufficient data in keymapping data stream.\n", stderr );
- exit(-1);
- }
- }
-
-static byte get_byte( DataStream* s )
- {
- expect_nbytes( s, 1 );
- return *s->data++;
- }
-
-static word get_word( DataStream* s )
- {
- word hi, lo;
- expect_nbytes( s, 2 );
- hi = *s->data++;
- lo = *s->data++;
- return ((hi << 8) | lo);
- }
-
-static dword get_dword( DataStream* s )
- {
- dword b1, b2, b3, b4;
- expect_nbytes( s, 4 );
- b4 = *s->data++;
- b3 = *s->data++;
- b2 = *s->data++;
- b1 = *s->data++;
- return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
- }
-
-static number get_number( DataStream* s )
- {
- switch (s->number_size)
- {
- case 4: return get_dword(s);
- case 2: return get_word(s);
- default: return get_byte(s);
- }
- }
-
-
-//-----------------------------------------------------------------------------
-// Translation Utility Functions
-//-----------------------------------------------------------------------------
-static char const* special_code_desc( number n )
- {
- if (n < N_SPECIAL_CODE)
- return SPECIAL_CODE[n];
- else
- return "invalid";
- }
-
-static char const* modifier_code_desc( number n )
- {
- if (n < N_MODIFIER_CODE)
- return MODIFIER_CODE[n];
- else
- return "invalid";
- }
-
-static char const* modifier_mask_desc( number n )
- {
- if (n < N_MODIFIER_MASK)
- return MODIFIER_MASK[n];
- else
- return "?????";
- }
-
-static char const* function_key_desc( number n )
- {
- if (n >= FUNCTION_KEY_FIRST && n < N_FUNCTION_KEY + FUNCTION_KEY_FIRST)
- return FUNCTION_KEY[ n - FUNCTION_KEY_FIRST ];
- else
- return "unknown";
- }
-
-static number bits_set( number mask )
- {
- number n = 0;
- for ( ; mask != 0; mask >>= 1)
- if ((mask & 0x01) != 0)
- n++;
- return n;
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a list of Modifier records.
-//-----------------------------------------------------------------------------
-static void unparse_modifiers( DataStream* s )
- {
- number nmod = get_number(s); // Modifier count
- printf( "MODIFIERS [%lu]\n", nmod );
- while (nmod-- > 0)
- {
- number nscan;
- number const code = get_number(s);
- printf( "%s:", modifier_code_desc(code) );
- nscan = get_number(s);
- while (nscan-- > 0)
- printf( " 0x%02x", (natural)get_number(s) );
- putchar( '\n' );
- }
- putchar( '\n' );
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a list of Character records.
-//-----------------------------------------------------------------------------
-typedef void (*UnparseSpecialFunc)( number code );
-
-static void unparse_char_codes(
- DataStream* s, number ncodes, UnparseSpecialFunc unparse_special )
- {
- if (ncodes != 0)
- {
- while (ncodes-- > 0)
- {
- number const char_set = get_number(s);
- number const code = get_number(s);
- putchar(' ');
- switch (char_set)
- {
- case ASCII_SET:
- {
- int const c = (int)code;
- if (isprint(c))
- printf( "\"%c\"", c );
- else if (code < ' ')
- printf( "\"^%c\"", c + '@' );
- else
- printf( "%02x", c );
- break;
- }
- case BIND_FUNCTION:
- printf( "[%s]", function_key_desc(code) );
- break;
- case BIND_SPECIAL:
- unparse_special( code );
- break;
- default:
- printf( "%02x/%02x", (natural)char_set, (natural)code );
- break;
- }
- }
- }
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a list of scan code bindings.
-//-----------------------------------------------------------------------------
-static void unparse_key_special( number code )
- {
- printf( "{seq#%lu}", code );
- }
-
-static void unparse_characters( DataStream* s )
- {
- number const NOT_BOUND = 0xff;
- number const nscans = get_number(s);
- number scan;
- printf( "CHARACTERS [%lu]\n", nscans );
- for (scan = 0; scan < nscans; scan++)
- {
- number const mask = get_number(s);
- printf( "scan 0x%02x: ", (natural)scan );
- if (mask == NOT_BOUND)
- fputs( "not-bound\n", stdout );
- else
- {
- number const bits = bits_set( mask );
- number const codes = 1 << bits;
- printf( "%s ", modifier_mask_desc(mask) );
- unparse_char_codes( s, codes, unparse_key_special );
- putchar( '\n' );
- }
- }
- putchar( '\n' );
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a list of key sequences.
-//-----------------------------------------------------------------------------
-static void unparse_sequence_special( number code )
- {
- printf( "{%s}", (code == 0 ? "unmodify" : modifier_code_desc(code)) );
- }
-
-static void unparse_sequences( DataStream* s )
- {
- number const nseqs = get_number(s);
- number seq;
- printf( "SEQUENCES [%lu]\n", nseqs );
- for (seq = 0; seq < nseqs; seq++)
- {
- number const nchars = get_number(s);
- printf( "sequence %lu:", seq );
- unparse_char_codes( s, nchars, unparse_sequence_special );
- putchar( '\n' );
- }
- putchar( '\n' );
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a list of special keys.
-//-----------------------------------------------------------------------------
-static void unparse_specials( DataStream* s )
- {
- number nspecials = get_number(s);
- printf( "SPECIALS [%lu]\n", nspecials );
- while (nspecials-- > 0)
- {
- number const special = get_number(s);
- number const scan = get_number(s);
- printf( "%s: 0x%02x\n", special_code_desc(special), (natural)scan );
- }
- putchar( '\n' );
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse the number-size flag.
-//-----------------------------------------------------------------------------
-static void unparse_numeric_size( DataStream* s )
- {
- word const numbers_are_shorts = get_word(s);
- s->number_size = numbers_are_shorts ? 2 : 1;
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse an entire key map.
-//-----------------------------------------------------------------------------
-static void unparse_keymap_data( DataStream* s )
- {
- unparse_numeric_size(s);
- unparse_modifiers(s);
- unparse_characters(s);
- unparse_sequences(s);
- unparse_specials(s);
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse the active key map.
-//-----------------------------------------------------------------------------
-#if !defined(DUMPKEYMAP_FILE_ONLY)
-static int unparse_active_keymap( void )
- {
- int rc = 1;
- NXEventHandle const h = NXOpenEventStatus();
- if (h == 0)
- fputs( "Unable to open event status driver.\n", stderr );
- else
- {
- NXKeyMapping km;
- km.size = NXKeyMappingLength(h);
- if (km.size <= 0)
- fprintf( stderr, "Bad key mapping length (%d).\n", km.size );
- else
- {
- km.mapping = (char*)malloc( km.size );
- if (NXGetKeyMapping( h, &km ) == 0)
- fputs( "Unable to get current key mapping.\n", stderr );
- else
- {
- DataStream* stream =
- new_data_stream( (byte const*)km.mapping, km.size );
- fputs( "=============\nACTIVE KEYMAP\n=============\n\n",
- stdout);
- unparse_keymap_data( stream );
- destroy_data_stream( stream );
- rc = 0;
- }
- free( km.mapping );
- }
- NXCloseEventStatus(h);
- }
- return rc;
- }
-#endif
-
-
-//-----------------------------------------------------------------------------
-// Unparse one key map from a keymapping file.
-//-----------------------------------------------------------------------------
-static void unparse_keymap( DataStream* s )
- {
- dword const interface = get_dword(s);
- dword const handler_id = get_dword(s);
- dword const map_size = get_dword(s);
- printf( "interface: 0x%02lx\nhandler_id: 0x%02lx\nmap_size: %lu bytes\n\n",
- interface, handler_id, map_size );
- unparse_keymap_data(s);
- }
-
-
-//-----------------------------------------------------------------------------
-// Check the magic number of a keymapping file.
-//-----------------------------------------------------------------------------
-static int check_magic_number( DataStream* s )
- {
- return (get_byte(s) == 'K' &&
- get_byte(s) == 'Y' &&
- get_byte(s) == 'M' &&
- get_byte(s) == '1');
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse all key maps within a keymapping file.
-//-----------------------------------------------------------------------------
-static int unparse_keymaps( DataStream* s )
- {
- int rc = 0;
- if (check_magic_number(s))
- {
- int n = 1;
- while (!end_of_stream(s))
- {
- printf( "---------\nKEYMAP #%d\n---------\n", n++ );
- unparse_keymap(s);
- }
- }
- else
- {
- fputs( "Bad magic number.\n", stderr );
- rc = 1;
- }
- return rc;
- }
-
-
-//-----------------------------------------------------------------------------
-// Unparse a keymapping file.
-//-----------------------------------------------------------------------------
-static int unparse_keymap_file( char const* const path )
- {
- int rc = 1;
- FILE* file;
- printf( "===========\nKEYMAP FILE\n===========\n%s\n\n", path );
- file = fopen( path, "rb" );
- if (file == 0)
- perror( "Unable to open key mapping file" );
- else
- {
- struct stat st;
- if (fstat( fileno(file), &st ) != 0)
- perror( "Unable to determine key mapping file size" );
- else
- {
- byte* buffer = (byte*)malloc( st.st_size );
- if (fread( buffer, st.st_size, 1, file ) != 1)
- perror( "Unable to read key mapping file" );
- else
- {
- DataStream* stream = new_data_stream(buffer, (int)st.st_size);
- fclose( file ); file = 0;
- rc = unparse_keymaps( stream );
- destroy_data_stream( stream );
- }
- free( buffer );
- }
- if (file != 0)
- fclose( file );
- }
- return rc;
- }
-
-
-//-----------------------------------------------------------------------------
-// Handle the case when no documents are mentioned on the command-line. For
-// Apple/NeXT platforms, dump the currently active key mapping; else display
-// an error message.
-//-----------------------------------------------------------------------------
-static int handle_empty_document_list( void )
- {
-#if !defined(DUMPKEYMAP_FILE_ONLY)
- return unparse_active_keymap();
-#else
- fputs( "ERROR: Must specify at least one .keymapping file.\n\n", stderr );
- return 1;
-#endif
- }
-
-
-//-----------------------------------------------------------------------------
-// Print a detailed description of the internal layout of a key mapping.
-//-----------------------------------------------------------------------------
-static void print_internal_layout_info( FILE* f )
- {
- fputs(
-"What follows is a detailed descriptions of the internal layout of an\n"
-"Apple/NeXT .keymapping file.\n"
-"\n"
-"Types and Data\n"
-"--------------\n"
-"The following type definitions are employed throughout this discussion:\n"
-"\n"
-" typedef unsigned char byte;\n"
-" typedef unsigned short word;\n"
-" typedef unsigned long dword;\n"
-"\n"
-"Additionally, the type definition `number' is used generically to indicate\n"
-"a numeric value. The actual size of the `number' type may be one or two\n"
-"bytes depending upon how the data is stored in the key map. Although most\n"
-"key maps use byte-sized numeric values, word-sized values are also allowed.\n"
-"\n"
-"Multi-byte values in a key mapping file are stored in big-endian byte\n"
-"order.\n"
-"\n"
-"Key Mapping File and Device Mapping\n"
-"-----------------------------------\n"
-"A key mapping file begins with a magic-number and continues with a variable\n"
-"number of device-specific key mappings.\n"
-"\n"
-" struct KeyMappingFile {\n"
-" char magic_number[4]; // `KYM1'\n"
-" DeviceMapping maps[...]; // Variable number of maps\n"
-" };\n"
-"\n"
-" struct DeviceMapping {\n"
-" dword interface; // Interface type\n"
-" dword handler_id; // Interface subtype\n"
-" dword map_size; // Byte count of `map' (below)\n"
-" KeyMapping map;\n"
-" };\n"
-"\n"
-"The value of `interface' represents a family of keyboard device types\n"
-"(such as Intel PC, ADB, NeXT, Sun Type5, etc.), and is generally\n"
-"specified as one of the constant values NX_EVS_DEVICE_INTERFACE_ADB,\n"
-"NX_EVS_DEVICE_INTERFACE_ACE, etc., which are are defined in IOHIDTypes.h on\n"
-"MacOS/X and Darwin, and in ev_types.h on MacOS/X Server, OpenStep, and\n"
-"NextStep.\n"
-"\n"
-"The value of `handler_id' represents a specific keyboard layout within the\n"
-"much broader `interface' family. For instance, for a 101-key Intel PC\n"
-"keyboard (of type NX_EVS_DEVICE_INTERFACE_ACE) the `handler_id' is '0',\n"
-"whereas for a 102-key keyboard it is `1'.\n"
-"\n"
-"Together, `interface' and `handler_id' identify the exact keyboard hardware\n"
-"to which this mapping applies. Programs which display a visual\n"
-"representation of a keyboard layout, match `interface' and `handler_id'\n"
-"from the .keymapping file against the `interface' and `handler_id' values\n"
-"found in each .keyboard file.\n"
-"\n"
-"Key Mapping\n"
-"-----------\n"
-"A key mapping completely defines the relationship of all scan codes with\n"
-"their associated functionality. A KeyMapping structure is embedded within\n"
-"the DeviceMapping structure in a KeyMappingFile. The key mapping currently\n"
-"in use by the WindowServer and AppKit is also represented by a KeyMapping\n"
-"structure, and can be referred to directly by calling NXGetKeyMapping() and\n"
-"accessing the `mapping' data member of the returned NXKeyMapping structure.\n"
-"\n"
-" struct KeyMapping {\n"
-" word number_size; // 0=1 byte, non-zero=2 bytes\n"
-" number num_modifier_groups; // Modifier groups\n"
-" ModifierGroup modifier_groups[...];\n"
-" number num_scan_codes; // Scan groups\n"
-" ScanGroup scan_table[...];\n"
-" number num_sequence_lists; // Sequence lists\n"
-" Sequence sequence_lists[...];\n"
-" number num_special_keys; // Special keys\n"
-" SpecialKey special_key[...];\n"
-" };\n"
-"\n"
-"The `number_size' flag determines the size, in bytes, of all remaining\n"
-"numeric values (denoted by the type definition `number') within the key\n"
-"mapping. If its value is zero, then numbers are represented by a single\n"
-"byte. If it is non-zero, then numbers are represented by a word (two\n"
-"bytes).\n"
-"\n"
-"Modifier Group\n"
-"--------------\n"
-"A modifier group defines all scan codes which map to a particular type of\n"
-"modifier, such as `shift', `control', etc.\n"
-"\n"
-" enum Modifier {\n"
-" ALPHALOCK = 0,\n"
-" SHIFT,\n"
-" CONTROL,\n"
-" ALTERNATE,\n"
-" COMMAND,\n"
-" KEYPAD,\n"
-" HELP\n"
-" };\n"
-"\n"
-" struct ModifierGroup {\n"
-" number modifier; // A Modifier constant\n"
-" number num_scan_codes;\n"
-" number scan_codes[...]; // Variable number of scan codes\n"
-" };\n"
-"\n"
-"The scan_codes[] array contains a list of all scan codes which map to the\n"
-"specified modifier. The `shift', `command', and `alternate' modifiers are\n"
-"frequently mapped to two different scan codes, apiece, since these\n"
-"modifiers often appear on both the left and right sides of the keyboard.\n"
-"\n"
-"Scan Group\n"
-"----------\n"
-"There is one ScanGroup for each scan code generated by the given keyboard.\n"
-"This number is given by KeyMapping::num_scan_codes. The first scan group\n"
-"represents hardware scan code 0, the second represents scan code 1, etc.\n"
-"\n"
-" enum ModifierMask {\n"
-" ALPHALOCK_MASK = 1 << 0,\n"
-" SHIFT_MASK = 1 << 1,\n"
-" CONTROL_MASK = 1 << 2,\n"
-" ALTERNATE_MASK = 1 << 3,\n"
-" CARRIAGE_RETURN_MASK = 1 << 4\n"
-" };\n"
-" #define NOT_BOUND 0xff\n"
-"\n"
-" struct ScanGroup {\n"
-" number mask;\n"
-" Character characters[...];\n"
-" };\n"
-"\n"
-"For each scan code, `mask' defines which modifier combinations generate\n"
-"characters. If `mask' is NOT_BOUND (0xff) then then this scan code does\n"
-"not generate any characters ever, and its characters[] array is zero\n"
-"length. Otherwise, the characters[] array contains one Character record\n"
-"for each modifier combination.\n"
-"\n"
-"The number of records in characters[] is determined by computing (1 <<\n"
-"bits_set_in_mask). In other words, if mask is zero, then zero bits are\n"
-"set, so characters[] contains only one record. If `mask' is (SHIFT_MASK |\n"
-"CONTROL_MASK), then two bits are set, so characters[] contains four\n"
-"records.\n"
-"\n"
-"The first record always represents the character which is generated by that\n"
-"key when no modifiers are active. The remaining records represent\n"
-"characters generated by the various modifier combinations. Using the\n"
-"example with the `shift' and `control' masks set, record two would\n"
-"represent the character with the `shift' modifier active; record three, the\n"
-"`control' modifier active; and record four, both the `shift' and `control'\n"
-"modifiers active.\n"
-"\n"
-"As a special case, ALPHALOCK_MASK implies SHIFT_MASK, though only\n"
-"ALPHALOCK_MASK appears in `mask'. In this case the same character is\n"
-"generated for both the `shift' and `alpha-lock' modifiers, but only needs\n"
-"to appear once in the characters[] array.\n"
-"\n"
-"CARRIAGE_RETURN_MASK does not actually refer to a modifier key. Instead,\n"
-"it is used to distinguish the scan code which is given the special\n"
-"pseudo-designation of `carriage return' key. Typically, this mask appears\n"
-"solo in a ScanGroup record and only the two Character records for control-M\n"
-"and control-C follow. This flag may be a throwback to an earlier time or\n"
-"may be specially interpreted by the low-level keyboard driver, but its\n"
-"purpose is otherwise enigmatic.\n"
-"Character\n"
-"---------\n"
-"Each Character record indicates the character generated when this key is\n"
-"pressed, as well as the character set which contains the character. Well\n"
-"known character sets are `ASCII' and `Symbol'. The character set can also\n"
-"be one of the meta values FUNCTION_KEY or KEY_SEQUENCE. If it is\n"
-"FUNCTION_KEY then `char_code' represents a generally well-known function\n"
-"key such as those enumerated by FunctionKey. If the character set is\n"
-"KEY_SEQUENCE then `char_code' represents a zero-base index into\n"
-"KeyMapping::sequence_lists[].\n"
-"\n"
-" enum CharacterSet {\n"
-" ASCII = 0x00,\n"
-" SYMBOL = 0x01,\n"
-" ...\n"
-" FUNCTION_KEY = 0xfe,\n"
-" KEY_SEQUENCE = 0xff\n"
-" };\n"
-"\n"
-" struct Character {\n"
-" number set; // CharacterSet of generated character\n"
-" number char_code; // Actual character generated\n"
-" };\n"
-"\n"
-" enum FunctionKey {\n"
-" F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\n"
-" INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,\n"
-" SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU, USER,\n"
-" SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,\n"
-" DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT\n"
-" };\n"
-"\n"
-"Sequence\n"
-"--------\n"
-"When Character::set contains the meta value KEY_SEQUENCE, the scan code is\n"
-"bound to a sequence of keys rather than a single character. A sequence is\n"
-"a series of modifiers and characters which are automatically generated when\n"
-"the associated key is depressed.\n"
-"\n"
-" #define MODIFIER_KEY 0xff\n"
-"\n"
-" struct Sequence {\n"
-" number num_chars;\n"
-" Character characters[...];\n"
-" };\n"
-"\n"
-"Each generated Character is represented as previously described, with the\n"
-"exception that MODIFIER_KEY may appear in place of KEY_SEQUENCE. When the\n"
-"value of Character::set is MODIFIER_KEY then Character::char_code\n"
-"represents a modifier key rather than an actual character. If the modifier\n"
-"represented by `char_code' is non-zero, then it indicates that the\n"
-"associated modifier key has been depressed. In this case, the value is one\n"
-"of the constants enumerated by Modifier (SHIFT, CONTROL, ALTERNATE, etc.).\n"
-"If the value is zero then it means that the modifier keys have been\n"
-"released.\n"
-"\n"
-"Special Key\n"
-"-----------\n"
-"A special key is one which is scanned directly by the Mach kernel rather\n"
-"than by the WindowServer. In general, events are not generated for special\n"
-"keys.\n"
-"\n"
-" enum SpecialKeyType {\n"
-" VOLUME_UP = 0,\n"
-" VOLUME_DOWN,\n"
-" BRIGHTNESS_UP,\n"
-" BRIGHTNESS_DOWN,\n"
-" ALPHA_LOCK,\n"
-" HELP,\n"
-" POWER,\n"
-" SECONDARY_ARROW_UP,\n"
-" SECONDARY_ARROW_DOWN\n"
-" };\n"
-"\n"
-" struct SpecialKey {\n"
-" number type; // A SpecialKeyType constant\n"
-" number scan_code; // Actual scan code\n"
-" };\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print an explanation of the output generated by this program.
-//-----------------------------------------------------------------------------
-static void print_output_info( FILE* f )
- {
- fputs(
-"What follows is an explanation and description of the various pieces of\n"
-"information emitted by dumpkeymap.\n"
-"\n"
-"For a more thorough discussion of any particular piece of information\n"
-"described here, refer to the detailed description of the internal layout of\n"
-"a key mapping given by the --help-layout option.\n"
-"\n"
-"Conventions\n"
-"-----------\n"
-"Depending upon context, some numeric values are displayed in decimal\n"
-"notation, whereas others are displayed in hexadecimal notation.\n"
-"Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),\n"
-"except when explicitly noted otherwise.\n"
-"\n"
-"Key Mapping Source\n"
-"------------------\n"
-"The first piece of information presented about a particular key mapping is\n"
-"the source from which the data was gleaned. For a .keymapping file, the\n"
-"title `KEYMAP FILE' is emitted along with the path and name of the file in\n"
-"question. For the key mapping currently in use by the WindowServer and\n"
-"AppKit, the title `ACTIVE KEYMAP' is emitted instead.\n"
-"\n"
-"Device Information\n"
-"------------------\n"
-"Each .keymapping file may contain one or more raw key mappings. For\n"
-"example, a file which maps keys to a Dvorak-style layout might contain raw\n"
-"mappings for Intel PC, ADB, NeXT, and Sun Type5 keyboards.\n"
-"\n"
-"For each raw mapping, the following information is emitted:\n"
-"\n"
-" o The title `KEYMAP' along with the mapping's relative position in the\n"
-" .keymapping file.\n"
-" o The `interface' identifier.\n"
-" o The `handler_id' sub-identifier.\n"
-" o The size of the raw mapping resource counted in bytes.\n"
-"\n"
-"The `interface' and `handler_id' values, taken together, define a specific\n"
-"keyboard device. A .keyboard file, which describes the visual layout of a\n"
-"keyboard, also contains `interface' and `handler_id' identifiers. The\n"
-".keyboard file corresponding to a particular key mapping can be found by\n"
-"matching the `interface' and `handler_id' values from each resource.\n"
-"\n"
-"Modifiers\n"
-"---------\n"
-"Each mapping may contain zero or more modifier records which associate\n"
-"hardware scan codes with modifier descriptions such as `shift', `control',\n"
-"`alternate', etc. The title `MODIFIERS' is printed along with the count of\n"
-"modifier records which follow. For each modifier record, the modifier's\n"
-"name is printed along with a list of scan codes, in hexadecimal format,\n"
-"which generate that modifier value. For example:\n"
-"\n"
-" MODIFIERS [4]\n"
-" alternate: 0x1d 0x60\n"
-" control: 0x3a\n"
-" keypad: 0x52 0x53 ... 0x63 0x62\n"
-" shift: 0x2a 0x36\n"
-"\n"
-"Characters\n"
-"----------\n"
-"Each mapping may contain zero or more character records which associate\n"
-"hardware scan codes with the actual characters generated by those scan\n"
-"codes in the presence or absence of various modifier combinations. The\n"
-"title `CHARACTERS' is printed along with the count of character records\n"
-"which follow. Here is a highly abbreviated example:\n"
-"\n"
-" CHARACTERS [9]\n"
-" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n"
-" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n"
-" scan 0x0a: ---S- \"<\" \">\"\n"
-" scan 0x13: -ACS- \"2\" \"@\" \"^@\" \"^@\" b2 b3 \"^@\" \"^@\"\n"
-" scan 0x24: R---- \"^M\" \"^C\"\n"
-" scan 0x3e: ----- [F4]\n"
-" scan 0x4a: ----- [page up]\n"
-" scan 0x60: ----- {seq#3}\n"
-" scan 0x68: not-bound\n"
-"\n"
-"For each record, the hexadecimal value of the hardware scan code is\n"
-"printed, followed by a list of modifier flag combinations and the actual\n"
-"characters generated by this scan code with and without modifiers applied.\n"
-"\n"
-"The modifier flags field is composed of a combination of single letter\n"
-"representations of the various modifier types. The letters stand for:\n"
-"\n"
-" L - alpha-lock\n"
-" S - shift\n"
-" C - control\n"
-" A - alternate\n"
-" R - carriage-return\n"
-"\n"
-"As a special case, the `alpha-lock' flag also implies the `shift' flag, so\n"
-"these two flags never appear together in the same record.\n"
-"\n"
-"The combination of modifier flags determines the meaning and number of\n"
-"fields which follow. The first field after the modifier flags always\n"
-"represents the character that will be generated if no modifier keys are\n"
-"depressed. The remaining fields represent characters generated by the\n"
-"various modifier combinations. The order of the fields follows this\n"
-"general pattern:\n"
-"\n"
-" o The character generated by this scan code when no modifiers are in\n"
-" effect is listed first.\n"
-"\n"
-" o If the `L' or `S' flag is active, then the shifted character\n"
-" generated by this scan code is listed next.\n"
-"\n"
-" o If the `C' flag is active, then the control-character generated by\n"
-" this scan code is listed next. Furthermore, if the `L' or `S' flag\n"
-" is also active, then the shifted control-character is listed after\n"
-" that.\n"
-"\n"
-" o If the `A' flag is active, then the alternate-character generated by\n"
-" this scan code is listed next. Furthermore, if the `L' or `S' flag\n"
-" is active, then the shifted alternate-character is listed after that.\n"
-" If the `C' flag is also active, then the alternate-control-character\n"
-" is listed next. Finally, if the `C' and `L' or `C' and `S' flags are\n"
-" also active, then the shifted alternate-control-character is listed.\n"
-"\n"
-"The `R' flag does not actually refer to a modifier key. Instead, it is\n"
-"used to distinguish the scan code which is given the special\n"
-"pseudo-designation of `carriage return' key. Typically, this mask appears\n"
-"solo and only the two fields for control-M and control-C follow. This flag\n"
-"may be a throwback to an earlier time or may be specially interpreted by\n"
-"the low-level keyboard driver, but its purpose is otherwise enigmatic.\n"
-"\n"
-"Recalling the example from above, the following fields can be identified:\n"
-"\n"
-" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n"
-"\n"
-" o Lower-case `a' is generated when no modifiers are active.\n"
-" o Upper-case `A' is generated when `shift' or `alpha-lock' are active.\n"
-" o Control-A is generated when `control' is active.\n"
-" o Control-A is generated when `control' and `shift' are active.\n"
-" o The character represented by the hexadecimal code 0xca is generated\n"
-" when `alternate' is active.\n"
-" o The character represented by 0xc7 is generated when `alternate' and\n"
-" `shift' (or `alpha-lock') are active.\n"
-" o Control-A is generated when `alternate' and `control' are active.\n"
-" o Control-A is generated when `alternate', `control' and `shift' (or\n"
-" `alpha-lock') are active.\n"
-"\n"
-"The notation used to represent a particular generated character varies.\n"
-"\n"
-" o Printable ASCII characters are quoted, as in \"x\" or \"X\".\n"
-"\n"
-" o Control-characters are quoted and prefixed with `^', as in \"^X\".\n"
-"\n"
-" o Characters with values greater than 127 (0x7f) are displayed as\n"
-" hexadecimal values without the `0x' prefix.\n"
-"\n"
-" o Characters in a non-ASCII character set (such as `Symbol') are\n"
-" displayed as two hexadecimal numbers separated by a slash, as in\n"
-" `01/4a'. The first number is the character set's identification code\n"
-" (such as `01' for the `Symbol' set), and the second number is the\n"
-" value of the generated character.\n"
-"\n"
-" o Non-printing special function characters are displayed with the\n"
-" function's common name enclosed in brackets, as in `[page up]' or\n"
-" `[F4]'.\n"
-"\n"
-" o If the binding represents a key sequence rather than a single\n"
-" character, then the sequence's identification number is enclosed in\n"
-" braces, as in `{seq#3}'.\n"
-"\n"
-"Recalling a few examples from above, the following interpretations can be\n"
-"made:\n"
-"\n"
-" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n"
-" scan 0x3e: ----- [F4]\n"
-" scan 0x4a: ----- [page up]\n"
-" scan 0x60: ----- {seq#3}\n"
-"\n"
-" o \"x\" and \"X\" are printable ASCII characters.\n"
-" o \"^X\" is a control-character.\n"
-" o `01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in\n"
-" the `Symbol' character set.\n"
-" o Scan code 0x3e generates function-key `F4', and scan code 0x4a\n"
-" generates function-key `page up'.\n"
-" o Scan code 0x60 is bound to key sequence #3.\n"
-"\n"
-"Finally, if a scan code is not bound to any characters, then it is\n"
-"annotated with the label `not-bound', as with example scan code 0x68 from\n"
-"above.\n"
-"\n"
-"Sequences\n"
-"---------\n"
-"A scan code (modified and unmodified) can be bound to a key sequence rather\n"
-"than generating a single character or acting as a modifier. When it is\n"
-"bound to a key sequence, a series of character invocations and modifier\n"
-"actions are automatically generated rather than a single keystroke.\n"
-"\n"
-"Each mapping may contain zero or more key sequence records. The title\n"
-"`SEQUENCES' is printed along with the count of sequence records which\n"
-"follow. For example:\n"
-"\n"
-" SEQUENCES [3]\n"
-" sequence 0: \"f\" \"o\" \"o\"\n"
-" sequence 1: {alternate} \"b\" \"a\" \"r\" {unmodify}\n"
-" sequence 2: [home] \"b\" \"a\" \"z\"\n"
-"\n"
-"The notation used to represent the sequence of generated characters is\n"
-"identical to the notation already described in the `Characters' section\n"
-"above, with the exception that modifier actions may be interposed between\n"
-"generated characters. Such modifier actions are represented by the\n"
-"modifier's name enclosed in braces. The special name `{unmodify}'\n"
-"indicates the release of the modifier keys.\n"
-"\n"
-"Thus, the sequences in the above example can be interpreted as follows:\n"
-"\n"
-" o Sequence #0 generates `foo'.\n"
-" o Sequence #1 invokes the `alternate' modifier, generates `bar', and\n"
-" then releases `alternate'.\n"
-" o Sequence #2 invokes the `home' key and then generates `baz'. In a\n"
-" text editor, this would probably result in `baz' being prepended to\n"
-" the line of text on which the cursor resides.\n"
-"\n"
-"Special Keys\n"
-"------------\n"
-"Certain keyboards feature keys which perform some type of special purpose\n"
-"function rather than generating a character or acting as a modifier. For\n"
-"instance, Apple keyboards often contain a `power' key, and NeXT keyboards\n"
-"have historically featured screen brightness and volume control keys.\n"
-"\n"
-"Each mapping may contain zero or more special-key records which associate\n"
-"hardware scan codes with such special purpose functions. The title\n"
-"`SPECIALS' is printed along with the count of records which follow. For\n"
-"each record, the special function's name is printed along with a list of\n"
-"scan codes, in hexadecimal format, which are bound to that function. For\n"
-"example:\n"
-"\n"
-" SPECIALS [6]\n"
-" alpha-lock: 0x39\n"
-" brightness-down: 0x79\n"
-" brightness-up: 0x74\n"
-" power: 0x7f\n"
-" sound-down: 0x77\n"
-" sound-up: 0x73\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print a summary of the various files and directories which are related to
-// key mappings.
-//-----------------------------------------------------------------------------
-static void print_files_info( FILE* f )
- {
- fputs(
-"This is a summary of the various files and directories which are related to\n"
-"key mappings.\n"
-"\n"
-"*.keymapping\n"
-" A key mapping file which precisely defines the relationship of all\n"
-" hardware-specific keyboard scan-codes with their associated\n"
-" functionality.\n"
-"\n"
-"*.keyboard\n"
-" A file describing the physical layout of keys on a particular type of\n"
-" keyboard. Each `key' token in this file defines the position and shape\n"
-" of the key on the keyboard, as well as the associated scan code which\n"
-" that key generates. A .keymapping file, on the other hand, defines the\n"
-" characters which are generated by a particular scan code depending upon\n"
-" the state of the various modifier keys (such as shift, control, etc.).\n"
-" The `interface' and `handler_id' values from a .keymapping file are\n"
-" matched against those in each .keyboard file in order to associate a\n"
-" particular .keyboard file with a key mapping. Various GUI programs use\n"
-" the .keyboard file to display a visual representation of a keyboard for\n"
-" the user. Since these files are just plain text, they can be easily\n"
-" viewed and interpreted without the aid of a specialized program, thus\n"
-" dumpkeymap leaves these files alone.\n"
-"\n"
-"/System/Library/Keyboards\n"
-"/Network/Library/Keyboards\n"
-"/Local/Library/Keyboards\n"
-"/Library/Keyboards\n"
-" Repositories for .keymapping and .keyboard files for MacOS/X, Darwin,\n"
-" and MacOS/X Server.\n"
-"\n"
-"/NextLibrary/Keyboards\n"
-"/LocalLibrary/Keyboards\n"
-" Repositories for .keymapping and .keyboard files for OpenStep and\n"
-" NextStep.\n"
-"\n"
-"$(HOME)/Library/Keyboards\n"
-" Repository for personal .keymapping and .keyboard files.\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print a list of the various diagnostic messages which may be emitted.
-//-----------------------------------------------------------------------------
-static void print_diagnostics_info( FILE* f )
- {
- fputs(
-"The following diagnostic messages may be issued to the standard error\n"
-"stream.\n"
-"\n"
-"Unrecognized option.\n"
-" An unrecognized option was specified on the command-line. Invoke\n"
-" dumpkeymap with the --help option to view a list of valid options.\n"
-"\n"
-"Insufficient data in keymapping data stream.\n"
-" The key mapping file or data stream is corrupt. Either the file has\n"
-" been incorrectly truncated or a field, such as those which indicates\n"
-" the number of variable records which follow, contains a corrupt value.\n"
-"\n"
-"The following diagnostic messages have significance only when trying to\n"
-"print .keymapping files mentioned on the command-line.\n"
-"\n"
-"Bad magic number.\n"
-" The mentioned file is not a .keymapping file. The file's content does\n"
-" not start with the string `KYM1'.\n"
-"\n"
-"Unable to open key mapping file.\n"
-" The call to fopen() failed; probably because the specified path is\n"
-" invalid or dumpkeymap does not have permission to read the file.\n"
-"\n"
-"Unable to determine key mapping file size.\n"
-" The call to fstat() failed, thus memory can not be allocated for\n"
-" loading the file.\n"
-"\n"
-"Unable to read key mapping file.\n"
-" The call to fread() failed.\n"
-"\n"
-"The following diagnostic messages have significance only when trying to\n"
-"print the currently active key mapping when no .keymapping files have been\n"
-"mentioned on the command-line.\n"
-"\n"
-"Unable to open event status driver.\n"
-" The call to NXOpenEventStatus() failed.\n"
-"\n"
-"Bad key mapping length.\n"
-" The call to NXKeyMappingLength() returned a bogus value.\n"
-"\n"
-"Unable to get current key mapping.\n"
-" The call to NXGetKeyMapping() failed.\n"
-"\n"
-"The following diagnostic messages have significance only when using\n"
-"dumpkeymap on a non-Apple/NeXT platform.\n"
-"\n"
-"Must specify at least one .keymapping file.\n"
-" No .keymapping files were mentioned on the command-line. On\n"
-" non-Apple/NeXT platforms, there is no concept of a currently active\n"
-" .keymapping file, so at least one file must be mentioned on the\n"
-" command-line.\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print warranty.
-//-----------------------------------------------------------------------------
-static void print_warranty( FILE* f )
- {
- fputs(
-"This software is provided by the author `AS IS' and any express or implied\n"
-"WARRANTIES, including, but not limited to, the implied warranties of\n"
-"MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE are DISCLAIMED. In NO\n"
-"EVENT shall the author be LIABLE for any DIRECT, INDIRECT, INCIDENTAL,\n"
-"SPECIAL, EXEMPLARY, or CONSEQUENTIAL damages (including, but not limited\n"
-"to, procurement of substitute goods or services; loss of use, data, or\n"
-"profits; or business interruption) however caused and on any theory of\n"
-"liability, whether in contract, strict liability, or tort (including\n"
-"negligence or otherwise) arising in any way out of the use of this\n"
-"software, even if advised of the possibility of such damage.\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print this program's version number.
-//-----------------------------------------------------------------------------
-static void print_version( FILE* f )
- {
- fputs( "Version " PROG_VERSION " (built " __DATE__ ")\n\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print a usage summary.
-//-----------------------------------------------------------------------------
-static void print_usage( FILE* f )
- {
- fputs(
-"Usage: dumpkeymap [options] [-] [file ...]\n"
-"\n"
-"Prints a textual representation of each Apple/NeXT .keymapping file\n"
-"mentioned on the command-line. If no files are mentioned and if the local\n"
-"machine is an Apple or NeXT installation, then the key mapping currently in\n"
-"use by the WindowServer and the AppKit is printed instead.\n"
-"\n"
-"Options:\n"
-" -h --help\n"
-" Display general program instructions and option summary.\n"
-"\n"
-" -k --help-keymapping\n"
-" Display a detailed description of the internal layout of a\n"
-" .keymapping file.\n"
-"\n"
-" -o --help-output\n"
-" Display an explanation of the output generated by dumpkeymap when\n"
-" dissecting a .keymapping file.\n"
-"\n"
-" -f --help-files\n"
-" Display a summary of the various files and directories which are\n"
-" related to key mappings.\n"
-"\n"
-" -d --help-diagnostics\n"
-" Display a list of the various diagnostic messages which may be\n"
-" emitted by dumpkeymap.\n"
-"\n"
-" -v --version\n"
-" Display the dumpkeymap version number and warranty information.\n"
-"\n"
-" - --\n"
-" Inhibit processing of options at this point in the argument list.\n"
-" An occurrence of `-' or `--' in the argument list causes all\n"
-" following arguments to be treated as file names even if an argument\n"
-" begins with a `-' character.\n"
-"\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Print an informational banner.
-//-----------------------------------------------------------------------------
-static void print_banner( FILE* f )
- {
- fputs( "\n" PROG_NAME " v" PROG_VERSION " by " AUTHOR_INFO "\n"
- COPYRIGHT "\n\n", f );
- }
-
-
-//-----------------------------------------------------------------------------
-// Process command-line arguments. Examine options first; collecting files
-// along the way. If all is well, process collected file list.
-//-----------------------------------------------------------------------------
-int main( int const argc, char const* const argv[] )
- {
- int rc = 0, i, nfiles = 0, more_options = 1, process_files = 1;
- int* files = (int*)calloc( argc - 1, sizeof(int) );
- print_banner( stdout );
-
- for (i = 1; i < argc; i++)
- {
- char const* const s = argv[i];
- if (!more_options || *s != '-')
- files[ nfiles++ ] = i;
- else
- {
- OPT_SWITCH(s)
- OPT_CASE(-,--)
- more_options = 0;
- OPT_CASE(-h,--help)
- print_usage( stdout );
- process_files = 0;
- OPT_CASE(-k,--help-keymapping)
- print_internal_layout_info( stdout );
- process_files = 0;
- OPT_CASE(-o,--help-output)
- print_output_info( stdout );
- process_files = 0;
- OPT_CASE(-f,--help-files)
- print_files_info( stdout );
- process_files = 0;
- OPT_CASE(-d,--help-diagnostics)
- print_diagnostics_info( stdout );
- process_files = 0;
- OPT_CASE(-v,--version)
- print_version( stdout );
- print_warranty( stdout );
- process_files = 0;
- OPT_DEFAULT
- fprintf( stderr, "ERROR: Unrecognized option: %s\n\n", s );
- process_files = 0;
- rc = 1;
- OPT_SWITCH_END
- }
- }
-
- if (process_files)
- {
- if (nfiles == 0)
- rc = handle_empty_document_list();
- else
- for (i = 0; i < nfiles; i++)
- rc |= unparse_keymap_file( argv[files[i]] );
- }
-
- free( files );
- return rc;
- }
diff --git a/hw/darwin/utils/dumpkeymap.man b/hw/darwin/utils/dumpkeymap.man
deleted file mode 100644
index 90a2cd051..000000000
--- a/hw/darwin/utils/dumpkeymap.man
+++ /dev/null
@@ -1,1004 +0,0 @@
-.ig
-//=============================================================================
-//
-// Manual page for `dumpkeymap'.
-//
-// Copyright (C) 1999,2000 by Eric Sunshine <sunshine@sunshineco.com>
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//=============================================================================
-//
-// $XFree86$
-//
-..
-.ig
-//-----------------------------------------------------------------------------
-// Local identification information.
-//-----------------------------------------------------------------------------
-..
-.nr VE 4 \" Version number
-.TH DUMPKEYMAP 1 "v\n(VE \-\- 1 December 2000" "Version \n(VE"
-.de UP
-1 December 2000
-..
-.ig
-//-----------------------------------------------------------------------------
-// Annotation Macros
-// -----------------
-// Facilitate creation of annotated, non-filled blocks of text. An
-// annotated block is initiated with the `AS' macro. Each annotated,
-// non-filled line within the block must be introduced with the `AN' macro
-// which takes three arguments. The first argument is the detail text to
-// be annotated. The second is a string of spaces used to align the
-// annotations by certain (broken) roff interpreters which fail to
-// implement the proper set of roff commands (such as diversions,
-// indentation, and tab stops). It is assumed that the spaces will be
-// used with fixed-point font. The third argument is the annotation
-// itself. The block should be terminated with the `AE' macro. For all
-// roff interpreters which properly implement diversions, indentation, and
-// tab stops, all annotations within the block are automatically aligned at
-// the same horizontal position. This position is guaranteed to be just
-// to the right of the widest `AN' detail line. For broken roff
-// interpreters, such as `rman', the string of spaces from the second
-// argument are used to align the annotations. Finally, the `AZ' macro,
-// which takes a single argument, can be used to to insert a non-annotated
-// line into the block which does not play a part in the calculation of
-// the horizontal annotation alignment.
-//
-// Implementation Notes
-// --------------------
-// *1* These macros utilize a diversion (named `AD'). Since the prevailing
-// indentation is stored along with the diverted text, we must muck with
-// the indentation level in order to prevent the indentation from being
-// applied to the text a second time when `AD' is finally emitted.
-//
-// *2* Unfortunately, `.if' strips leading whitespace from following text, so
-// `AN' uses \& to preserve the whitespace.
-//
-// *3* This manual page has been tested for proper formatting with troff,
-// groff, nroff and rman (the `man' to `HTML' converter). Unfortunately,
-// rman fails to implement many useful features such as diversions,
-// indentation, and tab stops, and is also hideously buggy. Furthermore
-// it identifies itself as nroff and fails to provide any further
-// identification, so there is no way to create macros which specifically
-// work around its limitations. Following is a list of several bugs in
-// rman which the implementation of these macros must avoid:
-// o Fails with multi-line conditionals within macros.
-// o Fails on macro definition within multi-line conditionals.
-// o Fails when macro arguments are not delimited by exactly 1 space.
-// o String definition `.ds' ignores the value; uses empty "" instead.
-// As a consequence of these problems, the following macros are written
-// using a series of ugly single-line `.if' conditionals rather than the
-// more natural multi-line `.if' and `.ie' conditionals. Also, rman fails
-// to understand the common idiom of `.\"' to introduce a comment, which
-// is why all comments in this file are wrapped in ignore `.ig' blocks.
-//-----------------------------------------------------------------------------
-..
-.de AS
-.if t .nr AW 0
-.if t .nr AI \\n(.i
-.if t .in -\\n(AI
-.nf
-..
-.de AN
-.if t .if \w'\\$1'>\\n(AW .nr AW \w'\\$1'
-.if t .da AD
-.if t \\&\\$1\\t\\$3
-.if t .da
-.if n \\&\\$1 \\$2\\$3
-..
-.de AZ
-.if t .da AD
-\\$1
-.if t .da
-..
-.de AE
-.if t .in +\\n(AIu
-.if t .if \\n(AW .ta \\n(AWu+\w'\\(em'u
-.if t .AD
-.if t .DT
-.if t .rm AD
-.if t .rm AW
-.fi
-..
-.ig
-//-----------------------------------------------------------------------------
-// Bulleted list macros -- `BG' begins a bulleted list; `BU' delimits
-// bulleted entries; `BE' ends a bulleted list.
-//-----------------------------------------------------------------------------
-..
-.de BG
-.PP
-.RS
-..
-.de BU
-.HP
-\\(bu\\ \\c
-..
-.de BE
-.RE
-.PP
-..
-.ig
-//-----------------------------------------------------------------------------
-// Indented paragraph with stylized hanging tag macro. `TG' takes a single
-// argument and treats it as the hanging tag of the indented paragraph.
-// The tag is italicized in troff but not in nroff.
-//-----------------------------------------------------------------------------
-..
-.de TG
-.TP
-.ie t .I "\\$1"
-.el \\$1
-..
-.ig
-//-----------------------------------------------------------------------------
-// Manual page for `dumpkeymap'.
-//-----------------------------------------------------------------------------
-..
-.SH NAME
-dumpkeymap \- Dianostic dump of a .keymapping file
-.SH SYNOPSIS
-.B dumpkeymap
-.RI [ options "] [-] [" file "...]"
-.SH DESCRIPTION
-.I dumpkeymap
-prints a textual representation of each Apple/\c
-.SM NeXT
-.I .keymapping
-file mentioned on the command-line. If no files are mentioned and if the
-local machine is an Apple or
-.SM NeXT
-installation, then the key mapping currently in use by the WindowServer and the
-AppKit is printed instead.
-.SH OPTIONS
-.TP
-.B "\-h \-\^\-help"
-Display general program instructions and option summary.
-.TP
-.B "\-k \-\^\-help\-keymapping"
-Display a detailed description of the internal layout of a
-.I .keymapping
-file. This is the same information as that presented in the
-.I "Key Mapping Description"
-section of this document.
-.TP
-.B "\-o \-\^\-help\-output"
-Display an explanation of the output generated by
-.I dumpkeymap
-when dissecting a
-.I .keymapping
-file. This is the same information as that presented in the
-.I "Output Description"
-section of this document.
-.TP
-.B "\-f \-\^\-help\-files"
-Display a summary of the various files and directories which are related to
-key mappings. This is the same information as that presented in the
-.I "Files"
-section of this document.
-.TP
-.B "\-d \-\^\-help\-diagnostics"
-Display a list of the various diagnostic messages which may be emitted by
-.I dumpkeymap.
-This is the same information as that presented in the
-.I "Diagnostics"
-section of this document.
-.TP
-.B "\-v \-\^\-version"
-Display the
-.I dumpkeymap
-version number and warranty information.
-.TP
-.B "\- \-\^\-"
-Inhibit processing of options at this point in the argument list. An
-occurrence of `\-' or `\-\^\-' in the argument list causes all following
-arguments to be treated as file names even if an argument begins with a `\-'
-character.
-.SH "KEY MAPPING DESCRIPTION"
-The following sections describe, in complete detail, the format of a raw key
-mapping resource, as well as the format of the
-.I .keymapping
-file which encapsulates one or more raw mappings.
-.SH "Types and Data"
-The following type definitions are employed throughout this discussion:
-.PP
-.RS
-.AS
-.AZ "typedef unsigned char byte;"
-.AZ "typedef unsigned short word;"
-.AZ "typedef unsigned long dword;"
-.AE
-.RE
-.PP
-Additionally, the type definition
-.RI ` number '
-is used generically to
-indicate a numeric value. The actual size of the
-.RI ` number '
-type may be one or two bytes depending upon how the data is stored in the key
-map. Although most key maps use byte-sized numeric values, word-sized values
-are also allowed.
-.PP
-Multi-byte values in a key mapping file are stored in big-endian byte order.
-.SH "Key Mapping File and Device Mapping"
-A key mapping file begins with a magic-number and continues with a
-variable number of device-specific key mappings.
-.PP
-.RS
-.AS
-.AZ "struct KeyMappingFile {"
-.AN " char magic_number[4];" " " "// `KYM1'"
-.AN " DeviceMapping maps[...];" "" "// Variable number of maps"
-.AZ };
-.AE
-.PP
-.AS
-.AZ "struct DeviceMapping {"
-.AN " dword interface;" " " "// Interface type"
-.AN " dword handler_id;" "" "// Interface subtype"
-.AN " dword map_size;" " " "// Byte count of `map' (below)"
-.AN " KeyMapping map;"
-.AZ };
-.AE
-.RE
-.PP
-The value of `interface' represents a family of keyboard device types
-(such as Intel
-.SM "PC, ADB, NeXT,"
-Sun Type5, etc.), and is generally specified as one of the constant values
-.SM "NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE,"
-etc., which are are defined in IOHIDTypes.h on MacOS/X and Darwin, and in
-ev_types.h on MacOS/X Server, OpenStep, and NextStep.
-.PP
-The value of `handler_id' represents a specific keyboard layout within the
-much broader `interface' family. For instance, for a 101-key Intel
-.SM PC
-keyboard (of type
-.SM NX_EVS_DEVICE_INTERFACE_ACE\c
-) the `handler_id' is '0', whereas for a 102-key keyboard it is `1'.
-.PP
-Together, `interface' and `handler_id' identify the exact keyboard hardware to
-which this mapping applies. Programs which display a visual representation of
-a keyboard layout, match `interface' and `handler_id' from the
-.I .keymapping
-file against the `interface' and `handler_id' values found in each
-.I .keyboard
-file.
-.SH "Key Mapping"
-A key mapping completely defines the relationship of all scan codes with their
-associated functionality. A
-.I KeyMapping
-structure is embedded within the
-.I DeviceMapping
-structure in a
-.IR KeyMappingFile .
-The key mapping currently in use by the WindowServer and AppKit is also
-represented by a
-.I KeyMapping
-structure, and can be referred to directly by calling NXGetKeyMapping() and
-accessing the `mapping' data member of the returned
-.I NXKeyMapping
-structure.
-.PP
-.RS
-.AS
-.AZ "struct KeyMapping {"
-.AN " word number_size;" " " "// 0=1 byte, non-zero=2 bytes"
-.AN " number num_modifier_groups;" "" "// Modifier groups"
-.AZ " ModifierGroup modifier_groups[...];"
-.AN " number num_scan_codes;" " " "// Scan groups"
-.AN " ScanGroup scan_table[...];"
-.AN " number num_sequence_lists;" " " "// Sequence lists"
-.AN " Sequence sequence_lists[...];"
-.AN " number num_special_keys;" " " "// Special keys"
-.AN " SpecialKey special_key[...];"
-.AZ };
-.AE
-.RE
-.PP
-The `number_size' flag determines the size, in bytes, of all remaining numeric
-values (denoted by the type definition
-.RI ` number ')
-within the
-key mapping. If its value is zero, then numbers are represented by a single
-byte. If it is non-zero, then numbers are represented by a word (two bytes).
-.SH "Modifier Group"
-A modifier group defines all scan codes which map to a particular type of
-modifier, such as
-.IR shift ,
-.IR control ,
-etc.
-.PP
-.RS
-.AS
-.AZ "enum Modifier {"
-.AZ " ALPHALOCK = 0,"
-.AZ " SHIFT,"
-.AZ " CONTROL,"
-.AZ " ALTERNATE,"
-.AZ " COMMAND,"
-.AZ " KEYPAD,"
-.AZ " HELP"
-.AZ };
-.AE
-.PP
-.AS
-.AZ "struct ModifierGroup {"
-.AN " number modifier;" " " "// A Modifier constant"
-.AN " number num_scan_codes;"
-.AN " number scan_codes[...];" "" "// Variable number of scan codes"
-.AZ };
-.AE
-.RE
-.PP
-The scan_codes[] array contains a list of all scan codes which map to the
-specified modifier. The
-.IR shift ", " command ", and " alternate
-modifiers are frequently mapped to two different scan codes, apiece,
-since these modifiers often appear on both the left and right sides of
-the keyboard.
-.SH "Scan Group"
-There is one
-.I ScanGroup
-for each scan code generated by the given keyboard. This number is given by
-KeyMapping::num_scan_codes. The first scan group represents hardware scan
-code 0, the second represents scan code 1, etc.
-.PP
-.RS
-.AS
-.AZ "enum ModifierMask {"
-.AN " ALPHALOCK_MASK" " " "= 1 << 0,"
-.AN " SHIFT_MASK" " " "= 1 << 1,"
-.AN " CONTROL_MASK" " " "= 1 << 2,"
-.AN " ALTERNATE_MASK" " " "= 1 << 3,"
-.AN " CARRIAGE_RETURN_MASK" "" "= 1 << 4"
-.AZ };
-.AZ "#define NOT_BOUND 0xff"
-.AE
-.PP
-.AS
-.AZ "struct ScanGroup {"
-.AN " number mask;"
-.AN " Character characters[...];"
-.AZ };
-.AE
-.RE
-.PP
-For each scan code, `mask' defines which modifier combinations generate
-characters. If `mask' is
-.SM NOT_BOUND
-(0xff) then then this scan code does not generate any characters ever, and its
-characters[] array is zero length. Otherwise, the characters[] array contains
-one
-.I Character
-record for each modifier combination.
-.PP
-The number of records in characters[] is determined by computing (1 <<
-bits_set_in_mask). In other words, if mask is zero, then zero bits are set,
-so characters[] contains only one record. If `mask' is
-.SM "(SHIFT_MASK | CONTROL_MASK),"
-then two bits are set, so characters[] contains four records.
-.PP
-The first record always represents the character which is generated by that
-key when no modifiers are active. The remaining records represent characters
-generated by the various modifier combinations. Using the example with the
-.I shift
-and
-.I control
-masks set, record two would represent the character with the
-.I shift
-modifier active; record three, the
-.I control
-modifier active; and record four, both the
-.I shift
-and
-.I control
-modifiers active.
-.PP
-As a special case,
-.SM ALPHALOCK_MASK
-implies
-.SM SHIFT_MASK,
-though only
-.SM ALPHALOCK_MASK
-appears in `mask'. In this case the same character is generated for both the
-.I shift
-and
-.I alpha-lock
-modifiers, but only needs to appear once in the characters[] array.
-.PP
-.SM CARRIAGE_RETURN_MASK
-does not actually refer to a modifier key. Instead, it is used to
-distinguish the scan code which is given the special pseudo-designation of
-.I "carriage return"
-key. Typically, this mask appears solo in a
-.I ScanGroup
-record and only the two
-.I Character
-records for control-M and control-C follow. This flag may be a throwback to
-an earlier time or may be specially interpreted by the low-level keyboard
-driver, but its purpose is otherwise enigmatic.
-.SH Character
-Each
-.I Character
-record indicates the character generated when this key is pressed, as well as
-the character set which contains the character. Well known character sets are
-.SM `ASCII'
-and `Symbol'. The character set can also be one of the meta values
-.SM FUNCTION_KEY
-or
-.SM KEY_SEQUENCE.
-If it is
-.SM FUNCTION_KEY
-then `char_code' represents a generally well-known function key such as those
-enumerated by
-.I FunctionKey.
-If the character set is
-.SM KEY_SEQUENCE
-then `char_code' represents is a zero-base index into
-KeyMapping::sequence_lists[].
-.PP
-.RS
-.AS
-.AZ "enum CharacterSet {"
-.AN " ASCII" " " "= 0x00,"
-.AN " SYMBOL" " " "= 0x01,"
-.AN " ..."
-.AN " FUNCTION_KEY" "" "= 0xfe,"
-.AN " KEY_SEQUENCE" "" "= 0xff"
-.AZ };
-.AE
-.PP
-.AS
-.AZ "struct Character {"
-.AN " number set;" " " "// CharacterSet of generated character"
-.AN " number char_code;" "" "// Actual character generated"
-.AZ };
-.AE
-.PP
-.AS
-.AZ "enum FunctionKey {"
-.AZ " F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,"
-.AZ " INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,"
-.AZ " SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU,"
-.AZ " USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,"
-.AZ " DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT"
-.AZ };
-.AE
-.RE
-.SH Sequence
-When Character::set contains the meta value
-.SM KEY_SEQUENCE,
-the scan code is bound to a sequence of keys rather than a single character.
-A sequence is a series of modifiers and characters which are automatically
-generated when the associated key is depressed.
-.PP
-.RS
-.AS
-.AZ "#define MODIFIER_KEY 0xff"
-.AE
-.PP
-.AS
-.AZ "struct Sequence {"
-.AN " number num_chars;"
-.AN " Character characters[...];"
-.AZ };
-.AE
-.RE
-.PP
-Each generated
-.I Character
-is represented as previously described, with the exception that
-.SM MODIFIER_KEY
-may appear in place of
-.SM KEY_SEQUENCE.
-When the value of Character::set is
-.SM MODIFIER_KEY
-then Character::char_code represents a modifier key rather than an actual
-character. If the modifier represented by `char_code' is non-zero, then it
-indicates that the associated modifier key has been depressed. In this case,
-the value is one of the constants enumerated by
-.I Modifier
-(\c
-.SM "SHIFT, CONTROL, ALTERNATE,"
-etc.). If the value is zero then it means that the modifier keys have been
-released.
-.SH "Special Key"
-A special key is one which is scanned directly by the Mach kernel rather than
-by the WindowServer. In general, events are not generated for special keys.
-.PP
-.RS
-.AS
-.AZ "enum SpecialKeyType {"
-.AZ " VOLUME_UP = 0,"
-.AZ " VOLUME_DOWN,"
-.AZ " BRIGHTNESS_UP,"
-.AZ " BRIGHTNESS_DOWN,"
-.AZ " ALPHA_LOCK,"
-.AZ " HELP,"
-.AZ " POWER,"
-.AZ " SECONDARY_ARROW_UP,"
-.AZ " SECONDARY_ARROW_DOWN"
-.AZ };
-.AE
-.PP
-.AS
-.AZ "struct SpecialKey {"
-.AN " number type;" " " "// A SpecialKeyType constant"
-.AN " number scan_code;" "" "// Actual scan code"
-.AZ };
-.AE
-.RE
-.SH OUTPUT
-What follows is an explanation and description of the various pieces of
-information emitted by
-.I dumpkeymap.
-.PP
-For a more thorough discussion of any particular piece of information described
-here, refer to the detailed description of the internal layout of a key mapping
-provided by the
-.I "Key Mapping Description"
-section above.
-.SH Conventions
-Depending upon context, some numeric values are displayed in decimal
-notation, whereas others are displayed in hexadecimal notation.
-Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),
-except when explicitly noted otherwise.
-.SH "Key Mapping Source"
-The first piece of information presented about a particular key mapping is the
-source from which the data was gleaned. For a
-.I .keymapping
-file, the title
-.SM "`KEYMAP FILE'"
-is emitted along with the path and name of the file in question. For the key
-mapping currently in use by the WindowServer and AppKit, the title
-.SM "`ACTIVE KEYMAP'"
-is emitted instead.
-.SH "Device Information"
-Each
-.I .keymapping
-file may contain one or more raw key mappings. For example, a file which maps
-keys to a Dvorak-style layout might contain raw mappings for Intel
-.SM "PC, ADB, NeXT,"
-and Sun Type5 keyboards.
-.PP
-For each raw mapping, the following information is emitted:
-.BG
-.BU
-The title
-.SM `KEYMAP'
-along with the mapping's relative position in the
-.I .keymapping
-file.
-.BU
-The `interface' identifier.
-.BU
-The `handler_id' sub-identifier.
-.BU
-The size of the raw mapping resource counted in bytes.
-.BE
-The `interface' and `handler_id' values, taken together, define a specific
-keyboard device. A
-.I .keyboard
-file, which describes the visual layout of a keyboard, also contains
-`interface' and `handler_id' identifiers. The
-.I .keyboard
-file corresponding to a particular key mapping can be found by matching the
-`interface' and `handler_id' values from each resource.
-.SH Modifiers
-Each mapping may contain zero or more modifier records which associate hardware
-scan codes with modifier descriptions such as
-.I "shift, control, alternate,"
-etc. The title
-.SM `MODIFIERS'
-is printed along with the count of modifier records which follow. For each
-modifier record, the modifier's name is printed along with a list of scan
-codes, in hexadecimal format, which generate that modifier value. For example:
-.PP
-.RS
-.nf
-MODIFIERS [4]
-alternate: 0x1d 0x60
-control: 0x3a
-keypad: 0x52 0x53 ... 0x63 0x62
-shift: 0x2a 0x36
-.fi
-.RE
-.SH Characters
-Each mapping may contain zero or more character records which associate
-hardware scan codes with the actual characters generated by those scan
-codes in the presence or absence of various modifier combinations. The
-title
-.SM `CHARACTERS'
-is printed along with the count of character records which follow. Here is a
-highly abbreviated example:
-.PP
-.RS
-.nf
-CHARACTERS [9]
-scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A"
-scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X"
-scan 0x0a: ---S- "<" ">"
-scan 0x13: -ACS- "2" "@" "^@" "^@" b2 b3 "^@" "^@"
-scan 0x24: R---- "^M" "^C"
-scan 0x3e: ----- [F4]
-scan 0x4a: ----- [page up]
-scan 0x60: ----- {seq#3}
-scan 0x68: not-bound
-.fi
-.RE
-.PP
-For each record, the hexadecimal value of the hardware scan code is printed,
-followed by a list of modifier flag combinations and the actual characters
-generated by this scan code with and without modifiers applied.
-.PP
-The modifier flags field is composed of a combination of single letter
-representations of the various modifier types. The letters stand for:
-.PP
-.RS
-.nf
-L \- alpha-lock
-S \- shift
-C \- control
-A \- alternate
-R \- carriage-return
-.fi
-.RE
-.PP
-As a special case, the
-.I alpha-lock
-flag also implies the
-.I shift
-flag, so these two flags never appear together in the same record.
-.PP
-The combination of modifier flags determines the meaning and number of fields
-which follow. The first field after the modifier flags always represents the
-character that will be generated if no modifier keys are depressed. The
-remaining fields represent characters generated by the various modifier
-combinations. The order of the fields follows this general pattern:
-.BG
-.BU
-The character generated by this scan code when no modifiers are in effect is
-listed first.
-.BU
-If the `L' or `S' flag is active, then the shifted character generated by this
-scan code is listed next.
-.BU
-If the `C' flag is active, then the control-character generated by this scan
-code is listed next. Furthermore, if the `L' or `S' flag is also active, then
-the shifted control-character is listed after that.
-.BU
-If the `A' flag is active, then the alternate-character generated by this scan
-code is listed next. Furthermore, if the `L' or `S' flag is active, then the
-shifted alternate-character is listed after that. If the `C' flag is also
-active, then the alternate-control-character is listed next. Finally, if the
-`C' and `L' or `C' and `S' flags are also active, then the shifted
-alternate-control-character is listed.
-.BE
-The `R' flag does not actually refer to a modifier key. Instead, it is used to
-distinguish the scan code which is given the special pseudo-designation of
-.I "carriage return"
-key. Typically, this mask appears solo and only the two fields for control-M
-and control-C follow. This flag may be a throwback to an earlier time or may
-be specially interpreted by the low-level keyboard driver, but its purpose is
-otherwise enigmatic.
-.PP
-Recalling the example from above, the following fields can be identified:
-.PP
-.RS
-.nf
-scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A"
-.fi
-.RE
-.BG
-.BU
-Lower-case `a' is generated when no modifiers are active.
-.BU
-Upper-case `A' is generated when
-.IR shift " or " alpha-lock
-are active.
-.BU
-Control-A is generated when
-.I control
-is active.
-.BU
-Control-A is generated when
-.IR control " and " shift
-are active.
-.BU
-The character represented by the hexadecimal code 0xca is generated when
-.I alternate
-is active.
-.BU
-The character represented by 0xc7 is generated when
-.IR alternate " and " shift " (or " alpha-lock ") are active."
-.BU
-Control-A is generated when
-.IR alternate " and " control
-are active.
-.BU
-Control-A is generated when
-.IR "alternate, control" " and " shift " (or " alpha-lock ") are active."
-.BE
-The notation used to represent a particular generated character varies.
-.BG
-.BU
-Printable
-.SM ASCII
-characters are quoted, as in "x" or "X".
-.BU
-Control-characters are quoted and prefixed with `^', as in "^X".
-.BU
-Characters with values greater than 127 (0x7f) are displayed as hexadecimal
-values without the `0x' prefix.
-.BU
-Characters in a non-\c
-.SM ASCII
-character set (such as `Symbol') are displayed as two hexadecimal numbers
-separated by a slash, as in `01/4a'. The first number is the character set's
-identification code (such as `01' for the `Symbol' set), and the second number
-is the value of the generated character.
-.BU
-Non-printing special function characters are displayed with the function's
-common name enclosed in brackets, as in `[page up]' or `[F4]'.
-.BU
-If the binding represents a key sequence rather than a single character, then
-the sequence's identification number is enclosed in braces, as in `{seq#3}'.
-.BE
-Recalling a few examples from above, the following interpretations can be made:
-.PP
-.RS
-.nf
-scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X"
-scan 0x3e: ----- [F4]
-scan 0x4a: ----- [page up]
-scan 0x60: ----- {seq#3}
-.fi
-.RE
-.BG
-.BU
-"x" and "X" are printable
-.SM ASCII
-characters.
-.BU
-"^X" is a control-character.
-.BU
-`01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in the `Symbol'
-character set.
-.BU
-Scan code 0x3e generates function-key `F4', and scan code 0x4a generates
-function-key `page up'.
-.BU
-Scan code 0x60 is bound to key sequence #3.
-.BE
-Finally, if a scan code is not bound to any characters, then it is annotated
-with the label `not-bound', as with example scan code 0x68 from above.
-.SH Sequences
-A scan code (modified and unmodified) can be bound to a key sequence rather
-than generating a single character or acting as a modifier. When it is bound
-to a key sequence, a series of character invocations and modifier actions are
-automatically generated rather than a single keystroke.
-.PP
-Each mapping may contain zero or more key sequence records. The title
-.SM `SEQUENCES'
-is printed along with the count of sequence records which follow. For example:
-.PP
-.RS
-.nf
-SEQUENCES [3]
-sequence 0: "f" "o" "o"
-sequence 1: {alternate} "b" "a" "r" {unmodify}
-sequence 2: [home] "b" "a" "z"
-.fi
-.RE
-.PP
-The notation used to represent the sequence of generated characters is
-identical to the notation already described in the
-.I Characters
-section above, with the exception that modifier actions may be interposed
-between generated characters. Such modifier actions are represented by the
-modifier's name enclosed in braces. The special name `{unmodify}' indicates
-the release of the modifier keys.
-.PP
-Thus, the sequences in the above example can be interpreted as follows:
-.BG
-.BU
-Sequence\ #0 generates `foo'.
-.BU
-Sequence\ #1 invokes the
-.I alternate
-modifier, generates `bar', and then releases
-.I alternate.
-.BU
-Sequence\ #2 invokes the
-.I home
-key and then generates `baz'. In a text editor, this would probably result in
-`baz' being prepended to the line of text on which the cursor resides.
-.BE
-.SH Special Keys
-Certain keyboards feature keys which perform some type of special purpose
-function rather than generating a character or acting as a modifier. For
-instance, Apple keyboards often contain a
-.I power
-key, and
-.SM NeXT
-keyboards have historically featured screen brightness and volume control keys.
-.PP
-Each mapping may contain zero or more special-key records which associate
-hardware scan codes with such special purpose functions. The title
-.SM `SPECIALS'
-is printed along with the count of records which follow. For each record, the
-special function's name is printed along with a list of scan codes, in
-hexadecimal format, which are bound to that function. For example:
-.PP
-.RS
-.nf
-SPECIALS [6]
-alpha-lock: 0x39
-brightness-down: 0x79
-brightness-up: 0x74
-power: 0x7f
-sound-down: 0x77
-sound-up: 0x73
-.fi
-.RE
-.SH FILES
-.IP *.keymapping
-A key mapping file which precisely defines the relationship of all
-hardware-specific keyboard scan-codes with their associated functionality.
-.IP *.keyboard
-A file describing the physical layout of keys on a particular type of
-keyboard. Each `key' token in this file defines the position and shape of the
-key on the keyboard, as well as the associated scan code which that key
-generates. A
-.I .keymapping
-file, on the other hand, defines the characters which are generated by a
-particular scan code depending upon the state of the various modifier keys
-(such as
-.I shift,
-.I control,
-etc.). The `interface' and `handler_id' values from a
-.I .keymapping
-file are matched against those in each
-.I .keyboard
-file in order to associate a particular
-.I .keyboard
-file with a key mapping. Various
-.SM GUI
-programs use the
-.I .keyboard
-file to display a visual representation of a keyboard for the user. Since
-these files are just plain text, they can be easily viewed and interpreted
-without the aid of a specialized program, thus
-.I dumpkeymap
-leaves these files alone.
-.PP
-/System/Library/Keyboards
-.br
-/Network/Library/Keyboards
-.br
-/Local/Library/Keyboards
-.br
-/Library/Keyboards
-.RS
-Repositories for
-.I .keymapping
-and
-.I .keyboard
-files for MacOS/X, Darwin, and MacOS/X Server.
-.RE
-.PP
-/NextLibrary/Keyboards
-.br
-/LocalLibrary/Keyboards
-.RS
-Repositories for
-.I .keymapping
-and
-.I .keyboard
-files for OpenStep and NextStep.
-.RE
-.IP $(HOME)/Library/Keyboards
-Repository for personal
-.I .keymapping
-and
-.I .keyboard
-files.
-.SH DIGANOSTICS
-The following diagnostic messages may be issued to the standard error stream.
-.TG "Unrecognized option."
-An unrecognized option was specified on the command-line. Invoke
-.I dumpkeymap
-with the
-.B "\-\^\-help"
-option to view a list of valid options.
-.TG "Insufficient data in keymapping data stream."
-The key mapping file or data stream is corrupt. Either the file has been
-incorrectly truncated or a field, such as those which indicates the number of
-variable records which follow, contains a corrupt value.
-.PP
-The following diagnostic messages have significance only when trying to print
-.I .keymapping
-files mentioned on the command-line.
-.TG "Bad magic number."
-The mentioned file is not a
-.I .keymapping
-file. The file's content does not start with the string `KYM1'.
-.TG "Unable to open key mapping file."
-The call to fopen() failed; probably because the specified path is invalid or
-.I dumpkeymap
-does not have permission to read the file.
-.TG "Unable to determine key mapping file size."
-The call to fstat() failed, thus memory can not be allocated for loading the
-file.
-.TG "Unable to read key mapping file."
-The call to fread() failed.
-.PP
-The following diagnostic messages have significance only when trying to print
-the currently active key mapping when no
-.I .keymapping
-files have been mentioned on the command-line.
-.TG "Unable to open event status driver."
-The call to NXOpenEventStatus() failed.
-.TG "Bad key mapping length."
-The call to NXKeyMappingLength() returned a bogus value.
-.TG "Unable to get current key mapping."
-The call to NXGetKeyMapping() failed.
-.PP
-The following diagnostic messages have significance only when using
-.I dumpkeymap
-on a non-Apple/\c
-.SM NeXT
-platform.
-.TG "Must specify at least one .keymapping file."
-No
-.I .keymapping
-files were mentioned on the command-line. On non-Apple/\c
-.SM NeXT
-platforms, there is no concept of a currently active
-.I .keymapping
-file, so at least one file must be mentioned on the command-line.
-.SH AUTHOR
-Eric Sunshine <sunshine@sunshineco.com> wrote
-.I dumpkeymap
-and this document, the
-.I "dumpkeymap user's manual."
-Both
-.I dumpkeymap
-and this document are copyright \(co1999,2000 by Eric Sunshine
-<sunshine@sunshineco.com>. All rights reserved.
-.PP
-The implementation of
-.I dumpkeymap
-is based upon information gathered on September 3, 1997 by Eric Sunshine
-<sunshine@sunshineco.com> and Paul S. McCarthy <zarnuk@zarnuk.com> during an
-effort to reverse engineer the format of the
-.SM NeXT
-.I .keymapping
-file.
-.if n .PP
-.if n Version \n(VE \-\-
-.if n .UP
diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c
index 949d7d689..4aa586aff 100644
--- a/hw/dmx/dmxcmap.c
+++ b/hw/dmx/dmxcmap.c
@@ -46,24 +46,10 @@
#include "micmap.h"
-static int dmxInitColormapPrivateFunc(ColormapPtr pColormap, int index)
-{
- return TRUE;
-}
-
static Bool dmxAllocateColormapPrivates(ColormapPtr pColormap)
{
- static unsigned long dmxColormapGeneration;
dmxColormapPrivPtr pCmapPriv;
- if (dmxColormapGeneration != serverGeneration) {
- if ((dmxColormapPrivateIndex
- = AllocateColormapPrivateIndex(dmxInitColormapPrivateFunc)) < 0)
- return FALSE;
-
- dmxColormapGeneration = serverGeneration;
- }
-
pCmapPriv = (dmxColormapPrivPtr)xalloc(sizeof(*pCmapPriv));
if (!pCmapPriv)
return FALSE;
diff --git a/hw/dmx/dmxcmap.h b/hw/dmx/dmxcmap.h
index 228f8662e..f968f8622 100644
--- a/hw/dmx/dmxcmap.h
+++ b/hw/dmx/dmxcmap.h
@@ -56,15 +56,14 @@ extern Bool dmxBECreateColormap(ColormapPtr pColormap);
extern Bool dmxBEFreeColormap(ColormapPtr pColormap);
/** Private index. \see dmxcmap.c \see dmxscrinit.c \see dmxwindow.c */
-extern int dmxColormapPrivateIndex;
+extern DevPrivateKey dmxColormapPrivateKey;
/** Set colormap private structure. */
#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \
- (_pCMap)->devPrivates[dmxColormapPrivateIndex].ptr \
- = (pointer)(_pCMapPriv);
+ dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
/** Get colormap private structure. */
-#define DMX_GET_COLORMAP_PRIV(_pCMap) \
- (dmxColormapPrivPtr)(_pCMap)->devPrivates[dmxColormapPrivateIndex].ptr
+#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \
+ dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
#endif /* DMXCMAP_H */
diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c
index 1ad199d58..8a801169c 100644
--- a/hw/dmx/dmxcursor.c
+++ b/hw/dmx/dmxcursor.c
@@ -662,8 +662,8 @@ static Bool _dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
DMXDBG2("_dmxRealizeCursor(%d,%p)\n", pScreen->myNum, pCursor);
- pCursor->devPriv[pScreen->myNum] = xalloc(sizeof(*pCursorPriv));
- if (!pCursor->devPriv[pScreen->myNum])
+ DMX_SET_CURSOR_PRIV(pCursor, pScreen, xalloc(sizeof(*pCursorPriv)));
+ if (!DMX_GET_CURSOR_PRIV(pCursor, pScreen))
return FALSE;
pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
@@ -700,9 +700,9 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
if (dmxScreen->beDisplay) {
if (dmxBEFreeCursor(pScreen, pCursor))
- xfree(pCursor->devPriv[pScreen->myNum]);
+ xfree(DMX_GET_CURSOR_PRIV(pCursor, pScreen));
}
- pCursor->devPriv[pScreen->myNum] = NULL;
+ DMX_SET_CURSOR_PRIV(pCursor, pScreen, NULL);
return TRUE;
}
diff --git a/hw/dmx/dmxcursor.h b/hw/dmx/dmxcursor.h
index 7b70c6250..d909bd01e 100644
--- a/hw/dmx/dmxcursor.h
+++ b/hw/dmx/dmxcursor.h
@@ -63,7 +63,10 @@ extern void dmxHideCursor(DMXScreenInfo *dmxScreen);
extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor);
extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
-#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) \
- (dmxCursorPrivPtr)(_pCursor)->devPriv[(_pScreen)->myNum]
+#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) \
+ ((dmxCursorPrivPtr)dixLookupPrivate(&(_pCursor)->devPrivates, _pScreen))
+
+#define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \
+ dixSetPrivate(&(_pCursor)->devPrivates, _pScreen, v)
#endif /* DMXCURSOR_H */
diff --git a/hw/dmx/dmxdpms.c b/hw/dmx/dmxdpms.c
index 5c176dfc3..2af160556 100644
--- a/hw/dmx/dmxdpms.c
+++ b/hw/dmx/dmxdpms.c
@@ -175,9 +175,9 @@ void dmxDPMSTerm(DMXScreenInfo *dmxScreen)
void dmxDPMSWakeup(void)
{
if (screenIsSaved == SCREEN_SAVER_ON)
- SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset);
+ dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
#ifdef DPMSExtension
- if (DPMSPowerLevel) DPMSSet(0);
+ if (DPMSPowerLevel) DPMSSet(serverClient, 0);
#endif
}
@@ -190,11 +190,11 @@ Bool DPMSSupported(void)
}
/** This is used by clients (e.g., xset) to set the DPMS level. */
-void DPMSSet(int level)
+int DPMSSet(ClientPtr client, int level)
{
int i;
- if (!dpmsSupported) return;
+ if (!dpmsSupported) return Success;
if (level < 0) level = DPMSModeOn;
if (level > 3) level = DPMSModeOff;
@@ -208,5 +208,6 @@ void DPMSSet(int level)
dmxSync(dmxScreen, FALSE);
}
}
+ return Success;
}
#endif
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index 500b5682a..b70f7d2df 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -66,7 +66,7 @@ static char **dmxGetFontPath(int *npaths)
char *newfp;
int len, l, i;
- paths = GetFontPath(npaths, &len);
+ GetFontPath(serverClient, npaths, &len, &paths);
newfp = xalloc(*npaths + len);
c = (unsigned char *)newfp;
@@ -194,7 +194,7 @@ static int dmxProcSetFontPath(ClientPtr client)
if (total >= 4)
return BadLength;
- tmpFontPath = GetFontPath(&nOldPaths, &lenOldPaths);
+ GetFontPath(serverClient, &nOldPaths, &lenOldPaths, &tmpFontPath);
oldFontPath = xalloc(nOldPaths + lenOldPaths);
memmove(oldFontPath, tmpFontPath, nOldPaths + lenOldPaths);
@@ -361,7 +361,8 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont)
}
}
- if (SetFontPath(NULL, newnpaths, (unsigned char *)newfp, &error)) {
+ if (SetFontPath(serverClient, newnpaths, (unsigned char *)newfp,
+ &error)) {
/* Note that this should never happen since all of the
* FPEs were previously valid. */
dmxLog(dmxError, "Cannot reset the default font path.\n");
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index 981f64d0a..ce1730cff 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -82,13 +82,9 @@ static GCOps dmxGCOps = {
dmxPushPixels
};
-/** Initialize the GC on \a pScreen, which currently involves allocating
- * the GC private associated with this screen. */
+/** Initialize the GC on \a pScreen */
Bool dmxInitGC(ScreenPtr pScreen)
{
- if (!AllocateGCPrivate(pScreen, dmxGCPrivateIndex, sizeof(dmxGCPrivRec)))
- return FALSE;
-
return TRUE;
}
diff --git a/hw/dmx/dmxgc.h b/hw/dmx/dmxgc.h
index 3d49f6735..2da3ba85e 100644
--- a/hw/dmx/dmxgc.h
+++ b/hw/dmx/dmxgc.h
@@ -64,11 +64,11 @@ extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC);
extern Bool dmxBEFreeGC(GCPtr pGC);
/** Private index. \see dmxgc.c \see dmxscrinit.c */
-extern int dmxGCPrivateIndex;
+extern DevPrivateKey dmxGCPrivateKey;
/** Get private. */
#define DMX_GET_GC_PRIV(_pGC) \
- (dmxGCPrivPtr)(_pGC)->devPrivates[dmxGCPrivateIndex].ptr
+ (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey)
#define DMX_GC_FUNC_PROLOGUE(_pGC) \
do { \
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index bbb744c45..37dfa10ac 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -144,8 +144,7 @@ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
if (!miPictureInit(pScreen, formats, nformats))
return FALSE;
- if (!AllocatePicturePrivate(pScreen, dmxPictPrivateIndex,
- sizeof(dmxPictPrivRec)))
+ if (!dixRequestPrivate(dmxPictPrivateKey, sizeof(dmxPictPrivRec)))
return FALSE;
ps = GetPictureScreen(pScreen);
diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h
index c178ef39c..a81eb7d37 100644
--- a/hw/dmx/dmxpict.h
+++ b/hw/dmx/dmxpict.h
@@ -116,19 +116,19 @@ extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
extern int dmxBECreatePicture(PicturePtr pPicture);
extern Bool dmxBEFreePicture(PicturePtr pPicture);
-extern int dmxPictPrivateIndex; /**< Index for picture private data */
-extern int dmxGlyphSetPrivateIndex; /**< Index for glyphset private data */
+extern DevPrivateKey dmxPictPrivateKey; /**< Index for picture private data */
+extern DevPrivateKey dmxGlyphSetPrivateKey; /**< Index for glyphset private data */
/** Get the picture private data given a picture pointer */
#define DMX_GET_PICT_PRIV(_pPict) \
- (dmxPictPrivPtr)(_pPict)->devPrivates[dmxPictPrivateIndex].ptr
+ (dmxPictPrivPtr)dixLookupPrivate(&(_pPict)->devPrivates, dmxPictPrivateKey)
/** Set the glyphset private data given a glyphset pointer */
#define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv) \
- GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateIndex, (_pPriv))
+ GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateKey, (_pPriv))
/** Get the glyphset private data given a glyphset pointer */
#define DMX_GET_GLYPH_PRIV(_pGlyph) \
- (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateIndex)
+ (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateKey)
#endif /* DMXPICT_H */
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index acc08c38a..66224031a 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -44,12 +44,12 @@
#include "pixmapstr.h"
#include "servermd.h"
+#include "privates.h"
/** Initialize a private area in \a pScreen for pixmap information. */
Bool dmxInitPixmap(ScreenPtr pScreen)
{
- if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex,
- sizeof(dmxPixPrivRec)))
+ if (!dixRequestPrivate(dmxPixPrivateKey, sizeof(dmxPixPrivRec)))
return FALSE;
return TRUE;
@@ -116,6 +116,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->drawable.height = height;
pPixmap->devKind = PixmapBytePad(width, bpp);
pPixmap->refcnt = 1;
+ pPixmap->usage_hint = usage_hint;
pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
pPixPriv->pixmap = (Pixmap)0;
@@ -173,6 +174,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap)
dmxSync(dmxScreen, FALSE);
}
}
+ dixFreePrivates(pPixmap->devPrivates);
xfree(pPixmap);
#if 0
diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h
index 5cca7f44a..64418340c 100644
--- a/hw/dmx/dmxpixmap.h
+++ b/hw/dmx/dmxpixmap.h
@@ -58,10 +58,10 @@ extern void dmxBECreatePixmap(PixmapPtr pPixmap);
extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
/** Private index. \see dmxpicmap.h \see dmxscrinit.c */
-extern int dmxPixPrivateIndex;
+extern DevPrivateKey dmxPixPrivateKey;
/** Get pixmap private pointer. */
#define DMX_GET_PIXMAP_PRIV(_pPix) \
- (dmxPixPrivPtr)(_pPix)->devPrivates[dmxPixPrivateIndex].ptr
+ (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
#endif /* DMXPIXMAP_H */
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
index a78e3ae8d..1d12ec32d 100644
--- a/hw/dmx/dmxscrinit.c
+++ b/hw/dmx/dmxscrinit.c
@@ -67,15 +67,15 @@ static Bool dmxSaveScreen(ScreenPtr pScreen, int what);
static unsigned long dmxGeneration;
static unsigned long *dmxCursorGeneration;
-int dmxGCPrivateIndex; /**< Private index for GCs */
-int dmxWinPrivateIndex; /**< Private index for Windows */
-int dmxPixPrivateIndex; /**< Private index for Pixmaps */
+DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */
+DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKey; /**< Private index for Windows */
+DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKey; /**< Private index for Pixmaps */
int dmxFontPrivateIndex; /**< Private index for Fonts */
-int dmxScreenPrivateIndex; /**< Private index for Screens */
-int dmxColormapPrivateIndex; /**< Private index for Colormaps */
+DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKey; /**< Private index for Screens */
+DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKey; /**< Private index for Colormaps */
#ifdef RENDER
-int dmxPictPrivateIndex; /**< Private index for Picts */
-int dmxGlyphSetPrivateIndex; /**< Private index for GlyphSets */
+DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKey; /**< Private index for Picts */
+DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKey; /**< Private index for GlyphSets */
#endif
/** Initialize the parts of screen \a idx that require access to the
@@ -208,43 +208,11 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
int i, j;
if (dmxGeneration != serverGeneration) {
-#ifdef RENDER
- /* Allocate picture private index */
- dmxPictPrivateIndex = AllocatePicturePrivateIndex();
- if (dmxPictPrivateIndex == -1)
- return FALSE;
-
- /* Allocate glyph set private index */
- dmxGlyphSetPrivateIndex = AllocateGlyphSetPrivateIndex();
- if (dmxGlyphSetPrivateIndex == -1)
- return FALSE;
-#endif
-
- /* Allocate GC private index */
- dmxGCPrivateIndex = AllocateGCPrivateIndex();
- if (dmxGCPrivateIndex == -1)
- return FALSE;
-
- /* Allocate window private index */
- dmxWinPrivateIndex = AllocateWindowPrivateIndex();
- if (dmxWinPrivateIndex == -1)
- return FALSE;
-
- /* Allocate pixmap private index */
- dmxPixPrivateIndex = AllocatePixmapPrivateIndex();
- if (dmxPixPrivateIndex == -1)
- return FALSE;
-
/* Allocate font private index */
dmxFontPrivateIndex = AllocateFontPrivateIndex();
if (dmxFontPrivateIndex == -1)
return FALSE;
- /* Allocate screen private index */
- dmxScreenPrivateIndex = AllocateScreenPrivateIndex();
- if (dmxScreenPrivateIndex == -1)
- return FALSE;
-
dmxGeneration = serverGeneration;
}
diff --git a/hw/dmx/dmxscrinit.h b/hw/dmx/dmxscrinit.h
index 46a0a00a4..a4642350c 100644
--- a/hw/dmx/dmxscrinit.h
+++ b/hw/dmx/dmxscrinit.h
@@ -41,7 +41,7 @@
#include "scrnintstr.h"
/** Private index. \see dmxscrrinit.c \see input/dmxconcole.c */
-extern int dmxScreenPrivateIndex;
+extern DevPrivateKey dmxScreenPrivateKey;
extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]);
diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c
index 7ccecfb5b..7494e6df2 100644
--- a/hw/dmx/dmxwindow.c
+++ b/hw/dmx/dmxwindow.c
@@ -64,8 +64,7 @@ static void dmxDoSetShape(WindowPtr pWindow);
/** Initialize the private area for the window functions. */
Bool dmxInitWindow(ScreenPtr pScreen)
{
- if (!AllocateWindowPrivate(pScreen, dmxWinPrivateIndex,
- sizeof(dmxWinPrivRec)))
+ if (!dixRequestPrivate(dmxWinPrivateKey, sizeof(dmxWinPrivRec)))
return FALSE;
return TRUE;
diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h
index 79f85ac3a..72c76aa3b 100644
--- a/hw/dmx/dmxwindow.h
+++ b/hw/dmx/dmxwindow.h
@@ -103,11 +103,11 @@ extern void dmxSetShape(WindowPtr pWindow);
#endif
/** Private index. \see dmxwindow.c \see dmxscrinit.c */
-extern int dmxWinPrivateIndex;
+extern DevPrivateKey dmxWinPrivateKey;
/** Get window private pointer. */
-#define DMX_GET_WINDOW_PRIV(_pWin) \
- ((dmxWinPrivPtr)(_pWin)->devPrivates[dmxWinPrivateIndex].ptr)
+#define DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr) \
+ dixLookupPrivate(&(_pWin)->devPrivates, dmxWinPrivateKey))
/* All of these macros are only used in dmxwindow.c */
#define DMX_WINDOW_FUNC_PROLOGUE(_pGC) \
diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c
index cc820a204..b2a2ec302 100644
--- a/hw/dmx/input/dmxconsole.c
+++ b/hw/dmx/input/dmxconsole.c
@@ -612,7 +612,8 @@ static Bool dmxCloseConsoleScreen(int idx, ScreenPtr pScreen)
{
myPrivate *priv, *last;
- for (last = priv = pScreen->devPrivates[dmxScreenPrivateIndex].ptr;
+ for (last = priv = (myPrivate *)dixLookupPrivate(&pScreen->devPrivates,
+ dmxScreenPrivateKey);
priv;
priv = priv->next) dmxCloseConsole(last = priv);
@@ -846,13 +847,15 @@ void dmxConsoleInit(DevicePtr pDev)
dmxConsoleDraw(priv, 1, 1);
- if (screenInfo.screens[0]->devPrivates[dmxScreenPrivateIndex].ptr)
- priv->next = (screenInfo.screens[0]
- ->devPrivates[dmxScreenPrivateIndex].ptr);
+ if (dixLookupPrivate(&screenInfo.screens[0]->devPrivates,
+ dmxScreenPrivateKey))
+ priv->next = dixLookupPrivate(&screenInfo.screens[0]->devPrivates,
+ dmxScreenPrivateKey);
else
DMX_WRAP(CloseScreen, dmxCloseConsoleScreen,
priv, screenInfo.screens[0]);
- screenInfo.screens[0]->devPrivates[dmxScreenPrivateIndex].ptr = priv;
+ dixSetPrivate(&screenInfo.screens[0]->devPrivates, dmxScreenPrivateKey,
+ priv);
}
/** Fill in the \a info structure for the specified \a pDev. Only used
diff --git a/hw/dmx/input/dmxeq.c b/hw/dmx/input/dmxeq.c
index 3e98fb799..dff0b4423 100644
--- a/hw/dmx/input/dmxeq.c
+++ b/hw/dmx/input/dmxeq.c
@@ -82,7 +82,6 @@
#ifdef XINPUT
#include <X11/extensions/XIproto.h>
#define EXTENSION_PROC_ARGS void *
-#include "extinit.h" /* For LookupDeviceIntRec */
#endif
#if DMX_EQ_DEBUG
@@ -217,8 +216,9 @@ static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e)
{
deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)xe;
int id = ev->deviceid & DEVICE_BITS;
- DeviceIntPtr pDevice = LookupDeviceIntRec(id);
+ DeviceIntPtr pDevice;
+ dixLookupDevice(&pDevice, id, serverClient, DixUnknownAccess);
if (!pDevice) {
dmxLog(dmxError, "dmxeqProcessInputEvents: id %d not found\n", id);
return;
diff --git a/hw/kdrive/ati/ati_stub.c b/hw/kdrive/ati/ati_stub.c
index 3669fd743..f881b7f7b 100644
--- a/hw/kdrive/ati/ati_stub.c
+++ b/hw/kdrive/ati/ati_stub.c
@@ -50,14 +50,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
void
InitInput(int argc, char **argv)
{
- KdKeyboardInfo *ki = NULL;
-
- KdAddPointerDriver(&LinuxMouseDriver);
- ki = KdNewKeyboard();
- if (ki) {
- ki->driver = &LinuxKeyboardDriver;
- KdAddKeyboard(ki);
- }
+ KdOsAddInputDrivers();
KdInitInput();
}
diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 604e22eaa..d025c201c 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -3,47 +3,65 @@ INCLUDES = \
@KDRIVE_CFLAGS@ \
-I$(srcdir)/../../../exa
-noinst_LIBRARIES = libxephyr-hostx.a libxephyr-hostxv.a libxephyr.a
+if XV
+ LIBXEPHYR_HOSTXV=libxephyr-hostxv.a
+else
+ LIBXEPHYR_HOSTXV=
+endif
-bin_PROGRAMS = Xephyr
+if XEPHYR_HAS_DRI
+ LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a
+else
+ LIBXEPHYR_HOSTDRI=
+endif
+
+noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a
+bin_PROGRAMS = Xephyr
libxephyr_hostx_a_SOURCES = \
hostx.c \
hostx.h
-libxephyr_hostx_a_INCLUDES = @XEPHYR_INCS@
+libxephyr_hostxv_a_INCLUDES = @XEPHYR_INCS@
+if XV
libxephyr_hostxv_a_SOURCES= \
ephyrhostvideo.c \
ephyrhostvideo.h
+endif
+
+if XEPHYR_HAS_DRI
+
+libxephyr_hostdri_a_SOURCES= \
+ephyrdriext.c \
+ephyrdri.c \
+ephyrdri.h \
+XF86dri.c \
+ephyrglxext.c \
+ephyrglxext.h \
+ephyrhostglx.c \
+ephyrhostglx.h
+
+libxephyr_hostdri_a_CFLAGS= \
+-I$(top_srcdir) \
+@LIBDRM_CFLAGS@ \
+@DRIPROTO_CFLAGS@
+
+endif
libxephyr_a_SOURCES = \
ephyr.c \
ephyr_draw.c \
ephyrvideo.c \
- XF86dri.c \
- ephyrdriext.c \
- ephyrdri.c \
- ephyrdri.h \
- ephyrglxext.c \
- ephyrglxext.h \
- ephyrhostglx.c \
- ephyrhostglx.h \
- ephyrhostproxy.c \
- ephyrhostproxy.h \
- ephyrhostproxy.c \
- ephyrproxyext.c \
- ephyrproxyext.h \
os.c \
hostx.h \
ephyr.h \
ephyrlog.h
libxephyr_a_CFLAGS = \
-@LIBDRM_CFLAGS@ \
-I$(top_srcdir) \
-@DRIPROTO_CFLAGS@
+@LIBDRM_CFLAGS@
Xephyr_SOURCES = \
ephyrinit.c
@@ -51,17 +69,19 @@ Xephyr_SOURCES = \
Xephyr_LDADD = \
libxephyr.a \
libxephyr-hostx.a \
- libxephyr-hostxv.a \
+ $(LIBXEPHYR_HOSTXV) \
+ $(LIBXEPHYR_HOSTDRI) \
../../../exa/libexa.la \
@KDRIVE_LIBS@ \
@XEPHYR_LIBS@ \
@LIBDRM_LIBS@ \
- -lGL
+ @XEPHYR_DRI_LIBS@
Xephyr_DEPENDENCIES = \
libxephyr.a \
libxephyr-hostx.a \
- libxephyr-hostxv.a \
+ $(LIBXEPHYR_HOSTXV) \
+ $(LIBXEPHYR_HOSTDRI) \
@KDRIVE_LOCAL_LIBS@
relink:
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index efcca5a33..7df8651cb 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -36,7 +36,6 @@
#include "ephyrdri.h"
#include "ephyrdriext.h"
#include "ephyrglxext.h"
-#include "ephyrproxyext.h"
#endif /*XEPHYR_DRI*/
extern int KdTsPhyScreen;
@@ -640,7 +639,6 @@ ephyrInitScreen (ScreenPtr pScreen)
if (!ephyrNoDRI) {
ephyrDRIExtensionInit (pScreen) ;
ephyrHijackGLXExtension () ;
- ephyrProxyExtensionInit ("ATIFGLRXDRI") ;
}
#endif
@@ -739,7 +737,7 @@ ephyrUpdateModifierState(unsigned int state)
int i;
CARD8 mask;
- pkeydev = (DeviceIntPtr)LookupKeyboardDevice();
+ pkeydev = inputInfo.keyboard;
if (!pkeydev)
return;
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index e3d0cfbb4..b6be47f5e 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -44,6 +44,7 @@
#include <X11/dri/xf86dri.h>
#include <X11/dri/xf86dristr.h>
#include "misc.h"
+#include "privates.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
@@ -118,14 +119,13 @@ static Bool findWindowPairFromLocal (WindowPtr a_local,
static unsigned char DRIReqCode = 0;
-static int ephyrDRIGeneration=-1 ;
-static int ephyrDRIWindowIndex=-1 ;
-static int ephyrDRIScreenIndex=-1 ;
+static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey;
+static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey;
-#define GET_EPHYR_DRI_WINDOW_PRIV(win) \
- ((EphyrDRIWindowPrivPtr)((win)->devPrivates[ephyrDRIWindowIndex].ptr))
-#define GET_EPHYR_DRI_SCREEN_PRIV(screen) \
- ((EphyrDRIScreenPrivPtr)((screen)->devPrivates[ephyrDRIScreenIndex].ptr))
+#define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \
+ dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey))
+#define GET_EPHYR_DRI_SCREEN_PRIV(screen) ((EphyrDRIScreenPrivPtr) \
+ dixLookupPrivate(&(screen)->devPrivates, ephyrDRIScreenKey))
Bool
@@ -164,28 +164,18 @@ ephyrDRIExtensionInit (ScreenPtr a_screen)
EPHYR_LOG_ERROR ("failed to register DRI extension\n") ;
goto out ;
}
- if (ephyrDRIGeneration != serverGeneration) {
- ephyrDRIScreenIndex = AllocateScreenPrivateIndex () ;
- if (ephyrDRIScreenIndex < 0) {
- EPHYR_LOG_ERROR ("failed to allocate screen priv index\n") ;
- goto out ;
- }
- }
screen_priv = xcalloc (1, sizeof (EphyrDRIScreenPrivRec)) ;
if (!screen_priv) {
EPHYR_LOG_ERROR ("failed to allocate screen_priv\n") ;
goto out ;
}
- a_screen->devPrivates[ephyrDRIScreenIndex].ptr = screen_priv;
+ dixSetPrivate(&a_screen->devPrivates, ephyrDRIScreenKey, screen_priv);
if (!ephyrDRIScreenInit (a_screen)) {
EPHYR_LOG_ERROR ("ephyrDRIScreenInit() failed\n") ;
goto out ;
}
EphyrMirrorHostVisuals (a_screen) ;
- if (ephyrDRIGeneration != serverGeneration) {
- ephyrDRIGeneration = serverGeneration ;
- }
is_ok=TRUE ;
out:
EPHYR_LOG ("leave\n") ;
@@ -203,17 +193,6 @@ ephyrDRIScreenInit (ScreenPtr a_screen)
screen_priv=GET_EPHYR_DRI_SCREEN_PRIV (a_screen) ;
EPHYR_RETURN_VAL_IF_FAIL (screen_priv, FALSE) ;
- if (ephyrDRIGeneration != serverGeneration) {
- ephyrDRIWindowIndex = AllocateWindowPrivateIndex () ;
- if (ephyrDRIWindowIndex < 0) {
- EPHYR_LOG_ERROR ("failed to allocate window priv index\n") ;
- goto out ;
- }
- }
- if (!AllocateWindowPrivate (a_screen, ephyrDRIWindowIndex, 0)) {
- EPHYR_LOG_ERROR ("failed to allocate window privates\n") ;
- goto out ;
- }
screen_priv->CreateWindow = a_screen->CreateWindow ;
screen_priv->DestroyWindow = a_screen->DestroyWindow ;
screen_priv->MoveWindow = a_screen->MoveWindow ;
@@ -254,7 +233,7 @@ ephyrDRICreateWindow (WindowPtr a_win)
screen->CreateWindow = ephyrDRICreateWindow ;
if (is_ok) {
- a_win->devPrivates[ephyrDRIWindowIndex].ptr = NULL ;
+ dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL);
}
return is_ok ;
}
@@ -285,7 +264,7 @@ ephyrDRIDestroyWindow (WindowPtr a_win)
if (win_priv) {
destroyHostPeerWindow (a_win) ;
xfree (win_priv) ;
- a_win->devPrivates[ephyrDRIWindowIndex].ptr = NULL ;
+ dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL);
EPHYR_LOG ("destroyed the remote peer window\n") ;
}
}
@@ -1088,7 +1067,7 @@ ProcXF86DRICreateDrawable (ClientPtr client)
EPHYR_LOG_ERROR ("failed to allocate window private\n") ;
return BadAlloc ;
}
- window->devPrivates[ephyrDRIWindowIndex].ptr = win_priv ;
+ dixSetPrivate(&window->devPrivates, ephyrDRIWindowKey, win_priv);
EPHYR_LOG ("paired window '%#x' with remote '%d'\n",
(unsigned int)window, remote_win) ;
}
diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c
index 5e1c88b2c..de80c79aa 100644
--- a/hw/kdrive/fbdev/fbinit.c
+++ b/hw/kdrive/fbdev/fbinit.c
@@ -42,17 +42,7 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
void
InitInput (int argc, char **argv)
{
- KdKeyboardInfo *ki;
-
- KdAddKeyboardDriver (&LinuxKeyboardDriver);
- KdAddPointerDriver (&LinuxMouseDriver);
-#ifdef TSLIB
- KdAddPointerDriver (&TsDriver);
-#endif
-
- ki = KdParseKeyboard ("keybd");
- KdAddKeyboard(ki);
-
+ KdOsAddInputDrivers ();
KdInitInput ();
}
diff --git a/hw/kdrive/savage/s3draw.c b/hw/kdrive/savage/s3draw.c
index e2766df0f..da0d6849f 100644
--- a/hw/kdrive/savage/s3draw.c
+++ b/hw/kdrive/savage/s3draw.c
@@ -78,9 +78,8 @@ short s3alu[16] = {
#define PixTransStore(t) *pix_trans = (t)
#endif
-int s3GCPrivateIndex;
-int s3WindowPrivateIndex;
-int s3Generation;
+DevPrivateKey s3GCPrivateKey = &s3GCPrivateKey;
+DevPrivateKey s3WindowPrivateKey = &s3WindowPrivateKey;
/*
s3DoBitBlt
@@ -2182,7 +2181,7 @@ s3CreateWindow (WindowPtr pWin)
KdScreenPriv(pWin->drawable.pScreen);
s3ScreenInfo(pScreenPriv);
- pWin->devPrivates[s3WindowPrivateIndex].ptr = 0;
+ dixSetPrivate(&pWin->devPrivates, s3WindowPrivateKey, NULL);
return KdCreateWindow (pWin);
}
@@ -2979,15 +2978,7 @@ s3DrawInit (ScreenPtr pScreen)
}
else
{
- if (serverGeneration != s3Generation)
- {
- s3GCPrivateIndex = AllocateGCPrivateIndex ();
- s3WindowPrivateIndex = AllocateWindowPrivateIndex ();
- s3Generation = serverGeneration;
- }
- if (!AllocateWindowPrivate(pScreen, s3WindowPrivateIndex, 0))
- return FALSE;
- if (!AllocateGCPrivate(pScreen, s3GCPrivateIndex, sizeof (s3PrivGCRec)))
+ if (!dixRequestPrivate(s3GCPrivateKey, sizeof (s3PrivGCRec)))
return FALSE;
pScreen->CreateGC = s3CreateGC;
pScreen->CreateWindow = s3CreateWindow;
diff --git a/hw/kdrive/savage/s3draw.h b/hw/kdrive/savage/s3draw.h
index 068904370..eab8e395e 100644
--- a/hw/kdrive/savage/s3draw.h
+++ b/hw/kdrive/savage/s3draw.h
@@ -24,8 +24,8 @@
#ifndef _S3DRAW_H_
#define _S3DRAW_H_
-extern int s3GCPrivateIndex;
-extern int s3WindowPrivateIndex;
+extern DevPrivateKey s3GCPrivateKey;
+extern DevPrivateKey s3WindowPrivateKey;
typedef struct _s3Pattern {
S3PatternCache *cache;
@@ -42,16 +42,16 @@ typedef struct _s3PrivGC {
s3PatternPtr pPattern; /* pattern */
} s3PrivGCRec, *s3PrivGCPtr;
-#define s3GetGCPrivate(g) ((s3PrivGCPtr) \
- (g)->devPrivates[s3GCPrivateIndex].ptr)
+#define s3GetGCPrivate(g) ((s3PrivGCPtr) \
+ dixLookupPrivate(&(g)->devPrivates, s3GCPrivateKey))
-#define s3GCPrivate(g) s3PrivGCPtr s3Priv = s3GetGCPrivate(g)
+#define s3GCPrivate(g) s3PrivGCPtr s3Priv = s3GetGCPrivate(g)
-#define s3GetWindowPrivate(w) ((s3PatternPtr) \
- (w)->devPrivates[s3WindowPrivateIndex].ptr)
+#define s3GetWindowPrivate(w) ((s3PatternPtr) \
+ dixLookupPrivate(&(w)->devPrivates, s3WindowPrivateKey))
-#define s3SetWindowPrivate(w,p) (\
- (w)->devPrivates[s3WindowPrivateIndex].ptr = (pointer) p)
+#define s3SetWindowPrivate(w,p) \
+ dixSetPrivate(&(w)->devPrivates, s3WindowPrivateKey, p)
void _s3LoadPattern (ScreenPtr pScreen, int fb, s3PatternPtr pPattern);
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index 9cf9bf201..e75b08399 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -42,9 +42,8 @@
#define DBG_PIXMAP(a)
#endif
-int kaaGeneration;
-int kaaScreenPrivateIndex;
-int kaaPixmapPrivateIndex;
+DevPrivateKey kaaScreenPrivateKey = &kaaScreenPrivateKey;
+DevPrivateKey kaaPixmapPrivateKey = &kaaPixmapPrivateKey;
#define KAA_PIXMAP_SCORE_MOVE_IN 10
#define KAA_PIXMAP_SCORE_MAX 20
@@ -314,7 +313,7 @@ kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
}
}
- pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
+ pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp, usage_hint);
if (!pPixmap)
return NULL;
pKaaPixmap = KaaGetPixmapPriv(pPixmap);
@@ -1020,13 +1019,6 @@ kaaDrawInit (ScreenPtr pScreen,
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
#endif
- if (kaaGeneration != serverGeneration)
- {
- kaaScreenPrivateIndex = AllocateScreenPrivateIndex();
- kaaPixmapPrivateIndex = AllocatePixmapPrivateIndex();
- kaaGeneration = serverGeneration;
- }
-
pKaaScr = xalloc (sizeof (KaaScreenPrivRec));
if (!pKaaScr)
@@ -1034,7 +1026,7 @@ kaaDrawInit (ScreenPtr pScreen,
pKaaScr->info = pScreenInfo;
- pScreen->devPrivates[kaaScreenPrivateIndex].ptr = (pointer) pKaaScr;
+ dixSetPrivate(&pScreen->devPrivates, kaaScreenPrivateKey, pKaaScr);
/*
* Hook up asynchronous drawing
@@ -1058,17 +1050,11 @@ kaaDrawInit (ScreenPtr pScreen,
if ((pKaaScr->info->flags & KAA_OFFSCREEN_PIXMAPS) &&
screen->off_screen_base < screen->memory_size)
{
- if (!AllocatePixmapPrivate(pScreen, kaaPixmapPrivateIndex,
- sizeof (KaaPixmapPrivRec)))
+ if (!dixRequestPrivate(kaaPixmapPrivateKey, sizeof (KaaPixmapPrivRec)))
return FALSE;
pScreen->CreatePixmap = kaaCreatePixmap;
pScreen->DestroyPixmap = kaaDestroyPixmap;
}
- else
- {
- if (!AllocatePixmapPrivate(pScreen, kaaPixmapPrivateIndex, 0))
- return FALSE;
- }
return TRUE;
}
diff --git a/hw/kdrive/src/kaa.h b/hw/kdrive/src/kaa.h
index db890a75b..90b963b10 100644
--- a/hw/kdrive/src/kaa.h
+++ b/hw/kdrive/src/kaa.h
@@ -27,11 +27,14 @@
#include "picturestr.h"
-#define KaaGetScreenPriv(s) ((KaaScreenPrivPtr)(s)->devPrivates[kaaScreenPrivateIndex].ptr)
+#define KaaGetScreenPriv(s) ((KaaScreenPrivPtr) \
+ dixLookupPrivate(&(s)->devPrivates, kaaScreenPrivateKey))
#define KaaScreenPriv(s) KaaScreenPrivPtr pKaaScr = KaaGetScreenPriv(s)
-#define KaaGetPixmapPriv(p) ((KaaPixmapPrivPtr)(p)->devPrivates[kaaPixmapPrivateIndex].ptr)
-#define KaaSetPixmapPriv(p,a) ((p)->devPrivates[kaaPixmapPrivateIndex].ptr = (pointer) (a))
+#define KaaGetPixmapPriv(p) ((KaaPixmapPrivPtr) \
+ dixLookupPrivate(&(p)->devPrivates, kaaPixmapPrivateKey))
+#define KaaSetPixmapPriv(p,a) \
+ dixSetPrivate(&(p)->devPrivates, kaaPixmapPrivateKey, a)
#define KaaPixmapPriv(p) KaaPixmapPrivPtr pKaaPixmap = KaaGetPixmapPriv(p)
typedef struct {
@@ -46,8 +49,8 @@ typedef struct {
Bool dirty;
} KaaPixmapPrivRec, *KaaPixmapPrivPtr;
-extern int kaaScreenPrivateIndex;
-extern int kaaPixmapPrivateIndex;
+extern DevPrivateKey kaaScreenPrivateKey;
+extern DevPrivateKey kaaPixmapPrivateKey;
void
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 8c4342eaa..50148c49c 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -29,6 +29,7 @@
#endif
#include <mivalidate.h>
#include <dixstruct.h>
+#include "privates.h"
#ifdef RANDR
#include <randrstr.h>
#endif
@@ -66,8 +67,8 @@ KdDepths kdDepths[] = {
#define KD_DEFAULT_BUTTONS 5
-int kdScreenPrivateIndex;
-unsigned long kdGeneration;
+DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey;
+unsigned long kdGeneration;
Bool kdVideoTest;
unsigned long kdVideoTestTime;
@@ -632,11 +633,6 @@ KdProcessArgument (int argc, char **argv, int i)
kdDontZap = TRUE;
return 1;
}
- if (!strcmp (argv[i], "-nozap"))
- {
- kdDontZap = TRUE;
- return 1;
- }
if (!strcmp (argv[i], "-3button"))
{
kdEmulateMiddleButton = FALSE;
@@ -756,10 +752,8 @@ KdAllocatePrivates (ScreenPtr pScreen)
KdPrivScreenPtr pScreenPriv;
if (kdGeneration != serverGeneration)
- {
- kdScreenPrivateIndex = AllocateScreenPrivateIndex();
- kdGeneration = serverGeneration;
- }
+ kdGeneration = serverGeneration;
+
pScreenPriv = (KdPrivScreenPtr) xalloc(sizeof (*pScreenPriv));
if (!pScreenPriv)
return FALSE;
@@ -1406,8 +1400,8 @@ KdInitOutput (ScreenInfo *pScreenInfo,
}
#ifdef DPMSExtension
-void
-DPMSSet(int level)
+int
+DPMSSet(ClientPtr client, int level)
{
}
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 2fde66c4d..8722ba303 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -498,7 +498,7 @@ typedef struct _KaaScreenInfo {
(PixmapWidthPaddingInfo[d].padRoundUp+1)))
#endif
-extern int kdScreenPrivateIndex;
+extern DevPrivateKey kdScreenPrivateKey;
extern unsigned long kdGeneration;
extern Bool kdEnabled;
extern Bool kdSwitchPending;
@@ -510,9 +510,9 @@ extern char *kdSwitchCmd;
extern KdOsFuncs *kdOsFuncs;
#define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \
- (pScreen)->devPrivates[kdScreenPrivateIndex].ptr)
-#define KdSetScreenPriv(pScreen,v) ((pScreen)->devPrivates[kdScreenPrivateIndex].ptr = \
- (pointer) v)
+ dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey))
+#define KdSetScreenPriv(pScreen,v) \
+ dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v)
#define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen)
/* kaa.c */
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 046ab27b3..0b8d1c4e0 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -104,23 +104,23 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int);
-int KdXVWindowIndex = -1;
-int KdXvScreenIndex = -1;
+DevPrivateKey KdXVWindowKey = &KdXVWindowKey;
+DevPrivateKey KdXvScreenKey = &KdXvScreenKey;
static unsigned long KdXVGeneration = 0;
static unsigned long PortResource = 0;
-int (*XvGetScreenIndexProc)(void) = XvGetScreenIndex;
+DevPrivateKey (*XvGetScreenKeyProc)(void) = XvGetScreenKey;
unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort;
int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit;
-#define GET_XV_SCREEN(pScreen) \
- ((XvScreenPtr)((pScreen)->devPrivates[KdXvScreenIndex].ptr))
+#define GET_XV_SCREEN(pScreen) ((XvScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey))
#define GET_KDXV_SCREEN(pScreen) \
((KdXVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr))
-#define GET_KDXV_WINDOW(pWin) \
- ((KdXVWindowPtr)((pWin)->devPrivates[KdXVWindowIndex].ptr))
+#define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey))
static KdXVInitGenericAdaptorPtr *GenDrivers = NULL;
static int NumGenDrivers = 0;
@@ -192,21 +192,15 @@ KdXVScreenInit(
/* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */
- if(KdXVGeneration != serverGeneration) {
- if((KdXVWindowIndex = AllocateWindowPrivateIndex()) < 0)
- return FALSE;
- KdXVGeneration = serverGeneration;
- }
-
- if(!AllocateWindowPrivate(pScreen,KdXVWindowIndex,0))
- return FALSE;
+ if (KdXVGeneration != serverGeneration)
+ KdXVGeneration = serverGeneration;
- if(!XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc)
+ if(!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc)
return FALSE;
if(Success != (*XvScreenInitProc)(pScreen)) return FALSE;
- KdXvScreenIndex = (*XvGetScreenIndexProc)();
+ KdXvScreenKey = (*XvGetScreenKeyProc)();
PortResource = (*XvGetRTPortProc)();
pxvs = GET_XV_SCREEN(pScreen);
@@ -938,7 +932,7 @@ KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
if(!winPriv) return BadAlloc;
winPriv->PortRec = portPriv;
winPriv->next = PrivRoot;
- pWin->devPrivates[KdXVWindowIndex].ptr = (pointer)winPriv;
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv);
}
return Success;
}
@@ -956,8 +950,7 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
if(prevPriv)
prevPriv->next = winPriv->next;
else
- pWin->devPrivates[KdXVWindowIndex].ptr =
- (pointer)winPriv->next;
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next);
xfree(winPriv);
break;
}
@@ -981,7 +974,8 @@ KdXVCreateWindow(WindowPtr pWin)
ret = (*pScreen->CreateWindow)(pWin);
pScreen->CreateWindow = KdXVCreateWindow;
- if(ret) pWin->devPrivates[KdXVWindowIndex].ptr = NULL;
+ if (ret)
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL);
return ret;
}
@@ -1010,7 +1004,7 @@ KdXVDestroyWindow(WindowPtr pWin)
xfree(tmp);
}
- pWin->devPrivates[KdXVWindowIndex].ptr = NULL;
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL);
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
ret = (*pScreen->DestroyWindow)(pWin);
@@ -1067,8 +1061,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
pPriv->pDraw = NULL;
if(!pPrev)
- pWin->devPrivates[KdXVWindowIndex].ptr =
- (pointer)(WinPriv->next);
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next);
else
pPrev->next = WinPriv->next;
tmp = WinPriv;
@@ -1117,8 +1110,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy)
pPriv->pDraw = NULL;
if(!pPrev)
- pWin->devPrivates[KdXVWindowIndex].ptr =
- (pointer)(WinPriv->next);
+ dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next);
else
pPrev->next = WinPriv->next;
tmp = WinPriv;
diff --git a/hw/kdrive/vesa/vesainit.c b/hw/kdrive/vesa/vesainit.c
index 90b168108..a5e216cfd 100644
--- a/hw/kdrive/vesa/vesainit.c
+++ b/hw/kdrive/vesa/vesainit.c
@@ -70,15 +70,7 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
void
InitInput (int argc, char **argv)
{
- KdKeyboardInfo *ki = NULL;
-
- KdAddPointerDriver(&LinuxMouseDriver);
- KdAddKeyboardDriver(&LinuxKeyboardDriver);
- ki = KdNewKeyboard();
- if (ki) {
- ki->driver = &LinuxKeyboardDriver;
- KdAddKeyboard(ki);
- }
+ KdOsAddInputDrivers();
KdInitInput();
}
diff --git a/hw/kdrive/vxworks/vxkbd.c b/hw/kdrive/vxworks/vxkbd.c
index be528c78a..ac83ef729 100644
--- a/hw/kdrive/vxworks/vxkbd.c
+++ b/hw/kdrive/vxworks/vxkbd.c
@@ -232,7 +232,7 @@ VxWorksKeyboardRead (int fd)
void
VxWorksKeyboardLeds (int leds)
{
- DeviceIntPtr pKeyboard = (DeviceIntPtr) LookupKeyboardDevice ();
+ DeviceIntPtr pKeyboard = inputInfo.keyboard;
KeyboardCtrl *ctrl = &pKeyboard->kbdfeed->ctrl;
led_ioctl_info led_info;
int i;
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 0d4ca57fe..a00f7a5bb 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -220,7 +220,7 @@ AbortDDX()
ddxGiveUp();
}
-#ifdef __DARWIN__
+#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index db726fea1..c060b73f0 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -23,8 +23,8 @@ BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes
-xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES)
- cat $(MODEDEFSOURCES) | $(PERL) $(srcdir)/modeline2c.pl > $@
+xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES)
+ cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@
BUILT_SOURCES = xf86DefModeSet.c
@@ -85,9 +85,8 @@ EXTRA_DIST = \
xf86Version.h \
xorgVersion.h \
xf86Date.h \
- xf86DefModes.c \
$(MODEDEFSOURCES) \
- modeline2c.pl \
+ modeline2c.awk \
$(DISTKBDSOURCES)
if LNXACPI
diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk
new file mode 100644
index 000000000..d4b9649c8
--- /dev/null
+++ b/hw/xfree86/common/modeline2c.awk
@@ -0,0 +1,97 @@
+#!/usr/bin/awk -f
+#
+# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
+# All rights reserved.
+#
+# Based on Perl script by Dirk Hohndel.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# Usage: modeline2c.awk < modefile > xf86DefModeSet.c
+#
+
+BEGIN {
+ flagsdict[""] = "0"
+
+ flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC"
+ flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC"
+ flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC"
+ flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC"
+ flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE"
+ flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
+
+ print "/* $" "XFree86$ */"
+ print
+ print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
+ print " * modeline2c.awk */"
+ print ""
+ print "/*"
+ print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>"
+ print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>"
+ print " */"
+ print ""
+ print "#ifdef HAVE_XORG_CONFIG_H"
+ print "#include <xorg-config.h>"
+ print "#endif"
+ print ""
+ print "#ifdef __UNIXOS2__"
+ print "#define I_NEED_OS2_H"
+ print "#endif"
+ print "#include \"xf86.h\""
+ print "#include \"xf86Config.h\""
+ print "#include \"xf86Priv.h\""
+ print "#include \"xf86_OSlib.h\""
+ print ""
+ print "#include \"globals.h\""
+ print ""
+ print "#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT"
+ print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
+ print ""
+ print "DisplayModeRec xf86DefaultModes [] = {"
+
+ modeline = "\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
+ modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
+}
+
+/^[mM][oO][dD][eE][lL][iI][nN][eE]/ {
+ flags = $0
+ gsub(modeline_data, "", flags)
+ flags = tolower(flags)
+ printf(modeline, $4, $8, $3 * 1000, $4, $5, $6, $7,
+ $8, $9, $10, $11, flagsdict[flags])
+ # Half-width double scanned modes
+ printf(modeline, $4/2, $8/2, $3 * 500, $4/2, $5/2, $6/2, $7/2,
+ $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
+}
+
+/^#/ {
+ print "/*" substr($0, 2) " */"
+}
+
+END {
+ printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n")
+}
diff --git a/hw/xfree86/common/modeline2c.pl b/hw/xfree86/common/modeline2c.pl
deleted file mode 100644
index 88e380de4..000000000
--- a/hw/xfree86/common/modeline2c.pl
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/usr/bin/perl
-
-# automatically generate the xf86DefModeSet.c file from a normal
-# XF86Config style file of Modelines
-#
-# run as
-#
-# perl /modeline2c.pl < [modesfile] > xf86DefModes.c
-#
-# hackish perl - author Dirk Hohndel
-#
-# Copyright 1999-2003 by The XFree86 Project, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the copyright holder(s)
-# and author(s) shall not be used in advertising or otherwise to promote
-# the sale, use or other dealings in this Software without prior written
-# authorization from the copyright holder(s) and author(s).
-#
-# $XFree86: xc/programs/Xserver/hw/xfree86/common/modeline2c.pl,v 1.10tsi Exp $
-
-#my %flagshash;
-$flagshash{""} = "0";
-# $flagshash{"Interlace"} = "V_INTERLACE";
-# $flagshash{"+hsync"} = "V_PHSYNC";
-# $flagshash{"-hsync"} = "V_NHSYNC";
-# $flagshash{"+vsync"} = "V_PVSYNC";
-# $flagshash{"-vsync"} = "V_NVSYNC";
-# XXX I'm definitely not a perl guru... -- tsi
-$flagshash{"+hsync +vsync"} = "V_PHSYNC | V_PVSYNC";
-$flagshash{"+hsync -vsync"} = "V_PHSYNC | V_NVSYNC";
-$flagshash{"-hsync +vsync"} = "V_NHSYNC | V_PVSYNC";
-$flagshash{"-hsync -vsync"} = "V_NHSYNC | V_NVSYNC";
-$flagshash{"+hsync +vsync interlace"} = "V_PHSYNC | V_PVSYNC | V_INTERLACE";
-$flagshash{"+hsync -vsync interlace"} = "V_PHSYNC | V_NVSYNC | V_INTERLACE";
-$flagshash{"-hsync +vsync interlace"} = "V_NHSYNC | V_PVSYNC | V_INTERLACE";
-$flagshash{"-hsync -vsync interlace"} = "V_NHSYNC | V_NVSYNC | V_INTERLACE";
-
-# stop CVS from expanding the XFree86 Id here...
-
-$proj = "XFree86";
-printf("/* \$$proj\$ */
-
-/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at
- * modeline2c.pl */
-
-/*
- * Copyright 1999-2003 by The XFree86 Project, Inc.
- *
- * Author: Dirk Hohndel <hohndel\@XFree86.Org>
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include \"xf86.h\"
-#include \"xf86Config.h\"
-#include \"xf86Priv.h\"
-#include \"xf86_OSlib.h\"
-
-#include \"globals.h\"
-
-#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT
-#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
-
-DisplayModeRec xf86DefaultModes [] = {
-");
-while (<>) {
- if (/^\#/) {
- s/^\#//;
- chop;
- print "/*" . $_ . " */\n";
- }
- if (/^ModeLine\s+(\S+)\s+([\d.\s]+)(.*)/i) {
- $name = $1;
- $values = $2;
- $flags = $3;
- $flags =~ y/A-Z/a-z/;
- $values =~ /([\d.]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/;
- printf("\t{MODEPREFIX(%s),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n",
- $name,$1*1000,$2,$3,$4,$5,$6,$7,$8,$9,$flagshash{$flags});
-# Also generate half-width doublescanned modes
- printf("\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s | V_DBLSCAN, MODESUFFIX},\n",
- $2/2,$6/2,$1*500,$2/2,$3/2,$4/2,$5/2,$6/2,$7/2,$8/2,$9/2,$flagshash{$flags});
- }
-
-
-}
-printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n");
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 064107428..4e7d914bf 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -57,9 +57,9 @@
/* General parameters */
extern int xf86DoConfigure;
extern Bool xf86DoConfigurePass1;
-extern int xf86ScreenIndex; /* Index into pScreen.devPrivates */
-extern int xf86CreateRootWindowIndex; /* Index into pScreen.devPrivates */
-extern int xf86PixmapIndex;
+extern DevPrivateKey xf86ScreenKey;
+extern DevPrivateKey xf86CreateRootWindowKey;
+extern DevPrivateKey xf86PixmapKey;
extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
extern const unsigned char byte_reversed[256];
extern ScrnInfoPtr xf86CurrentScreen;
@@ -72,8 +72,8 @@ extern Bool sbusSlotClaimed;
extern confDRIRec xf86ConfigDRI;
extern Bool xf86inSuspend;
-#define XF86SCRNINFO(p) ((ScrnInfoPtr)((p)->devPrivates[xf86ScreenIndex].ptr))
-
+#define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \
+ xf86ScreenKey))
#define XF86FLIP_PIXELS() \
do { \
if (xf86GetFlipPixels()) { \
@@ -339,6 +339,7 @@ Bool xf86IsUnblank(int mode);
void xf86AddModuleInfo(ModuleInfoPtr info, pointer module);
void xf86DeleteModuleInfo(int idx);
+void xf86getsecs(long *, long *);
/* xf86Debug.c */
#ifdef BUILDDEBUG
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index c5998bfb8..c6e197216 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -43,16 +43,6 @@
/* Sections for the default built-in configuration. */
-#define BUILTIN_MODULE_SECTION \
- "Section \"Module\"\n" \
- "\tLoad\t\"extmod\"\n" \
- "\tLoad\t\"dbe\"\n" \
- "\tLoad\t\"glx\"\n" \
- "\tLoad\t\"freetype\"\n" \
- "\tLoad\t\"record\"\n" \
- "\tLoad\t\"dri\"\n" \
- "EndSection\n\n"
-
#define BUILTIN_DEVICE_NAME \
"\"Builtin Default %s Device %d\""
@@ -68,14 +58,6 @@
BUILTIN_DEVICE_SECTION_PRE \
BUILTIN_DEVICE_SECTION_POST
-#define BUILTIN_MONITOR_NAME \
- "\"Builtin Default Monitor\""
-
-#define BUILTIN_MONITOR_SECTION \
- "Section \"Monitor\"\n" \
- "\tIdentifier\t" BUILTIN_MONITOR_NAME "\n" \
- "EndSection\n\n"
-
#define BUILTIN_SCREEN_NAME \
"\"Builtin Default %s Screen %d\""
@@ -83,7 +65,6 @@
"Section \"Screen\"\n" \
"\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
- "\tMonitor\t" BUILTIN_MONITOR_NAME "\n" \
"EndSection\n\n"
#define BUILTIN_LAYOUT_SECTION_PRE \
@@ -220,9 +201,6 @@ xf86AutoConfig(void)
driver = chooseVideoDriver();
- AppendToConfig(BUILTIN_MODULE_SECTION);
- AppendToConfig(BUILTIN_MONITOR_SECTION);
-
if (driver) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_PRE,
driver, 0, driver);
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 3dc08f8a2..f7ffac85e 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -75,7 +75,6 @@ static resPtr AccReducers = NULL;
/* resource lists */
resPtr Acc = NULL;
-resPtr osRes = NULL;
/* predefined special resources */
_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END};
@@ -291,8 +290,10 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex)
if (entityIndex == -1)
return;
if (xf86Entities[entityIndex]->inUse &&
- !(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL))
- FatalError("Requested Entity already in use!\n");
+ !(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL)) {
+ ErrorF("Requested Entity already in use!\n");
+ return;
+ }
pScrn->numEntities++;
pScrn->entityList = xnfrealloc(pScrn->entityList,
@@ -1357,28 +1358,12 @@ xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex)
void
xf86ResourceBrokerInit(void)
{
-#if 0
- resPtr resPci;
-#endif
-
- osRes = NULL;
+ Acc = NULL;
/* Get the ranges used exclusively by the system */
- osRes = xf86AccResFromOS(osRes);
- xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges:\n");
- xf86PrintResList(3, osRes);
-
- /* Bus dep initialization */
-#if 0
- resPci = ResourceBrokerInitPci(&osRes);
- Acc = xf86JoinResLists(xf86DupResList(osRes), resPci);
-#else
- Acc = xf86DupResList( osRes );
-#endif
-
- xf86MsgVerb(X_INFO, 3, "All system resource ranges:\n");
+ Acc = xf86AccResFromOS(Acc);
+ xf86MsgVerb(X_INFO, 3, "System resource ranges:\n");
xf86PrintResList(3, Acc);
-
}
#define MEM_ALIGN (1024 * 1024)
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 5ea5cc8e1..489ee3459 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -132,7 +132,6 @@ extern int xf86NumEntities;
extern xf86AccessRec AccessNULL;
extern BusRec primaryBus;
extern resPtr Acc;
-extern resPtr osRes;
extern resPtr ResRange;
extern BusAccPtr xf86BusAccInfo;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 985ed1260..a6bc5dbe3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -93,7 +93,6 @@ extern DeviceAssocRec mouse_assoc;
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
@@ -538,14 +537,8 @@ fixup_video_driver_list(char **drivers)
}
}
-
-/*
- * Generate a compiled-in list of driver names. This is used to produce a
- * consistent probe order. For the loader server, we also look for vendor-
- * provided modules, pre-pending them to our own list.
- */
static char **
-GenerateDriverlist(char * dirname, char * drivernames)
+GenerateDriverlist(char * dirname)
{
char **ret;
const char *subdirs[] = { dirname, NULL };
@@ -559,20 +552,13 @@ GenerateDriverlist(char * dirname, char * drivernames)
return ret;
}
-
char **
xf86DriverlistFromCompile(void)
{
static char **driverlist = NULL;
- static Bool generated = FALSE;
-
- /* This string is modified in-place */
- static char drivernames[] = DRIVERS;
- if (!generated) {
- generated = TRUE;
- driverlist = GenerateDriverlist("drivers", drivernames);
- }
+ if (!driverlist)
+ driverlist = GenerateDriverlist("drivers");
return driverlist;
}
@@ -1972,6 +1958,18 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
}
screenp->displays = xnfalloc((count) * sizeof(DispRec));
screenp->numdisplays = count;
+
+ /* Fill in the default Virtual size, if any */
+ if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) {
+ for (count = 0, dispptr = conf_screen->scrn_display_lst;
+ dispptr;
+ dispptr = (XF86ConfDisplayPtr)dispptr->list.next, count++) {
+ screenp->displays[count].virtualX = conf_screen->scrn_virtualX;
+ screenp->displays[count].virtualY = conf_screen->scrn_virtualY;
+ }
+ }
+
+ /* Now do the per-Display Virtual sizes */
count = 0;
dispptr = conf_screen->scrn_display_lst;
while(dispptr) {
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 0cf445cdb..536f89700 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -372,9 +372,6 @@ configureDeviceSection (int screennum)
char identifier[16];
OptionInfoPtr p;
int i = 0;
-#ifdef DO_FBDEV_PROBE
- Bool foundFBDEV = FALSE;
-#endif
parsePrologue (XF86ConfDevicePtr, XF86ConfDeviceRec)
/* Move device info to parser structure */
@@ -443,32 +440,6 @@ configureDeviceSection (int screennum)
}
}
-#ifdef DO_FBDEV_PROBE
- /* Crude mechanism to auto-detect fbdev (os dependent) */
- /* Skip it for now. Options list it anyway, and we can't
- * determine which screen/driver this belongs too anyway. */
- {
- int fd;
-
- fd = open("/dev/fb0", 0);
- if (fd != -1) {
- foundFBDEV = TRUE;
- close(fd);
- }
- }
-
- if (foundFBDEV) {
- XF86OptionPtr fbdev;
-
- fbdev = xf86confmalloc(sizeof(XF86OptionRec));
- memset((XF86OptionPtr)fbdev,0,sizeof(XF86OptionRec));
- fbdev->opt_name = "UseFBDev";
- fbdev->opt_val = "ON";
- ptr->dev_option_lst = (XF86OptionPtr)xf86addListItem(
- (glp)ptr->dev_option_lst, (glp)fbdev);
- }
-#endif
-
return ptr;
}
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 5b3664ac0..dfec4b1ae 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -49,8 +49,7 @@
#include "mi.h"
-static unsigned long DGAGeneration = 0;
-static int DGAScreenIndex = -1;
+static DevPrivateKey DGAScreenKey = NULL;
static int mieq_installed = 0;
static Bool DGACloseScreen(int i, ScreenPtr pScreen);
@@ -68,8 +67,8 @@ DGACopyModeInfo(
_X_EXPORT int *XDGAEventBase = NULL;
-#define DGA_GET_SCREEN_PRIV(pScreen) \
- ((DGAScreenPtr)((pScreen)->devPrivates[DGAScreenIndex].ptr))
+#define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey))
typedef struct _FakedVisualList{
@@ -116,11 +115,7 @@ DGAInit(
if(!modes || num <= 0)
return FALSE;
- if(DGAGeneration != serverGeneration) {
- if((DGAScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- DGAGeneration = serverGeneration;
- }
+ DGAScreenKey = &DGAScreenKey;
if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec))))
return FALSE;
@@ -148,7 +143,7 @@ DGAInit(
modes[i].flags &= ~DGA_PIXMAP_AVAILABLE;
#endif
- pScreen->devPrivates[DGAScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv);
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = DGACloseScreen;
pScreenPriv->DestroyColormap = pScreen->DestroyColormap;
@@ -176,7 +171,7 @@ DGAReInitModes(
int i;
/* No DGA? Ignore call (but don't make it look like it failed) */
- if(DGAScreenIndex < 0)
+ if(DGAScreenKey == NULL)
return TRUE;
pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
@@ -350,7 +345,7 @@ xf86SetDGAMode(
DGAModePtr pMode = NULL;
/* First check if DGAInit was successful on this screen */
- if (DGAScreenIndex < 0)
+ if (DGAScreenKey == NULL)
return BadValue;
pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
if (!pScreenPriv)
@@ -485,7 +480,7 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode)
DGAModePtr pMode;
PixmapPtr pPix;
- if(DGAScreenIndex < 0)
+ if(DGAScreenKey == NULL)
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -535,11 +530,12 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode)
_X_EXPORT Bool
DGAAvailable(int index)
{
- if(DGAScreenIndex < 0)
+ if(DGAScreenKey == NULL)
return FALSE;
- if (!xf86NoSharedResources(((ScrnInfoPtr)screenInfo.screens[index]->
- devPrivates[xf86ScreenIndex].ptr)->scrnIndex,MEM))
+ if (!xf86NoSharedResources(((ScrnInfoPtr)dixLookupPrivate(
+ &screenInfo.screens[index]->devPrivates,
+ xf86ScreenKey))->scrnIndex, MEM))
return FALSE;
if(DGA_GET_SCREEN_PRIV(screenInfo.screens[index]))
@@ -553,7 +549,7 @@ DGAActive(int index)
{
DGAScreenPtr pScreenPriv;
- if(DGAScreenIndex < 0)
+ if(DGAScreenKey == NULL)
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -574,7 +570,7 @@ DGAShutdown()
ScrnInfoPtr pScrn;
int i;
- if(DGAScreenIndex < 0)
+ if(DGAScreenKey == NULL)
return;
for(i = 0; i < screenInfo.numScreens; i++) {
@@ -904,7 +900,7 @@ DGAVTSwitch(void)
/* Alternatively, this could send events to DGA clients */
- if(DGAScreenIndex >= 0) {
+ if(DGAScreenKey) {
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
if(pScreenPriv && pScreenPriv->current)
@@ -921,7 +917,7 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down)
DGAScreenPtr pScreenPriv;
dgaEvent de;
- if(DGAScreenIndex < 0) /* no DGA */
+ if(DGAScreenKey == NULL) /* no DGA */
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -945,7 +941,7 @@ DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy)
DGAScreenPtr pScreenPriv;
dgaEvent de;
- if(DGAScreenIndex < 0) /* no DGA */
+ if(DGAScreenKey == NULL) /* no DGA */
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -980,7 +976,7 @@ DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down)
DGAScreenPtr pScreenPriv;
dgaEvent de;
- if (DGAScreenIndex < 0)
+ if (DGAScreenKey == NULL)
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -1006,7 +1002,7 @@ Bool
DGAIsDgaEvent (xEvent *e)
{
int coreEquiv;
- if (DGAScreenIndex < 0 || XDGAEventBase == 0)
+ if (DGAScreenKey == NULL || XDGAEventBase == 0)
return FALSE;
coreEquiv = e->u.u.type - *XDGAEventBase;
if (KeyPress <= coreEquiv && coreEquiv <= MotionNotify)
@@ -1278,7 +1274,7 @@ DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents)
int coreEquiv;
/* no DGA */
- if (DGAScreenIndex < 0 || XDGAEventBase == 0)
+ if (DGAScreenKey == NULL || XDGAEventBase == 0)
return;
pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 3aa83e882..43efb8ed4 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -47,8 +47,7 @@
#ifdef DPMSExtension
-static int DPMSGeneration = 0;
-static int DPMSIndex = -1;
+static DevPrivateKey DPMSKey = NULL;
static Bool DPMSClose(int i, ScreenPtr pScreen);
static int DPMSCount = 0;
#endif
@@ -62,18 +61,15 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
DPMSPtr pDPMS;
pointer DPMSOpt;
- if (serverGeneration != DPMSGeneration) {
- if ((DPMSIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- DPMSGeneration = serverGeneration;
- }
+ DPMSKey = &DPMSKey;
if (DPMSDisabledSwitch)
DPMSEnabled = FALSE;
- if (!(pScreen->devPrivates[DPMSIndex].ptr = xcalloc(sizeof(DPMSRec), 1)))
+ if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey,
+ xcalloc(sizeof(DPMSRec), 1)))
return FALSE;
- pDPMS = (DPMSPtr)pScreen->devPrivates[DPMSIndex].ptr;
+ pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
pScrn->DPMSSet = set;
pDPMS->Flags = flags;
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
@@ -110,10 +106,10 @@ DPMSClose(int i, ScreenPtr pScreen)
DPMSPtr pDPMS;
/* This shouldn't happen */
- if (DPMSIndex < 0)
+ if (DPMSKey == NULL)
return FALSE;
- pDPMS = (DPMSPtr)pScreen->devPrivates[DPMSIndex].ptr;
+ pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
/* This shouldn't happen */
if (!pDPMS)
@@ -132,9 +128,9 @@ DPMSClose(int i, ScreenPtr pScreen)
}
xfree((pointer)pDPMS);
- pScreen->devPrivates[DPMSIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL);
if (--DPMSCount == 0)
- DPMSIndex = -1;
+ DPMSKey = NULL;
return pScreen->CloseScreen(i, pScreen);
}
@@ -144,30 +140,35 @@ DPMSClose(int i, ScreenPtr pScreen)
* Device dependent DPMS mode setting hook. This is called whenever
* the DPMS mode is to be changed.
*/
-_X_EXPORT void
-DPMSSet(int level)
+_X_EXPORT int
+DPMSSet(ClientPtr client, int level)
{
- int i;
+ int rc, i;
DPMSPtr pDPMS;
ScrnInfoPtr pScrn;
DPMSPowerLevel = level;
- if (DPMSIndex < 0)
- return;
+ if (DPMSKey == NULL)
+ return Success;
- if (level != DPMSModeOn)
- SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (level != DPMSModeOn) {
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (rc != Success)
+ return rc;
+ }
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
pScrn = xf86Screens[i];
- pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr;
+ pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates,
+ DPMSKey);
if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
xf86EnableAccess(pScrn);
pScrn->DPMSSet(pScrn, level, 0);
}
}
+ return Success;
}
@@ -182,14 +183,15 @@ DPMSSupported(void)
DPMSPtr pDPMS;
ScrnInfoPtr pScrn;
- if (DPMSIndex < 0) {
+ if (DPMSKey == NULL) {
return FALSE;
}
/* For each screen, check if DPMS is supported */
for (i = 0; i < xf86NumScreens; i++) {
pScrn = xf86Screens[i];
- pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr;
+ pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates,
+ DPMSKey);
if (pDPMS && pScrn->DPMSSet)
return TRUE;
}
diff --git a/hw/xfree86/common/xf86DefModes.c b/hw/xfree86/common/xf86DefModes.c
deleted file mode 100644
index bdb64fe8e..000000000
--- a/hw/xfree86/common/xf86DefModes.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at
- * modeline2c.pl */
-
-/*
- * Copyright 1999-2003 by The XFree86 Project, Inc.
- *
- * Author: Dirk Hohndel <hohndel@XFree86.Org>
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86Config.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-#include "globals.h"
-
-#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT
-#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
-
-DisplayModeRec xf86DefaultModes [] = {
-/* 640x350 @ 85Hz (VESA) hsync: 37.9kHz */
- {MODEPREFIX("640x350"),31500, 640,672,736,832,0, 350,382,385,445,0, V_PHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("320x175"),15750, 320,336,368,416,0, 175,191,192,222,0, V_PHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 640x400 @ 85Hz (VESA) hsync: 37.9kHz */
- {MODEPREFIX("640x400"),31500, 640,672,736,832,0, 400,401,404,445,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("320x200"),15750, 320,336,368,416,0, 200,200,202,222,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 720x400 @ 85Hz (VESA) hsync: 37.9kHz */
- {MODEPREFIX("720x400"),35500, 720,756,828,936,0, 400,401,404,446,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("360x200"),17750, 360,378,414,468,0, 200,200,202,223,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz */
- {MODEPREFIX("640x480"),25200, 640,656,752,800,0, 480,490,492,525,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("320x240"),12600, 320,328,376,400,0, 240,245,246,262,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 640x480 @ 72Hz (VESA) hsync: 37.9kHz */
- {MODEPREFIX("640x480"),31500, 640,664,704,832,0, 480,489,491,520,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("320x240"),15750, 320,332,352,416,0, 240,244,245,260,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 640x480 @ 75Hz (VESA) hsync: 37.5kHz */
- {MODEPREFIX("640x480"),31500, 640,656,720,840,0, 480,481,484,500,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("320x240"),15750, 320,328,360,420,0, 240,240,242,250,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 640x480 @ 85Hz (VESA) hsync: 43.3kHz */
- {MODEPREFIX("640x480"),36000, 640,696,752,832,0, 480,481,484,509,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("320x240"),18000, 320,348,376,416,0, 240,240,242,254,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 800x600 @ 56Hz (VESA) hsync: 35.2kHz */
- {MODEPREFIX("800x600"),36000, 800,824,896,1024,0, 600,601,603,625,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("400x300"),18000, 400,412,448,512,0, 300,300,301,312,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 800x600 @ 60Hz (VESA) hsync: 37.9kHz */
- {MODEPREFIX("800x600"),40000, 800,840,968,1056,0, 600,601,605,628,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("400x300"),20000, 400,420,484,528,0, 300,300,302,314,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 800x600 @ 72Hz (VESA) hsync: 48.1kHz */
- {MODEPREFIX("800x600"),50000, 800,856,976,1040,0, 600,637,643,666,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("400x300"),25000, 400,428,488,520,0, 300,318,321,333,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 800x600 @ 75Hz (VESA) hsync: 46.9kHz */
- {MODEPREFIX("800x600"),49500, 800,816,896,1056,0, 600,601,604,625,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("400x300"),24750, 400,408,448,528,0, 300,300,302,312,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 800x600 @ 85Hz (VESA) hsync: 53.7kHz */
- {MODEPREFIX("800x600"),56300, 800,832,896,1048,0, 600,601,604,631,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("400x300"),28150, 400,416,448,524,0, 300,300,302,315,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz */
- {MODEPREFIX("1024x768"),44900, 1024,1032,1208,1264,0, 768,768,776,817,0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX},
- {MODEPREFIX("512x384"),22450, 512,516,604,632,0, 384,384,388,408,0, V_PHSYNC | V_PVSYNC | V_INTERLACE | V_DBLSCAN, MODESUFFIX},
-/* 1024x768 @ 60Hz (VESA) hsync: 48.4kHz */
- {MODEPREFIX("1024x768"),65000, 1024,1048,1184,1344,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("512x384"),32500, 512,524,592,672,0, 384,385,388,403,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1024x768 @ 70Hz (VESA) hsync: 56.5kHz */
- {MODEPREFIX("1024x768"),75000, 1024,1048,1184,1328,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("512x384"),37500, 512,524,592,664,0, 384,385,388,403,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1024x768 @ 75Hz (VESA) hsync: 60.0kHz */
- {MODEPREFIX("1024x768"),78800, 1024,1040,1136,1312,0, 768,769,772,800,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("512x384"),39400, 512,520,568,656,0, 384,384,386,400,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1024x768 @ 85Hz (VESA) hsync: 68.7kHz */
- {MODEPREFIX("1024x768"),94500, 1024,1072,1168,1376,0, 768,769,772,808,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("512x384"),47250, 512,536,584,688,0, 384,384,386,404,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1152x864 @ 75Hz (VESA) hsync: 67.5kHz */
- {MODEPREFIX("1152x864"),108000, 1152,1216,1344,1600,0, 864,865,868,900,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("576x432"),54000, 576,608,672,800,0, 432,432,434,450,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1280x960 @ 60Hz (VESA) hsync: 60.0kHz */
- {MODEPREFIX("1280x960"),108000, 1280,1376,1488,1800,0, 960,961,964,1000,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("640x480"),54000, 640,688,744,900,0, 480,480,482,500,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1280x960 @ 85Hz (VESA) hsync: 85.9kHz */
- {MODEPREFIX("1280x960"),148500, 1280,1344,1504,1728,0, 960,961,964,1011,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("640x480"),74250, 640,672,752,864,0, 480,480,482,505,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz */
- {MODEPREFIX("1280x1024"),108000, 1280,1328,1440,1688,0, 1024,1025,1028,1066,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("640x512"),54000, 640,664,720,844,0, 512,512,514,533,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz */
- {MODEPREFIX("1280x1024"),135000, 1280,1296,1440,1688,0, 1024,1025,1028,1066,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("640x512"),67500, 640,648,720,844,0, 512,512,514,533,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz */
- {MODEPREFIX("1280x1024"),157500, 1280,1344,1504,1728,0, 1024,1025,1028,1072,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("640x512"),78750, 640,672,752,864,0, 512,512,514,536,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz */
- {MODEPREFIX("1600x1200"),162000, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("800x600"),81000, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz */
- {MODEPREFIX("1600x1200"),175500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("800x600"),87750, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz */
- {MODEPREFIX("1600x1200"),189000, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("800x600"),94500, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz */
- {MODEPREFIX("1600x1200"),202500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("800x600"),101250, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz */
- {MODEPREFIX("1600x1200"),229500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("800x600"),114750, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz */
- {MODEPREFIX("1792x1344"),204800, 1792,1920,2120,2448,0, 1344,1345,1348,1394,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("896x672"),102400, 896,960,1060,1224,0, 672,672,674,697,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz */
- {MODEPREFIX("1792x1344"),261000, 1792,1888,2104,2456,0, 1344,1345,1348,1417,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("896x672"),130500, 896,944,1052,1228,0, 672,672,674,708,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz */
- {MODEPREFIX("1856x1392"),218300, 1856,1952,2176,2528,0, 1392,1393,1396,1439,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("928x696"),109150, 928,976,1088,1264,0, 696,696,698,719,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz */
- {MODEPREFIX("1856x1392"),288000, 1856,1984,2208,2560,0, 1392,1393,1396,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("928x696"),144000, 928,992,1104,1280,0, 696,696,698,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz */
- {MODEPREFIX("1920x1440"),234000, 1920,2048,2256,2600,0, 1440,1441,1444,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("960x720"),117000, 960,1024,1128,1300,0, 720,720,722,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz */
- {MODEPREFIX("1920x1440"),297000, 1920,2064,2288,2640,0, 1440,1441,1444,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("960x720"),148500, 960,1032,1144,1320,0, 720,720,722,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz */
- {MODEPREFIX("832x624"),57284, 832,864,928,1152,0, 624,625,628,667,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("416x312"),28642, 416,432,464,576,0, 312,312,314,333,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1152x768 @ 54.8Hz (Titanium PowerBook) hsync: 44.2kHz */
- {MODEPREFIX("1152x768"),64995, 1152,1178,1314,1472,0, 768,771,777,806,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("576x384"),32497, 576,589,657,736,0, 384,385,388,403,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz */
- {MODEPREFIX("1400x1050"),122000, 1400,1488,1640,1880,0, 1050,1052,1064,1082,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("700x525"),61000, 700,744,820,940,0, 525,526,532,541,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz */
- {MODEPREFIX("1400x1050"),155800, 1400,1464,1784,1912,0, 1050,1052,1064,1090,0, V_PHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("700x525"),77900, 700,732,892,956,0, 525,526,532,545,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1600x1024 @ 60Hz (SGI 1600SW) hsync: 64.0kHz */
- {MODEPREFIX("1600x1024"),106910, 1600,1620,1640,1670,0, 1024,1027,1030,1067,0, V_NHSYNC | V_NVSYNC, MODESUFFIX},
- {MODEPREFIX("800x512"),53455, 800,810,820,835,0, 512,513,515,533,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz */
- {MODEPREFIX("1920x1440"),341350, 1920,2072,2288,2656,0, 1440,1441,1444,1512,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("960x720"),170675, 960,1036,1144,1328,0, 720,720,722,756,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz */
- {MODEPREFIX("2048x1536"),266950, 2048,2200,2424,2800,0, 1536,1537,1540,1589,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("1024x768"),133475, 1024,1100,1212,1400,0, 768,768,770,794,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz */
- {MODEPREFIX("2048x1536"),340480, 2048,2216,2440,2832,0, 1536,1537,1540,1603,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("1024x768"),170240, 1024,1108,1220,1416,0, 768,768,770,801,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
-/* 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz */
- {MODEPREFIX("2048x1536"),388040, 2048,2216,2440,2832,0, 1536,1537,1540,1612,0, V_NHSYNC | V_PVSYNC, MODESUFFIX},
- {MODEPREFIX("1024x768"),194020, 1024,1108,1220,1416,0, 768,768,770,806,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX},
- {MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}
-};
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 4bbcee231..d1e4393fd 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -859,7 +859,7 @@ xf86VTSwitch()
#endif
#ifdef DPMSExtension
if (DPMSPowerLevel != DPMSModeOn)
- DPMSSet(DPMSModeOn);
+ DPMSSet(serverClient, DPMSModeOn);
#endif
for (i = 0; i < xf86NumScreens; i++) {
if (!(dispatchException & DE_TERMINATE))
@@ -908,7 +908,7 @@ xf86VTSwitch()
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
}
}
- SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+ dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
@@ -972,7 +972,7 @@ xf86VTSwitch()
}
/* Turn screen saver off when switching back */
- SaveScreens(SCREEN_SAVER_FORCER,ScreenSaverReset);
+ dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index b3969b102..d796d627c 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -46,10 +46,12 @@
/* Globals that video drivers may access */
-_X_EXPORT int xf86ScreenIndex = -1; /* Index of ScrnInfo in pScreen.devPrivates */
-int xf86CreateRootWindowIndex = -1; /* Index into pScreen.devPrivates */
+/* Index into pScreen.devPrivates */
+DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKey;
+/* Index of ScrnInfo in pScreen.devPrivates */
+_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKey;
+_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKey;
_X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */
-_X_EXPORT int xf86PixmapIndex = 0;
_X_EXPORT const unsigned char byte_reversed[256] =
{
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1ef79730c..ec524e63c 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1492,9 +1492,6 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
}
-#define MAXDRIVERS 64 /* A >hack<, to be sure ... */
-
-
_X_EXPORT int
xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
{
@@ -2960,3 +2957,17 @@ xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start,
{
return GetMotionHistory(pDev, buff, start, stop, pScreen);
}
+
+_X_EXPORT void
+xf86getsecs(long * secs, long * usecs)
+{
+ struct timeval tv;
+
+ X_GETTIMEOFDAY(&tv);
+ if (secs)
+ *secs = tv.tv_sec;
+ if (usecs)
+ *usecs= tv.tv_usec;
+
+ return;
+}
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index bf577e6ad..d12b6bd6a 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -139,8 +139,8 @@ xf86CreateRootWindow(WindowPtr pWin)
int err = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
RootWinPropPtr pProp;
- CreateWindowProcPtr CreateWindow =
- (CreateWindowProcPtr)(pScreen->devPrivates[xf86CreateRootWindowIndex].ptr);
+ CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
+ dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
#ifdef DEBUG
ErrorF("xf86CreateRootWindow(%p)\n", pWin);
@@ -156,7 +156,7 @@ xf86CreateRootWindow(WindowPtr pWin)
/* Unhook this function ... */
pScreen->CreateWindow = CreateWindow;
- pScreen->devPrivates[xf86CreateRootWindowIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL);
/* ... and call the previous CreateWindow fuction, if any */
if (NULL!=pScreen->CreateWindow) {
@@ -476,7 +476,6 @@ void
InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
{
int i, j, k, scr_index;
- static unsigned long generation = 0;
char **modulelist;
pointer *optionlist;
screenLayoutPtr layout;
@@ -487,14 +486,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Initialising = TRUE;
- /* Do this early? */
- if (generation != serverGeneration) {
- xf86ScreenIndex = AllocateScreenPrivateIndex();
- xf86CreateRootWindowIndex = AllocateScreenPrivateIndex();
- xf86PixmapIndex = AllocatePixmapPrivateIndex();
- generation = serverGeneration;
- }
-
if (serverGeneration == 1) {
pScreenInfo->numScreens = 0;
@@ -1070,8 +1061,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
* Hook in our ScrnInfoRec, and initialise some other pScreen
* fields.
*/
- screenInfo.screens[scr_index]->devPrivates[xf86ScreenIndex].ptr
- = (pointer)xf86Screens[i];
+ dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates,
+ xf86ScreenKey, xf86Screens[i]);
xf86Screens[i]->pScreen = screenInfo.screens[scr_index];
/* The driver should set this, but make sure it is set anyway */
xf86Screens[i]->vtSema = TRUE;
@@ -1087,8 +1078,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
i, xf86Screens[i]->pScreen->CreateWindow );
#endif
- screenInfo.screens[scr_index]->devPrivates[xf86CreateRootWindowIndex].ptr
- = (void*)(xf86Screens[i]->pScreen->CreateWindow);
+ dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates,
+ xf86CreateRootWindowKey,
+ xf86Screens[i]->pScreen->CreateWindow);
xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow;
#ifdef RENDER
@@ -1203,8 +1195,6 @@ OsVendorInit()
{
static Bool beenHere = FALSE;
- xf86WrapperInit();
-
#ifdef SIGCHLD
signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */
#endif
@@ -1307,13 +1297,9 @@ AbortDDX()
/*
* try to restore the original video state
*/
-#ifdef HAS_USL_VTS
- /* Need the sleep when starting X from within another X session */
- sleep(1);
-#endif
#ifdef DPMSExtension /* Turn screens back on */
if (DPMSPowerLevel != DPMSModeOn)
- DPMSSet(DPMSModeOn);
+ DPMSSet(serverClient, DPMSModeOn);
#endif
if (xf86Screens) {
if (xf86Screens[0]->vtSema)
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 7fcce10b1..782f08b8d 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -183,6 +183,8 @@ xf86ModeStatusToString(ModeStatus status)
return "all modes must have the same resolution";
case MODE_NO_REDUCED:
return "monitor doesn't support reduced blanking";
+ case MODE_BANDWIDTH:
+ return "mode requires too much memory bandwidth";
case MODE_BAD:
return "unknown reason";
case MODE_ERROR:
@@ -368,52 +370,6 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp,
return MODE_OK;
}
-#if 0
-/** Calculates the horizontal sync rate of a mode */
-_X_EXPORT double
-xf86ModeHSync(DisplayModePtr mode)
-{
- double hsync = 0.0;
-
- if (mode->HSync > 0.0)
- hsync = mode->HSync;
- else if (mode->HTotal > 0)
- hsync = (float)mode->Clock / (float)mode->HTotal;
-
- return hsync;
-}
-
-/** Calculates the vertical refresh rate of a mode */
-_X_EXPORT double
-xf86ModeVRefresh(DisplayModePtr mode)
-{
- double refresh = 0.0;
-
- if (mode->VRefresh > 0.0)
- refresh = mode->VRefresh;
- else if (mode->HTotal > 0 && mode->VTotal > 0) {
- refresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal;
- if (mode->Flags & V_INTERLACE)
- refresh *= 2.0;
- if (mode->Flags & V_DBLSCAN)
- refresh /= 2.0;
- if (mode->VScan > 1)
- refresh /= (float)(mode->VScan);
- }
- return refresh;
-}
-
-/** Sets a default mode name of <width>x<height> on a mode. */
-_X_EXPORT void
-xf86SetModeDefaultName(DisplayModePtr mode)
-{
- if (mode->name != NULL)
- xfree(mode->name);
-
- mode->name = XNFprintf("%dx%d", mode->HDisplay, mode->VDisplay);
-}
-#endif
-
/*
* xf86LookupMode
*
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 852e51f43..240155ca7 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -83,9 +83,9 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(3, 0)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(2, 0)
-#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
#define MODINFOSTRING1 0xef23fdc5
diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c
index a6bcc3421..7c8320dee 100644
--- a/hw/xfree86/common/xf86PM.c
+++ b/hw/xfree86/common/xf86PM.c
@@ -116,7 +116,7 @@ resume(pmEvent event, Bool undo)
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
}
- SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+ dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
EnableDevice(pInfo->dev);
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 6bba837fa..5d650aa4c 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -121,7 +121,7 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable;
#define DEFAULT_LOG_VERBOSE 3
#endif
#ifndef DEFAULT_DPI
-#define DEFAULT_DPI 75
+#define DEFAULT_DPI 96
#endif
#define DEFAULT_UNRESOLVED TRUE
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 87d5a364b..f6157518e 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -46,10 +46,9 @@ typedef struct _xf86RandRInfo {
Rotation rotation;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
-static int xf86RandRIndex = -1;
-static int xf86RandRGeneration;
+static DevPrivateKey xf86RandRKey = NULL;
-#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[xf86RandRIndex].ptr)
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey))
static int
xf86RandRModeRefresh (DisplayModePtr mode)
@@ -339,14 +338,14 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen)
scrp->currentMode = scrp->modes;
pScreen->CloseScreen = randrp->CloseScreen;
xfree (randrp);
- pScreen->devPrivates[xf86RandRIndex].ptr = 0;
+ dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL);
return (*pScreen->CloseScreen) (index, pScreen);
}
_X_EXPORT Rotation
xf86GetRotation(ScreenPtr pScreen)
{
- if (xf86RandRIndex == -1)
+ if (xf86RandRKey == NULL)
return RR_Rotate_0;
return XF86RANDRINFO(pScreen)->rotation;
@@ -360,7 +359,7 @@ xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
{
XF86RandRInfoPtr randrp;
- if (xf86RandRIndex == -1)
+ if (xf86RandRKey == NULL)
return FALSE;
randrp = XF86RANDRINFO(pScreen);
@@ -402,11 +401,8 @@ xf86RandRInit (ScreenPtr pScreen)
if (!noPanoramiXExtension)
return TRUE;
#endif
- if (xf86RandRGeneration != serverGeneration)
- {
- xf86RandRIndex = AllocateScreenPrivateIndex();
- xf86RandRGeneration = serverGeneration;
- }
+
+ xf86RandRKey = &xf86RandRKey;
randrp = xalloc (sizeof (XF86RandRInfoRec));
if (!randrp)
@@ -434,7 +430,7 @@ xf86RandRInit (ScreenPtr pScreen)
randrp->rotation = RR_Rotate_0;
- pScreen->devPrivates[xf86RandRIndex].ptr = randrp;
+ dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, randrp);
return TRUE;
}
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 16a4d824c..38d605c88 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -47,12 +47,11 @@
#include "vidmodeproc.h"
#include "xf86cmap.h"
-static int VidModeGeneration = 0;
-static int VidModeIndex = -1;
+static DevPrivateKey VidModeKey = NULL;
static int VidModeCount = 0;
static Bool VidModeClose(int i, ScreenPtr pScreen);
-#define VMPTR(p) ((VidModePtr)(p)->devPrivates[VidModeIndex].ptr)
+#define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey))
#endif
@@ -73,15 +72,10 @@ VidModeExtensionInit(ScreenPtr pScreen)
return FALSE;
}
- if (serverGeneration != VidModeGeneration) {
- if ((VidModeIndex = AllocateScreenPrivateIndex()) < 0) {
- DEBUG_P("AllocateScreenPrivateIndex() failed");
- return FALSE;
- }
- VidModeGeneration = serverGeneration;
- }
+ VidModeKey = &VidModeKey;
- if (!(pScreen->devPrivates[VidModeIndex].ptr = xcalloc(sizeof(VidModeRec), 1))) {
+ if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey,
+ xcalloc(sizeof(VidModeRec), 1))) {
DEBUG_P("xcalloc failed");
return FALSE;
}
@@ -114,10 +108,9 @@ VidModeClose(int i, ScreenPtr pScreen)
pScreen->CloseScreen = pVidMode->CloseScreen;
if (--VidModeCount == 0) {
- if (pScreen->devPrivates[VidModeIndex].ptr)
- xfree(pScreen->devPrivates[VidModeIndex].ptr);
- pScreen->devPrivates[VidModeIndex].ptr = NULL;
- VidModeIndex = -1;
+ xfree(dixLookupPrivate(&pScreen->devPrivates, VidModeKey));
+ dixSetPrivate(&pScreen->devPrivates, VidModeKey, NULL);
+ VidModeKey = NULL;
}
return pScreen->CloseScreen(i, pScreen);
}
@@ -128,8 +121,8 @@ VidModeAvailable(int scrnIndex)
ScrnInfoPtr pScrn;
VidModePtr pVidMode;
- if (VidModeIndex < 0) {
- DEBUG_P("VidModeIndex < 0");
+ if (VidModeKey == NULL) {
+ DEBUG_P("VidModeKey == NULL");
return FALSE;
}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 7223f1dfa..92298e187 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -86,7 +86,6 @@
#define EXTENSION_PROC_ARGS void *
#include "extnsionst.h"
-#include "extinit.h" /* LookupDeviceIntRec */
#include "windowstr.h" /* screenIsSaved */
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index ea6a26dcd..764647ee4 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -60,7 +60,7 @@
#include "xf86cmap.h"
#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \
- ((CMapScreenPtr) (pScreen)->devPrivates[CMapScreenIndex].ptr)->field)
+ ((CMapScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, CMapScreenKey))->field)
#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
((pScreen)->field = wrapper)
@@ -102,9 +102,8 @@ typedef struct {
int overscan;
} CMapColormapRec, *CMapColormapPtr;
-static unsigned long CMapGeneration = 0;
-static int CMapScreenIndex = -1;
-static int CMapColormapIndex = -1;
+static DevPrivateKey CMapScreenKey = NULL;
+static DevPrivateKey CMapColormapKey = &CMapColormapKey;
static void CMapInstallColormap(ColormapPtr);
static void CMapStoreColors(ColormapPtr, int, xColorItem *);
@@ -119,7 +118,6 @@ static int CMapChangeGamma(int, Gamma);
static void ComputeGamma(CMapScreenPtr);
static Bool CMapAllocateColormapPrivate(ColormapPtr);
-static Bool CMapInitDefMap(ColormapPtr,int);
static void CMapRefreshColors(ColormapPtr, int, int*);
static void CMapSetOverscan(ColormapPtr, int, int *);
static void CMapReinstallMap(ColormapPtr);
@@ -145,13 +143,7 @@ _X_EXPORT Bool xf86HandleColormaps(
if(!maxColors || !sigRGBbits || !loadPalette)
return FALSE;
- if(CMapGeneration != serverGeneration) {
- if(((CMapScreenIndex = AllocateScreenPrivateIndex()) < 0) ||
- ((CMapColormapIndex = AllocateColormapPrivateIndex(
- CMapInitDefMap)) < 0))
- return FALSE;
- CMapGeneration = serverGeneration;
- }
+ CMapScreenKey = &CMapScreenKey;
elements = 1 << sigRGBbits;
@@ -169,7 +161,7 @@ _X_EXPORT Bool xf86HandleColormaps(
return FALSE;
}
- pScreen->devPrivates[CMapScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, CMapScreenKey, pScreenPriv);
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreenPriv->CreateColormap = pScreen->CreateColormap;
@@ -225,12 +217,6 @@ _X_EXPORT Bool xf86HandleColormaps(
return TRUE;
}
-static Bool
-CMapInitDefMap(ColormapPtr cmap, int index)
-{
- return TRUE;
-}
-
/**** Screen functions ****/
@@ -254,8 +240,8 @@ CMapColormapUseMax(VisualPtr pVisual, CMapScreenPtr pScreenPriv)
static Bool
CMapAllocateColormapPrivate(ColormapPtr pmap)
{
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pmap->pScreen->devPrivates, CMapScreenKey);
CMapColormapPtr pColPriv;
CMapLinkPtr pLink;
int numColors;
@@ -274,7 +260,7 @@ CMapAllocateColormapPrivate(ColormapPtr pmap)
return FALSE;
}
- pmap->devPrivates[CMapColormapIndex].ptr = (pointer)pColPriv;
+ dixSetPrivate(&pmap->devPrivates, CMapColormapKey, pColPriv);
pColPriv->numColors = numColors;
pColPriv->colors = colors;
@@ -296,8 +282,8 @@ static Bool
CMapCreateColormap (ColormapPtr pmap)
{
ScreenPtr pScreen = pmap->pScreen;
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
Bool ret = FALSE;
pScreen->CreateColormap = pScreenPriv->CreateColormap;
@@ -314,10 +300,10 @@ static void
CMapDestroyColormap (ColormapPtr cmap)
{
ScreenPtr pScreen = cmap->pScreen;
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
- CMapColormapPtr pColPriv =
- (CMapColormapPtr) cmap->devPrivates[CMapColormapIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
+ CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate(
+ &cmap->devPrivates, CMapColormapKey);
CMapLinkPtr prevLink = NULL, pLink = pScreenPriv->maps;
if(pColPriv) {
@@ -356,8 +342,8 @@ CMapStoreColors(
){
ScreenPtr pScreen = pmap->pScreen;
VisualPtr pVisual = pmap->pVisual;
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
int *indices = pScreenPriv->PreAllocIndices;
int num = ndef;
@@ -373,8 +359,8 @@ CMapStoreColors(
return;
if(pVisual->class == DirectColor) {
- CMapColormapPtr pColPriv =
- (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate(
+ &pmap->devPrivates, CMapColormapKey);
int i;
if (CMapColormapUseMax(pVisual, pScreenPriv)) {
@@ -431,8 +417,8 @@ CMapInstallColormap(ColormapPtr pmap)
{
ScreenPtr pScreen = pmap->pScreen;
int index = pScreen->myNum;
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
if (pmap == miInstalledMaps[index])
return;
@@ -462,8 +448,8 @@ static Bool
CMapEnterVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
if((*pScreenPriv->EnterVT)(index, flags)) {
if(miInstalledMaps[index])
@@ -478,8 +464,8 @@ static Bool
CMapSwitchMode(int index, DisplayModePtr mode, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
if((*pScreenPriv->SwitchMode)(index, mode, flags)) {
if(miInstalledMaps[index])
@@ -494,8 +480,8 @@ static int
CMapSetDGAMode(int index, int num, DGADevicePtr dev)
{
ScreenPtr pScreen = screenInfo.screens[index];
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
int ret;
ret = (*pScreenPriv->SetDGAMode)(index, num, dev);
@@ -516,10 +502,10 @@ CMapSetDGAMode(int index, int num, DGADevicePtr dev)
static void
CMapReinstallMap(ColormapPtr pmap)
{
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
- CMapColormapPtr cmapPriv =
- (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pmap->pScreen->devPrivates, CMapScreenKey);
+ CMapColormapPtr cmapPriv = (CMapColormapPtr)dixLookupPrivate(
+ &pmap->devPrivates, CMapColormapKey);
ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
int i = cmapPriv->numColors;
int *indices = pScreenPriv->PreAllocIndices;
@@ -547,10 +533,10 @@ CMapReinstallMap(ColormapPtr pmap)
static void
CMapRefreshColors(ColormapPtr pmap, int defs, int* indices)
{
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
- CMapColormapPtr pColPriv =
- (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pmap->pScreen->devPrivates, CMapScreenKey);
+ CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate(
+ &pmap->devPrivates, CMapColormapKey);
VisualPtr pVisual = pmap->pVisual;
ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
int numColors, i;
@@ -681,10 +667,10 @@ CMapCompareColors(LOCO *color1, LOCO *color2)
static void
CMapSetOverscan(ColormapPtr pmap, int defs, int *indices)
{
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
- CMapColormapPtr pColPriv =
- (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pmap->pScreen->devPrivates, CMapScreenKey);
+ CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate(
+ &pmap->devPrivates, CMapColormapKey);
ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
VisualPtr pVisual = pmap->pVisual;
int i;
@@ -819,8 +805,8 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices)
static void
CMapUnwrapScreen(ScreenPtr pScreen)
{
- CMapScreenPtr pScreenPriv =
- (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr;
+ CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, CMapScreenKey);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
pScreen->CloseScreen = pScreenPriv->CloseScreen;
@@ -904,10 +890,11 @@ CMapChangeGamma(
CMapLinkPtr pLink;
/* Is this sufficient checking ? */
- if(CMapScreenIndex == -1)
+ if(CMapScreenKey == NULL)
return BadImplementation;
- pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr;
+ pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ CMapScreenKey);
if(!pScreenPriv)
return BadImplementation;
@@ -925,8 +912,8 @@ CMapChangeGamma(
/* mark all colormaps on this screen */
pLink = pScreenPriv->maps;
while(pLink) {
- pColPriv =
- (CMapColormapPtr) pLink->cmap->devPrivates[CMapColormapIndex].ptr;
+ pColPriv = (CMapColormapPtr)dixLookupPrivate(&pLink->cmap->devPrivates,
+ CMapColormapKey);
pColPriv->recalculate = TRUE;
pLink = pLink->next;
}
@@ -997,10 +984,11 @@ xf86ChangeGammaRamp(
CMapScreenPtr pScreenPriv;
CMapLinkPtr pLink;
- if(CMapScreenIndex == -1)
+ if(CMapScreenKey == NULL)
return BadImplementation;
- pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr;
+ pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ CMapScreenKey);
if(!pScreenPriv)
return BadImplementation;
@@ -1012,8 +1000,8 @@ xf86ChangeGammaRamp(
/* mark all colormaps on this screen */
pLink = pScreenPriv->maps;
while(pLink) {
- pColPriv =
- (CMapColormapPtr) pLink->cmap->devPrivates[CMapColormapIndex].ptr;
+ pColPriv = (CMapColormapPtr)dixLookupPrivate(&pLink->cmap->devPrivates,
+ CMapColormapKey);
pColPriv->recalculate = TRUE;
pLink = pLink->next;
}
@@ -1056,9 +1044,10 @@ xf86GetGammaRampSize(ScreenPtr pScreen)
{
CMapScreenPtr pScreenPriv;
- if(CMapScreenIndex == -1) return 0;
+ if(CMapScreenKey == NULL) return 0;
- pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr;
+ pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ CMapScreenKey);
if(!pScreenPriv) return 0;
return pScreenPriv->gammaElements;
@@ -1076,10 +1065,11 @@ xf86GetGammaRamp(
LOCO *entry;
int shift, sigbits;
- if(CMapScreenIndex == -1)
+ if(CMapScreenKey == NULL)
return BadImplementation;
- pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr;
+ pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ CMapScreenKey);
if(!pScreenPriv)
return BadImplementation;
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index 537d53d7d..9fd2e6c70 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -42,21 +42,15 @@
#define DEBUG
*/
-static int xf86FBMangerIndex = -1;
-static unsigned long xf86ManagerGeneration = 0;
+static DevPrivateKey xf86FBManagerKey = NULL;
_X_EXPORT Bool xf86RegisterOffscreenManager(
ScreenPtr pScreen,
FBManagerFuncsPtr funcs
){
- if(xf86ManagerGeneration != serverGeneration) {
- if((xf86FBMangerIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- xf86ManagerGeneration = serverGeneration;
- }
-
- pScreen->devPrivates[xf86FBMangerIndex].ptr = (pointer)funcs;
+ xf86FBManagerKey = &xf86FBManagerKey;
+ dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs);
return TRUE;
}
@@ -65,9 +59,9 @@ _X_EXPORT Bool xf86RegisterOffscreenManager(
_X_EXPORT Bool
xf86FBManagerRunning(ScreenPtr pScreen)
{
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!pScreen->devPrivates[xf86FBMangerIndex].ptr)
+ if(!dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))
return FALSE;
return TRUE;
@@ -81,9 +75,10 @@ xf86RegisterFreeBoxCallback(
){
FBManagerFuncsPtr funcs;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return FALSE;
return (*funcs->RegisterFreeBoxCallback)(pScreen, FreeBoxCallback, devPriv);
@@ -101,9 +96,10 @@ xf86AllocateOffscreenArea(
){
FBManagerFuncsPtr funcs;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return NULL;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return NULL;
return (*funcs->AllocateOffscreenArea)(
@@ -122,9 +118,10 @@ xf86AllocateOffscreenLinear(
){
FBManagerFuncsPtr funcs;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return NULL;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return NULL;
return (*funcs->AllocateOffscreenLinear)(
@@ -139,10 +136,10 @@ xf86FreeOffscreenArea(FBAreaPtr area)
if(!area) return;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return;
- if(!(funcs =
- (FBManagerFuncsPtr)area->pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(
+ &area->pScreen->devPrivates, xf86FBManagerKey)))
return;
(*funcs->FreeOffscreenArea)(area);
@@ -158,10 +155,10 @@ xf86FreeOffscreenLinear(FBLinearPtr linear)
if(!linear) return;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return;
- if(!(funcs =
- (FBManagerFuncsPtr)linear->pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(
+ &linear->pScreen->devPrivates, xf86FBManagerKey)))
return;
(*funcs->FreeOffscreenLinear)(linear);
@@ -179,10 +176,10 @@ xf86ResizeOffscreenArea(
if(!resize) return FALSE;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs =
- (FBManagerFuncsPtr)resize->pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(
+ &resize->pScreen->devPrivates, xf86FBManagerKey)))
return FALSE;
return (*funcs->ResizeOffscreenArea)(resize, w, h);
@@ -197,10 +194,10 @@ xf86ResizeOffscreenLinear(
if(!resize) return FALSE;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs =
- (FBManagerFuncsPtr)resize->pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(
+ &resize->pScreen->devPrivates, xf86FBManagerKey)))
return FALSE;
return (*funcs->ResizeOffscreenLinear)(resize, size);
@@ -220,9 +217,10 @@ xf86QueryLargestOffscreenArea(
*w = 0;
*h = 0;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return FALSE;
return (*funcs->QueryLargestOffscreenArea)(
@@ -240,9 +238,10 @@ xf86QueryLargestOffscreenLinear(
*size = 0;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return FALSE;
return (*funcs->QueryLargestOffscreenLinear)(
@@ -255,9 +254,10 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
{
FBManagerFuncsPtr funcs;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return FALSE;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return FALSE;
return (*funcs->PurgeOffscreenAreas)(pScreen);
@@ -269,8 +269,7 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
\************************************************************/
-static unsigned long xf86FBGeneration = 0;
-static int xf86FBScreenIndex = -1;
+static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKey;
typedef struct _FBLink {
FBArea area;
@@ -320,8 +319,8 @@ localRegisterFreeBoxCallback(
FreeBoxCallbackProcPtr *newCallbacks;
DevUnion *newPrivates;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
newCallbacks = xrealloc( offman->FreeBoxesUpdateCallback,
sizeof(FreeBoxCallbackProcPtr) * (offman->NumCallbacks + 1));
@@ -446,8 +445,8 @@ localAllocateOffscreenArea(
FBManagerPtr offman;
FBAreaPtr area = NULL;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
if((area = AllocateArea(offman, w, h, gran, moveCB, removeCB, privData)))
SendCallFreeBoxCallbacks(offman);
@@ -464,8 +463,8 @@ localFreeOffscreenArea(FBAreaPtr area)
ScreenPtr pScreen;
pScreen = area->pScreen;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pLink = offman->UsedAreas;
if(!pLink) return;
@@ -505,8 +504,8 @@ localResizeOffscreenArea(
FBLinkPtr pLink, newLink, pLinkPrev = NULL;
pScreen = resize->pScreen;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
/* find this link */
if(!(pLink = offman->UsedAreas))
return FALSE;
@@ -625,8 +624,8 @@ localQueryLargestOffscreenArea(
if((preferences < 0) || (preferences > 3))
return FALSE;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
if(severity < 0) severity = 0;
if(severity > 2) severity = 2;
@@ -731,8 +730,8 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
RegionRec FreedRegion;
Bool anyUsed = FALSE;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pLink = offman->UsedAreas;
if(!pLink) return TRUE;
@@ -780,8 +779,8 @@ LinearRemoveCBWrapper(FBAreaPtr area)
FBLinearLinkPtr pLink, pLinkPrev = NULL;
ScreenPtr pScreen = area->pScreen;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pLink = offman->LinearAreas;
if(!pLink) return;
@@ -911,7 +910,8 @@ localAllocateOffscreenLinear(
BoxPtr extents;
int w, h, pitch;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
/* Try to allocate from linear memory first...... */
#ifdef DEBUG
@@ -991,8 +991,8 @@ localFreeOffscreenLinear(FBLinearPtr linear)
FBLinearLinkPtr pLink, pLinkPrev = NULL;
ScreenPtr pScreen = linear->pScreen;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pLink = offman->LinearAreas;
if(!pLink) return;
@@ -1049,8 +1049,8 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length)
FBLinearLinkPtr pLink;
ScreenPtr pScreen = resize->pScreen;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pLink = offman->LinearAreas;
if(!pLink) return FALSE;
@@ -1099,7 +1099,8 @@ localQueryLargestOffscreenLinear(
int priority
)
{
- FBManagerPtr offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+ FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
FBLinearLinkPtr pLink;
FBLinearLinkPtr pLinkRet;
@@ -1130,7 +1131,8 @@ localQueryLargestOffscreenLinear(
FBManagerPtr offman;
BoxPtr extents;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
if((extents->x2 - extents->x1) == w)
*size = w * h;
@@ -1162,9 +1164,8 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen)
{
FBLinkPtr pLink, tmp;
FBLinearLinkPtr pLinearLink, tmp2;
- FBManagerPtr offman =
- (FBManagerPtr) pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
pScreen->CloseScreen = offman->CloseScreen;
@@ -1188,7 +1189,7 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen)
xfree(offman->FreeBoxesUpdateCallback);
xfree(offman->devPrivates);
xfree(offman);
- pScreen->devPrivates[xf86FBScreenIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL);
return (*pScreen->CloseScreen) (i, pScreen);
}
@@ -1332,19 +1333,13 @@ xf86InitFBManagerRegion(
if(REGION_NIL(FullRegion))
return FALSE;
- if(xf86FBGeneration != serverGeneration) {
- if((xf86FBScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- xf86FBGeneration = serverGeneration;
- }
-
if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs))
return FALSE;
offman = xalloc(sizeof(FBManager));
if(!offman) return FALSE;
- pScreen->devPrivates[xf86FBScreenIndex].ptr = (pointer)offman;
+ dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman);
offman->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xf86FBCloseScreen;
@@ -1380,11 +1375,11 @@ xf86InitFBManagerLinear(
return FALSE;
/* we expect people to have called the Area setup first for pixmap cache */
- if (!pScreen->devPrivates[xf86FBScreenIndex].ptr)
+ if (!dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey))
return FALSE;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
offman->LinearAreas = xalloc(sizeof(FBLinearLink));
if (!offman->LinearAreas)
return FALSE;
@@ -1424,13 +1419,14 @@ xf86AllocateLinearOffscreenArea (
BoxPtr extents;
int w, h;
- if(xf86FBMangerIndex < 0)
+ if(xf86FBManagerKey == NULL)
return NULL;
- if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBManagerKey)))
return NULL;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+ offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates,
+ xf86FBScreenKey);
extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
w = extents->x2 - extents->x1;
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index af2cd4a4c..63d1cb31c 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -602,8 +602,7 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp)
pScrn->virtualY = psdp->height;
}
-static int sbusPaletteIndex = -1;
-static unsigned long sbusPaletteGeneration = 0;
+static DevPrivateKey sbusPaletteKey = &sbusPaletteKey;
typedef struct _sbusCmap {
sbusDevicePtr psdp;
CloseScreenProcPtr CloseScreen;
@@ -613,7 +612,8 @@ typedef struct _sbusCmap {
unsigned char origBlue[16];
} sbusCmapRec, *sbusCmapPtr;
-#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr)((pScreen)->devPrivates[sbusPaletteIndex].ptr))
+#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, sbusPaletteKey))
static void
xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
@@ -673,13 +673,8 @@ xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp)
struct fbcmap fbcmap;
unsigned char data[2];
- if(sbusPaletteGeneration != serverGeneration) {
- if((sbusPaletteIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- sbusPaletteGeneration = serverGeneration;
- }
cmap = xnfcalloc(1, sizeof(sbusCmapRec));
- pScreen->devPrivates[sbusPaletteIndex].ptr = cmap;
+ dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap);
cmap->psdp = psdp;
fbcmap.index = 0;
fbcmap.count = 16;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index af98b4fd5..2e0213597 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -125,6 +125,7 @@ typedef enum {
MODE_ONE_HEIGHT, /* only one height is supported */
MODE_ONE_SIZE, /* only one resolution is supported */
MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */
+ MODE_BANDWIDTH, /* mode requires too much memory bandwidth */
MODE_BAD = -2, /* unspecified reason */
MODE_ERROR = -1 /* error condition */
} ModeStatus;
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index eac0d7e2c..7483e20d2 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -110,23 +110,22 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags);
static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int);
-static int XF86XVWindowIndex = -1;
-int XF86XvScreenIndex = -1;
-static unsigned long XF86XVGeneration = 0;
+static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKey;
+DevPrivateKey XF86XvScreenKey;
static unsigned long PortResource = 0;
-int (*XvGetScreenIndexProc)(void) = NULL;
+DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL;
unsigned long (*XvGetRTPortProc)(void) = NULL;
int (*XvScreenInitProc)(ScreenPtr) = NULL;
#define GET_XV_SCREEN(pScreen) \
- ((XvScreenPtr)((pScreen)->devPrivates[XF86XvScreenIndex].ptr))
+ ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey))
#define GET_XF86XV_SCREEN(pScreen) \
- ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr))
+ ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr))
#define GET_XF86XV_WINDOW(pWin) \
- ((XF86XVWindowPtr)((pWin)->devPrivates[XF86XVWindowIndex].ptr))
+ ((XF86XVWindowPtr)dixLookupPrivate(&(pWin)->devPrivates, XF86XVWindowKey))
static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL;
static int NumGenDrivers = 0;
@@ -233,21 +232,12 @@ xf86XVScreenInit(
XvScreenPtr pxvs;
if(num <= 0 ||
- !XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc)
- return FALSE;
-
- if(XF86XVGeneration != serverGeneration) {
- if((XF86XVWindowIndex = AllocateWindowPrivateIndex()) < 0)
- return FALSE;
- XF86XVGeneration = serverGeneration;
- }
-
- if(!AllocateWindowPrivate(pScreen,XF86XVWindowIndex,0))
+ !XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc)
return FALSE;
if(Success != (*XvScreenInitProc)(pScreen)) return FALSE;
- XF86XvScreenIndex = (*XvGetScreenIndexProc)();
+ XF86XvScreenKey = (*XvGetScreenKeyProc)();
PortResource = (*XvGetRTPortProc)();
pxvs = GET_XV_SCREEN(pScreen);
@@ -977,7 +967,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
memset(winPriv, 0, sizeof(XF86XVWindowRec));
winPriv->PortRec = portPriv;
winPriv->next = PrivRoot;
- pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
+ dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv);
}
portPriv->pDraw = (DrawablePtr)pWin;
@@ -998,8 +988,8 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
if(prevPriv)
prevPriv->next = winPriv->next;
else
- pWin->devPrivates[XF86XVWindowIndex].ptr =
- (pointer)winPriv->next;
+ dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey,
+ winPriv->next);
xfree(winPriv);
break;
}
@@ -1037,7 +1027,7 @@ xf86XVDestroyWindow(WindowPtr pWin)
xfree(tmp);
}
- pWin->devPrivates[XF86XVWindowIndex].ptr = NULL;
+ dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, NULL);
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
ret = (*pScreen->DestroyWindow)(pWin);
@@ -1094,8 +1084,8 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
pPriv->pDraw = NULL;
if(!pPrev)
- pWin->devPrivates[XF86XVWindowIndex].ptr =
- (pointer)(WinPriv->next);
+ dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey,
+ WinPriv->next);
else
pPrev->next = WinPriv->next;
tmp = WinPriv;
@@ -1146,8 +1136,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
pPriv->pDraw = NULL;
if(!pPrev)
- pWin->devPrivates[XF86XVWindowIndex].ptr =
- (pointer)(WinPriv->next);
+ dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey,
+ WinPriv->next);
else
pPrev->next = WinPriv->next;
tmp = WinPriv;
@@ -1844,7 +1834,8 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
int status;
pval[0] = key;
pval[1] = IncludeInferiors;
- pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status);
+ pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status,
+ (XID)0, serverClient);
if(!pGC) return;
ValidateGC(pDraw, pGC);
if (pPriv) pPriv->pGC = pGC;
diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index f8ff0bed4..05267a240 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -56,11 +56,10 @@ typedef struct {
XvMCAdaptorPtr dixinfo;
} xf86XvMCScreenRec, *xf86XvMCScreenPtr;
-static unsigned long XF86XvMCGeneration = 0;
-static int XF86XvMCScreenIndex = -1;
+static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKey;
-#define XF86XVMC_GET_PRIVATE(pScreen) \
- (xf86XvMCScreenPtr)((pScreen)->devPrivates[XF86XvMCScreenIndex].ptr)
+#define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey)
static int
@@ -164,19 +163,12 @@ _X_EXPORT Bool xf86XvMCScreenInit(
{
XvMCAdaptorPtr pAdapt;
xf86XvMCScreenPtr pScreenPriv;
- XvScreenPtr pxvs =
- (XvScreenPtr)(pScreen->devPrivates[XF86XvScreenIndex].ptr);
-
+ XvScreenPtr pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ XF86XvScreenKey);
int i, j;
if(!XvMCScreenInitProc) return FALSE;
- if(XF86XvMCGeneration != serverGeneration) {
- if((XF86XvMCScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- XF86XvMCGeneration = serverGeneration;
- }
-
if(!(pAdapt = xalloc(sizeof(XvMCAdaptorRec) * num_adaptors)))
return FALSE;
@@ -185,7 +177,7 @@ _X_EXPORT Bool xf86XvMCScreenInit(
return FALSE;
}
- pScreen->devPrivates[XF86XvMCScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, XF86XvMCScreenKey, pScreenPriv);
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xf86XvMCCloseScreen;
diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h
index e716c9c6a..4200dac80 100644
--- a/hw/xfree86/common/xf86xvpriv.h
+++ b/hw/xfree86/common/xf86xvpriv.h
@@ -30,10 +30,11 @@
#define _XF86XVPRIV_H_
#include "xf86xv.h"
+#include "privates.h"
/*** These are DDX layer privates ***/
-extern int XF86XvScreenIndex;
+extern DevPrivateKey XF86XvScreenKey;
typedef struct {
DestroyWindowProcPtr DestroyWindow;
diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c
index 67351d3dc..02125dff7 100644
--- a/hw/xfree86/ddc/ddcProperty.c
+++ b/hw/xfree86/ddc/ddcProperty.c
@@ -31,7 +31,6 @@
#include "property.h"
#include "propertyst.h"
#include "xf86DDC.h"
-#include "xf86_ansic.h"
#define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA"
#define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA"
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 41f060b2a..191b3ef89 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -129,8 +129,11 @@ extern void ShmRegisterFuncs(
extern void XaceExtensionInit(INITARGS);
#endif
+#ifdef XSELINUX
+extern void XSELinuxExtensionInit(INITARGS);
+#endif
+
#if 1
-extern void SecurityExtensionSetup(INITARGS);
extern void SecurityExtensionInit(INITARGS);
#endif
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index fa9530860..295e05e9e 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -62,8 +62,7 @@ unsigned char DGAReqCode = 0;
int DGAErrorBase;
int DGAEventBase;
-static int DGAGeneration = 0;
-static int DGAClientPrivateIndex;
+static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKey;
static int DGACallbackRefCount = 0;
/* This holds the client's version information */
@@ -72,7 +71,11 @@ typedef struct {
int minor;
} DGAPrivRec, *DGAPrivPtr;
-#define DGAPRIV(c) ((c)->devPrivates[DGAClientPrivateIndex].ptr)
+#define DGA_GETPRIV(c) ((DGAPrivPtr) \
+ dixLookupPrivate(&(c)->devPrivates, DGAClientPrivateKey))
+#define DGA_SETPRIV(c,p) \
+ dixSetPrivate(&(c)->devPrivates, DGAClientPrivateKey, p)
+
void
XFree86DGAExtensionInit(INITARGS)
@@ -97,23 +100,6 @@ XFree86DGAExtensionInit(INITARGS)
for (i = KeyPress; i <= MotionNotify; i++)
SetCriticalEvent (DGAEventBase + i);
}
-
- /*
- * Allocate a client private index to hold the client's version
- * information.
- */
- if (DGAGeneration != serverGeneration) {
- DGAClientPrivateIndex = AllocateClientPrivateIndex();
- /*
- * Allocate 0 length, and use the private to hold a pointer to
- * our DGAPrivRec.
- */
- if (!AllocateClientPrivate(DGAClientPrivateIndex, 0)) {
- ErrorF("XFree86DGAExtensionInit: AllocateClientPrivate failed\n");
- return;
- }
- DGAGeneration = serverGeneration;
- }
}
@@ -590,12 +576,12 @@ ProcXDGASetClientVersion(ClientPtr client)
DGAPrivPtr pPriv;
REQUEST_SIZE_MATCH(xXDGASetClientVersionReq);
- if ((pPriv = DGAPRIV(client)) == NULL) {
+ if ((pPriv = DGA_GETPRIV(client)) == NULL) {
pPriv = xalloc(sizeof(DGAPrivRec));
/* XXX Need to look into freeing this */
if (!pPriv)
return BadAlloc;
- DGAPRIV(client) = pPriv;
+ DGA_SETPRIV(client, pPriv);
}
pPriv->major = stuff->major;
pPriv->minor = stuff->minor;
diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index 3a6f83eca..66278a298 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -41,8 +41,7 @@
#endif
static int miscErrorBase;
-static int MiscGeneration = 0;
-static int MiscClientPrivateIndex;
+static DevPrivateKey MiscClientPrivateKey = &MiscClientPrivateKey;
/* This holds the client's version information */
typedef struct {
@@ -50,7 +49,10 @@ typedef struct {
int minor;
} MiscPrivRec, *MiscPrivPtr;
-#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr)
+#define M_GETPRIV(c) ((MiscPrivPtr) \
+ dixLookupPrivate(&(c)->devPrivates, MiscClientPrivateKey))
+#define M_SETPRIV(c,p) \
+ dixSetPrivate(&(c)->devPrivates, MiscClientPrivateKey, p)
static void XF86MiscResetProc(
ExtensionEntry* /* extEntry */
@@ -61,7 +63,7 @@ ClientVersion(ClientPtr client, int *major, int *minor)
{
MiscPrivPtr pPriv;
- pPriv = MPRIV(client);
+ pPriv = M_GETPRIV(client);
if (!pPriv) {
if (major) *major = 0;
if (minor) *minor = 0;
@@ -123,24 +125,6 @@ XFree86MiscExtensionInit(void)
if (!xf86GetModInDevEnabled())
return;
- /*
- * Allocate a client private index to hold the client's version
- * information.
- */
- if (MiscGeneration != serverGeneration) {
- MiscClientPrivateIndex = AllocateClientPrivateIndex();
- /*
- * Allocate 0 length, and use the private to hold a pointer to our
- * MiscPrivRec.
- */
- if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) {
- ErrorF("XFree86MiscExtensionInit: "
- "AllocateClientPrivate failed\n");
- return;
- }
- MiscGeneration = serverGeneration;
- }
-
if (
(extEntry = AddExtension(XF86MISCNAME,
XF86MiscNumberEvents,
@@ -205,7 +189,9 @@ ProcXF86MiscSetSaver(client)
if (stuff->screen > screenInfo.numScreens)
return BadValue;
- vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr;
+ vptr = (ScrnInfoPtr)
+ dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates,
+ xf86ScreenKey);
REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq);
@@ -233,7 +219,9 @@ ProcXF86MiscGetSaver(client)
if (stuff->screen > screenInfo.numScreens)
return BadValue;
- vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr;
+ vptr = (ScrnInfoPtr)
+ dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates,
+ xf86ScreenKey);
REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq);
rep.type = X_Reply;
@@ -497,11 +485,11 @@ ProcXF86MiscSetClientVersion(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq);
- if ((pPriv = MPRIV(client)) == NULL) {
+ if ((pPriv = M_GETPRIV(client)) == NULL) {
pPriv = xalloc(sizeof(MiscPrivRec));
if (!pPriv)
return BadAlloc;
- MPRIV(client) = pPriv;
+ M_SETPRIV(client, pPriv);
}
if (xf86GetVerbosity() > 1)
ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor);
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 3b054a829..718d40fbd 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -52,8 +52,7 @@ from Kaleb S. KEITHLEY
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
static int VidModeErrorBase;
-static int VidModeGeneration = 0;
-static int VidModeClientPrivateIndex;
+static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKey;
/* This holds the client's version information */
typedef struct {
@@ -61,7 +60,10 @@ typedef struct {
int minor;
} VidModePrivRec, *VidModePrivPtr;
-#define VMPRIV(c) ((c)->devPrivates[VidModeClientPrivateIndex].ptr)
+#define VM_GETPRIV(c) ((VidModePrivPtr) \
+ dixLookupPrivate(&(c)->devPrivates, VidModeClientPrivateKey))
+#define VM_SETPRIV(c,p) \
+ dixSetPrivate(&(c)->devPrivates, VidModeClientPrivateKey, p)
static void XF86VidModeResetProc(
ExtensionEntry* /* extEntry */
@@ -145,10 +147,12 @@ typedef struct _XF86VidModeScreenPrivate {
Bool hasWindow;
} XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr;
-static int ScreenPrivateIndex;
+static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey;
-#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr)
-#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v);
+#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \
+ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey))
+#define SetScreenPrivate(s,v) \
+ dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v)
#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s)
#define New(t) (xalloc (sizeof (t)))
@@ -172,7 +176,6 @@ XFree86VidModeExtensionInit(void)
#ifdef XF86VIDMODE_EVENTS
EventType = CreateNewResourceType(XF86VidModeFreeEvents);
- ScreenPrivateIndex = AllocateScreenPrivateIndex ();
#endif
for(i = 0; i < screenInfo.numScreens; i++) {
@@ -187,27 +190,9 @@ XFree86VidModeExtensionInit(void)
if (!enabled)
return;
- /*
- * Allocate a client private index to hold the client's version
- * information.
- */
- if (VidModeGeneration != serverGeneration) {
- VidModeClientPrivateIndex = AllocateClientPrivateIndex();
- /*
- * Allocate 0 length, and use the private to hold a pointer to our
- * VidModePrivRec.
- */
- if (!AllocateClientPrivate(VidModeClientPrivateIndex, 0)) {
- ErrorF("XFree86VidModeExtensionInit: "
- "AllocateClientPrivate failed\n");
- return;
- }
- VidModeGeneration = serverGeneration;
- }
-
if (
#ifdef XF86VIDMODE_EVENTS
- EventType && ScreenPrivateIndex != -1 &&
+ EventType &&
#endif
(extEntry = AddExtension(XF86VIDMODENAME,
XF86VidModeNumberEvents,
@@ -239,7 +224,7 @@ ClientMajorVersion(ClientPtr client)
{
VidModePrivPtr pPriv;
- pPriv = VMPRIV(client);
+ pPriv = VM_GETPRIV(client);
if (!pPriv)
return 0;
else
@@ -1682,11 +1667,11 @@ ProcXF86VidModeSetClientVersion(ClientPtr client)
REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
- if ((pPriv = VMPRIV(client)) == NULL) {
+ if ((pPriv = VM_GETPRIV(client)) == NULL) {
pPriv = xalloc(sizeof(VidModePrivRec));
if (!pPriv)
return BadAlloc;
- VMPRIV(client) = pPriv;
+ VM_SETPRIV(client, pPriv);
}
pPriv->major = stuff->major;
pPriv->minor = stuff->minor;
diff --git a/hw/xfree86/dixmods/extmod/xvmod.c b/hw/xfree86/dixmods/extmod/xvmod.c
index 7c1450c7a..6b3f1149a 100644
--- a/hw/xfree86/dixmods/extmod/xvmod.c
+++ b/hw/xfree86/dixmods/extmod/xvmod.c
@@ -16,7 +16,7 @@ void
XvRegister()
{
XvScreenInitProc = XvScreenInit;
- XvGetScreenIndexProc = XvGetScreenIndex;
+ XvGetScreenKeyProc = XvGetScreenKey;
XvGetRTPortProc = XvGetRTPort;
XvMCScreenInitProc = XvMCScreenInit;
}
diff --git a/hw/xfree86/dixmods/extmod/xvmodproc.h b/hw/xfree86/dixmods/extmod/xvmodproc.h
index 81356a149..b39c915b4 100644
--- a/hw/xfree86/dixmods/extmod/xvmodproc.h
+++ b/hw/xfree86/dixmods/extmod/xvmodproc.h
@@ -5,7 +5,7 @@
#include "xvmcext.h"
-extern int (*XvGetScreenIndexProc)(void);
+extern DevPrivateKey (*XvGetScreenKeyProc)(void);
extern unsigned long (*XvGetRTPortProc)(void);
extern int (*XvScreenInitProc)(ScreenPtr);
extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
diff --git a/hw/xfree86/dixmods/xkbKillSrv.c b/hw/xfree86/dixmods/xkbKillSrv.c
index b3399db4a..9074fd390 100644
--- a/hw/xfree86/dixmods/xkbKillSrv.c
+++ b/hw/xfree86/dixmods/xkbKillSrv.c
@@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{
- xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
+ if (dev != inputInfo.keyboard)
+ xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
+
return 0;
}
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 3c657d0f0..77439a517 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -2144,7 +2144,9 @@ The data therein is not used in this release.
General:
.BR X (__miscmansuffix__),
.BR Xserver (__appmansuffix__),
-.BR __xservername__ (__appmansuffix__).
+.BR __xservername__ (__appmansuffix__),
+.BR cvt (__appmansuffix__),
+.BR gtf (__appmansuffix__).
.PP
.B Not all modules or interfaces are available on all platforms.
.PP
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index e2be5983c..263cc52cc 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -79,8 +79,8 @@ extern Bool noPanoramiXExtension;
#endif
static int DRIEntPrivIndex = -1;
-static int DRIScreenPrivIndex = -1;
-static int DRIWindowPrivIndex = -1;
+static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
+static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
static unsigned long DRIGeneration = 0;
static unsigned int DRIDrawableValidationStamp = 0;
@@ -343,20 +343,18 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
pDRIEntPriv = DRI_ENT_PRIV(pScrn);
- if (DRIGeneration != serverGeneration) {
- if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
+ DRIScreenPrivKey = &DRIScreenPrivKey;
+ if (DRIGeneration != serverGeneration)
DRIGeneration = serverGeneration;
- }
pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec));
if (!pDRIPriv) {
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
- DRIScreenPrivIndex = -1;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
+ DRIScreenPrivKey = NULL;
return FALSE;
}
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv);
pDRIPriv->drmFD = pDRIEntPriv->drmFD;
pDRIPriv->directRenderingSupport = TRUE;
pDRIPriv->pDriverInfo = pDRIInfo;
@@ -381,7 +379,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
&pDRIPriv->hSAREA) < 0)
{
pDRIPriv->directRenderingSupport = FALSE;
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
drmClose(pDRIPriv->drmFD);
DRIDrvMsg(pScreen->myNum, X_INFO,
"[drm] drmAddMap failed\n");
@@ -398,7 +396,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
(drmAddressPtr)(&pDRIPriv->pSAREA)) < 0)
{
pDRIPriv->directRenderingSupport = FALSE;
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
drmClose(pDRIPriv->drmFD);
DRIDrvMsg(pScreen->myNum, X_INFO,
"[drm] drmMap failed\n");
@@ -428,7 +426,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
&pDRIPriv->pDriverInfo->hFrameBuffer) < 0)
{
pDRIPriv->directRenderingSupport = FALSE;
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
drmUnmap(pDRIPriv->pSAREA, pDRIPriv->pDriverInfo->SAREASize);
drmClose(pDRIPriv->drmFD);
DRIDrvMsg(pScreen->myNum, X_INFO,
@@ -744,8 +742,8 @@ DRICloseScreen(ScreenPtr pScreen)
}
xfree(pDRIPriv);
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
- DRIScreenPrivIndex = -1;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
+ DRIScreenPrivKey = NULL;
}
}
@@ -772,30 +770,13 @@ drmServerInfo DRIDRMServerInfo = {
Bool
DRIExtensionInit(void)
{
- int i;
- ScreenPtr pScreen;
-
- if (DRIScreenPrivIndex < 0 || DRIGeneration != serverGeneration) {
+ if (!DRIScreenPrivKey || DRIGeneration != serverGeneration) {
return FALSE;
}
- /* Allocate a window private index with a zero sized private area for
- * each window, then should a window become a DRI window, we'll hang
- * a DRIWindowPrivateRec off of this private index.
- */
- if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0)
- return FALSE;
-
DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete);
DRIContextPrivResType = CreateNewResourceType(DRIContextPrivDelete);
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- pScreen = screenInfo.screens[i];
- if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0))
- return FALSE;
- }
-
RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL);
return TRUE;
@@ -1271,9 +1252,8 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
pDRIDrawablePriv->nrects = REGION_NUM_RECTS(&pWin->clipList);
/* save private off of preallocated index */
- pWin->devPrivates[DRIWindowPrivIndex].ptr =
- (pointer)pDRIDrawablePriv;
-
+ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey,
+ pDRIDrawablePriv);
pDRIPriv->nrWindows++;
if (pDRIDrawablePriv->nrects)
@@ -1331,7 +1311,7 @@ DRIDrawablePrivDestroy(WindowPtr pWin)
drmDestroyDrawable(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable);
xfree(pDRIDrawablePriv);
- pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL;
+ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL);
}
static Bool
diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h
index c3b0aeede..ae970d834 100644
--- a/hw/xfree86/dri/dristruct.h
+++ b/hw/xfree86/dri/dristruct.h
@@ -37,15 +37,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86drm.h"
-#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \
- ((DRIWindowPrivIndex < 0) ? \
- NULL : \
- ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr)))
-
-#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \
- ((DRIPixmapPrivIndex < 0) ? \
- NULL : \
- ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIWindowPrivIndex].ptr)))
+#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey))
+#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pPix)->devPrivates, DRIWindowPrivKey))
typedef struct _DRIDrawablePrivRec
{
@@ -65,13 +60,12 @@ struct _DRIContextPrivRec
void** pContextStore;
};
-#define DRI_SCREEN_PRIV(pScreen) \
- ((DRIScreenPrivIndex < 0) ? \
- NULL : \
- ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr)))
+#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey))
#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
- (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr))
+ dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \
+ DRIScreenPrivKey))
#define DRI_ENT_PRIV(pScrn) \
((DRIEntPrivIndex < 0) ? \
diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre
index 31e1cfe34..14859bc8f 100644
--- a/hw/xfree86/exa/exa.man.pre
+++ b/hw/xfree86/exa/exa.man.pre
@@ -31,6 +31,12 @@ Disables acceleration of downloading of pixmap data from the framebuffer.
Not usable with drivers which rely on DownloadFromScreen succeeding.
Default: No.
.TP
+.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q
+Enables an additional optimization for migration of destination pixmaps. This
+may improve performance in some cases (e.g. when switching virtual desktops with
+no compositing manager) but causes corruption in others (e.g. when starting
+compiz). Default: No.
+.TP
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
default is intended to be the best performing one for general use, though others
diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index 4dce58fd8..b8d306eb4 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/exa/examodule.c
@@ -42,14 +42,14 @@ typedef struct _ExaXorgScreenPrivRec {
OptionInfoPtr options;
} ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr;
-static int exaXorgServerGeneration;
-static int exaXorgScreenPrivateIndex;
+static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey;
typedef enum {
EXAOPT_MIGRATION_HEURISTIC,
EXAOPT_NO_COMPOSITE,
EXAOPT_NO_UTS,
EXAOPT_NO_DFS,
+ EXAOPT_OPTIMIZE_MIGRATION
} EXAOpts;
static const OptionInfoRec EXAOptions[] = {
@@ -61,6 +61,8 @@ static const OptionInfoRec EXAOptions[] = {
OPTV_BOOLEAN, {0}, FALSE },
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
OPTV_BOOLEAN, {0}, FALSE },
+ { EXAOPT_OPTIMIZE_MIGRATION, "EXAOptimizeMigration",
+ OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL,
OPTV_NONE, {0}, FALSE }
};
@@ -69,8 +71,8 @@ static Bool
exaXorgCloseScreen (int i, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
- ExaXorgScreenPrivPtr pScreenPriv =
- pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr;
+ ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr)
+ dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey);
pScreen->CloseScreen = pScreenPriv->SavedCloseScreen;
@@ -86,8 +88,8 @@ static void
exaXorgEnableDisableFBAccess (int index, Bool enable)
{
ScreenPtr pScreen = screenInfo.screens[index];
- ExaXorgScreenPrivPtr pScreenPriv =
- pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr;
+ ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr)
+ dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey);
if (!enable)
exaEnableDisableFBAccess (index, enable);
@@ -111,11 +113,6 @@ exaDDXDriverInit(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
ExaXorgScreenPrivPtr pScreenPriv;
- if (exaXorgServerGeneration != serverGeneration) {
- exaXorgScreenPrivateIndex = AllocateScreenPrivateIndex();
- exaXorgServerGeneration = serverGeneration;
- }
-
pScreenPriv = xcalloc (1, sizeof(ExaXorgScreenPrivRec));
if (pScreenPriv == NULL)
return;
@@ -144,6 +141,11 @@ exaDDXDriverInit(ScreenPtr pScreen)
heuristicName);
}
}
+
+ pExaScr->optimize_migration =
+ xf86ReturnOptValBool(pScreenPriv->options,
+ EXAOPT_OPTIMIZE_MIGRATION,
+ FALSE);
}
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
@@ -166,7 +168,7 @@ exaDDXDriverInit(ScreenPtr pScreen)
pExaScr->info->DownloadFromScreen = NULL;
}
- pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey, pScreenPriv);
pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess;
pScrn->EnableDisableFBAccess = exaXorgEnableDisableFBAccess;
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 5d06b05c7..49c7d271b 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -63,7 +63,9 @@
#include "globals.h"
#include "os.h"
#include "osdep.h"
+#include "privates.h"
#include "resource.h"
+#include "registry.h"
#include "servermd.h"
#include "scrnintstr.h"
#include "windowstr.h"
@@ -113,6 +115,16 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(QueryColors)
/* cursor.c */
SYMFUNC(FreeCursor)
+ /* deprecated.c */
+ SYMFUNC(LookupClient)
+ SYMFUNC(LookupDrawable)
+ SYMFUNC(LookupWindow)
+ SYMFUNC(SecurityLookupDrawable)
+ SYMFUNC(SecurityLookupWindow)
+ SYMFUNC(LookupIDByType)
+ SYMFUNC(LookupIDByClass)
+ SYMFUNC(SecurityLookupIDByClass)
+ SYMFUNC(SecurityLookupIDByType)
/* devices.c */
SYMFUNC(Ones)
SYMFUNC(InitButtonClassDeviceStruct)
@@ -128,8 +140,6 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(InitKeyboardDeviceStruct)
SYMFUNC(SendMappingNotify)
SYMFUNC(InitPointerDeviceStruct)
- SYMFUNC(LookupKeyboardDevice)
- SYMFUNC(LookupPointerDevice)
/* dispatch.c */
SYMFUNC(SetInputCheck)
SYMFUNC(SendErrorToClient)
@@ -159,13 +169,6 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(dixLookupWindow)
SYMFUNC(dixLookupClient)
SYMFUNC(dixLookupGC)
- /* following are deprecated */
- SYMFUNC(LookupClient)
- SYMFUNC(LookupDrawable)
- SYMFUNC(LookupWindow)
- SYMFUNC(SecurityLookupDrawable)
- SYMFUNC(SecurityLookupWindow)
- /* end deprecated */
SYMFUNC(NoopDDA)
SYMFUNC(QueueWorkProc)
SYMFUNC(RegisterBlockAndWakeupHandlers)
@@ -191,11 +194,11 @@ _X_HIDDEN void *dixLookupTab[] = {
#endif
/* property.c */
SYMFUNC(ChangeWindowProperty)
+ SYMFUNC(dixChangeWindowProperty)
/* extension.c */
SYMFUNC(AddExtension)
SYMFUNC(AddExtensionAlias)
SYMFUNC(CheckExtension)
- SYMFUNC(DeclareExtensionSecurity)
SYMFUNC(MinorOpcodeOfRequest)
SYMFUNC(StandardMinorOpcode)
#ifdef XEVIE
@@ -234,7 +237,7 @@ _X_HIDDEN void *dixLookupTab[] = {
#ifdef XV
/* XXX These are exported from the DDX, not DIX. */
SYMVAR(XvScreenInitProc)
- SYMVAR(XvGetScreenIndexProc)
+ SYMVAR(XvGetScreenKeyProc)
SYMVAR(XvGetRTPortProc)
SYMVAR(XvMCScreenInitProc)
#endif
@@ -259,42 +262,38 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(GetScratchPixmapHeader)
SYMFUNC(FreeScratchPixmapHeader)
/* privates.c */
- SYMFUNC(AllocateExtensionPrivate)
- SYMFUNC(AllocateExtensionPrivateIndex)
- SYMFUNC(AllocateClientPrivate)
- SYMFUNC(AllocateClientPrivateIndex)
- SYMFUNC(AllocateGCPrivate)
- SYMFUNC(AllocateGCPrivateIndex)
- SYMFUNC(AllocateWindowPrivate)
- SYMFUNC(AllocateWindowPrivateIndex)
- SYMFUNC(AllocateScreenPrivateIndex)
- SYMFUNC(AllocateColormapPrivateIndex)
- SYMFUNC(AllocateDevicePrivateIndex)
- SYMFUNC(AllocateDevicePrivate)
- SYMFUNC(AllocatePixmapPrivateIndex)
- SYMFUNC(AllocatePixmapPrivate)
+ SYMFUNC(dixRequestPrivate)
+ SYMFUNC(dixRegisterPrivateInitFunc)
+ SYMFUNC(dixRegisterPrivateDeleteFunc)
+ SYMFUNC(dixAllocatePrivate)
+ SYMFUNC(dixFreePrivates)
+ SYMFUNC(dixRegisterPrivateOffset)
+ SYMFUNC(dixLookupPrivateOffset)
/* resource.c */
SYMFUNC(AddResource)
SYMFUNC(ChangeResourceValue)
SYMFUNC(CreateNewResourceClass)
SYMFUNC(CreateNewResourceType)
+ SYMFUNC(dixLookupResource)
SYMFUNC(FakeClientID)
SYMFUNC(FreeResource)
SYMFUNC(FreeResourceByType)
SYMFUNC(GetXIDList)
SYMFUNC(GetXIDRange)
- SYMFUNC(LookupIDByType)
- SYMFUNC(LookupIDByClass)
SYMFUNC(LegalNewID)
- SYMFUNC(SecurityLookupIDByClass)
- SYMFUNC(SecurityLookupIDByType)
SYMFUNC(FindClientResourcesByType)
SYMFUNC(FindAllClientResources)
SYMVAR(lastResourceType)
SYMVAR(TypeMask)
-#ifdef RES
+ SYMVAR(ResourceStateCallback)
+ /* registry.c */
+#ifdef XREGISTRY
SYMFUNC(RegisterResourceName)
- SYMVAR(ResourceNames)
+ SYMFUNC(LookupMajorName)
+ SYMFUNC(LookupRequestName)
+ SYMFUNC(LookupEventName)
+ SYMFUNC(LookupErrorName)
+ SYMFUNC(LookupResourceName)
#endif
/* swaprep.c */
SYMFUNC(CopySwap32Write)
@@ -322,6 +321,7 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(NotClippedByChildren)
SYMFUNC(ResizeChildrenWinSize)
SYMFUNC(SaveScreens)
+ SYMFUNC(dixSaveScreens)
SYMFUNC(SendVisibilityNotify)
SYMFUNC(SetWinSize)
SYMFUNC(SetBorderSize)
@@ -512,7 +512,7 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(PictureTransformPoint3d)
SYMFUNC(PictureGetSubpixelOrder)
SYMFUNC(PictureSetSubpixelOrder)
- SYMVAR(PictureScreenPrivateIndex)
+ SYMVAR(PictureScreenPrivateKey)
/* mipict.c */
SYMFUNC(miPictureInit)
SYMFUNC(miComputeCompositeRegion)
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 1b5c717fd..584cabfd1 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -859,7 +859,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
char *m = NULL;
const char **cim;
- xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
+ xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"\n", module);
for (cim = compiled_in_modules; *cim; cim++)
if (!strcmp (module, *cim))
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 025983b09..aa712c03a 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -200,9 +200,9 @@ _X_HIDDEN void *miLookupTab[] = {
SYMFUNC(miOverlaySetRootClip)
SYMVAR(miEmptyBox)
SYMVAR(miEmptyData)
- SYMVAR(miZeroLineScreenIndex)
+ SYMVAR(miZeroLineScreenKey)
SYMVAR(miSpritePointerFuncs)
- SYMVAR(miPointerScreenIndex)
+ SYMVAR(miPointerScreenKey)
SYMVAR(miInstalledMaps)
SYMVAR(miInitVisualsProc)
#ifdef DAMAGE
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index b6be172a3..417a3508f 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -79,8 +79,6 @@
#include "vidmodeproc.h"
#include "xf86miscproc.h"
#include "loader.h"
-#define DONT_DEFINE_WRAPPERS
-#include "xf86_ansic.h"
#include "xisb.h"
#include "vbe.h"
#ifndef __OpenBSD__
@@ -272,7 +270,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86ReadSerial)
SYMFUNC(xf86WriteSerial)
SYMFUNC(xf86CloseSerial)
- SYMFUNC(xf86GetErrno)
SYMFUNC(xf86WaitForInput)
SYMFUNC(xf86SerialSendBreak)
SYMFUNC(xf86FlushInput)
@@ -727,186 +724,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(LoaderGetOS)
SYMFUNC(LoaderGetABIVersion)
- /*
- * These are our own interfaces to libc functions.
- */
- SYMFUNC(xf86abort)
- SYMFUNC(xf86abs)
- SYMFUNC(xf86acos)
- SYMFUNC(xf86asin)
- SYMFUNC(xf86atan)
- SYMFUNC(xf86atan2)
- SYMFUNC(xf86atof)
- SYMFUNC(xf86atoi)
- SYMFUNC(xf86atol)
- SYMFUNC(xf86bsearch)
- SYMFUNC(xf86ceil)
- SYMFUNC(xf86calloc)
- SYMFUNC(xf86clearerr)
- SYMFUNC(xf86close)
- SYMFUNC(xf86cos)
- SYMFUNC(xf86exit)
- SYMFUNC(xf86exp)
- SYMFUNC(xf86fabs)
- SYMFUNC(xf86fclose)
- SYMFUNC(xf86feof)
- SYMFUNC(xf86ferror)
- SYMFUNC(xf86fflush)
- SYMFUNC(xf86fgetc)
- SYMFUNC(xf86fgetpos)
- SYMFUNC(xf86fgets)
- SYMFUNC(xf86finite)
- SYMFUNC(xf86floor)
- SYMFUNC(xf86fmod)
- SYMFUNC(xf86fopen)
- SYMFUNC(xf86fprintf)
- SYMFUNC(xf86fputc)
- SYMFUNC(xf86fputs)
- SYMFUNC(xf86fread)
- SYMFUNC(xf86free)
- SYMFUNC(xf86freopen)
- SYMFUNC(xf86frexp)
- SYMFUNC(xf86fscanf)
- SYMFUNC(xf86fseek)
- SYMFUNC(xf86fsetpos)
- SYMFUNC(xf86ftell)
- SYMFUNC(xf86fwrite)
- SYMFUNC(xf86getc)
- SYMFUNC(xf86getenv)
- SYMFUNC(xf86getpagesize)
- SYMFUNC(xf86hypot)
- SYMFUNC(xf86ioctl)
- SYMFUNC(xf86isalnum)
- SYMFUNC(xf86isalpha)
- SYMFUNC(xf86iscntrl)
- SYMFUNC(xf86isdigit)
- SYMFUNC(xf86isgraph)
- SYMFUNC(xf86islower)
- SYMFUNC(xf86isprint)
- SYMFUNC(xf86ispunct)
- SYMFUNC(xf86isspace)
- SYMFUNC(xf86isupper)
- SYMFUNC(xf86isxdigit)
- SYMFUNC(xf86labs)
- SYMFUNC(xf86ldexp)
- SYMFUNC(xf86log)
- SYMFUNC(xf86log10)
- SYMFUNC(xf86lseek)
- SYMFUNC(xf86malloc)
- SYMFUNC(xf86memchr)
- SYMFUNC(xf86memcmp)
- SYMFUNC(xf86memcpy)
- /*
- * Some compilers generate calls to memcpy to handle structure copies
- * or run-time initializations.
- */
- SYMFUNCALIAS("memcpy", xf86memcpy)
- SYMFUNC(xf86memset)
- /*
- * Some compilers generate calls to memset to handle aggregate
- * initializations.
- */
- SYMFUNCALIAS("memset", xf86memset)
- SYMFUNC(xf86memmove)
- SYMFUNC(xf86mmap)
- SYMFUNC(xf86modf)
- SYMFUNC(xf86munmap)
- SYMFUNC(xf86open)
- SYMFUNC(xf86perror)
- SYMFUNC(xf86pow)
- SYMFUNC(xf86printf)
- SYMFUNC(xf86qsort)
- SYMFUNC(xf86read)
- SYMFUNC(xf86realloc)
- SYMFUNC(xf86remove)
- SYMFUNC(xf86rename)
- SYMFUNC(xf86rewind)
- SYMFUNC(xf86setbuf)
- SYMFUNC(xf86setvbuf)
- SYMFUNC(xf86sin)
- SYMFUNC(xf86snprintf)
- SYMFUNC(xf86sprintf)
- SYMFUNC(xf86sqrt)
- SYMFUNC(xf86sscanf)
- SYMFUNC(xf86strcat)
- SYMFUNC(xf86strcmp)
- SYMFUNC(xf86strcasecmp)
- SYMFUNC(xf86strcpy)
- SYMFUNC(xf86strcspn)
- SYMFUNC(xf86strerror)
- SYMFUNC(xf86strlcat)
- SYMFUNC(xf86strlcpy)
- SYMFUNC(xf86strlen)
- SYMFUNC(xf86strncasecmp)
- SYMFUNC(xf86strncat)
- SYMFUNC(xf86strncmp)
- SYMFUNC(xf86strncpy)
- SYMFUNC(xf86strpbrk)
- SYMFUNC(xf86strchr)
- SYMFUNC(xf86strrchr)
- SYMFUNC(xf86strspn)
- SYMFUNC(xf86strstr)
- SYMFUNC(xf86strtod)
- SYMFUNC(xf86strtok)
- SYMFUNC(xf86strtol)
- SYMFUNC(xf86strtoul)
- SYMFUNC(xf86tan)
- SYMFUNC(xf86tmpfile)
- SYMFUNC(xf86tolower)
- SYMFUNC(xf86toupper)
- SYMFUNC(xf86ungetc)
- SYMFUNC(xf86vfprintf)
- SYMFUNC(xf86vsnprintf)
- SYMFUNC(xf86vsprintf)
- SYMFUNC(xf86write)
-
- /* non-ANSI C functions */
- SYMFUNC(xf86opendir)
- SYMFUNC(xf86closedir)
- SYMFUNC(xf86readdir)
- SYMFUNC(xf86rewinddir)
- SYMFUNC(xf86ffs)
- SYMFUNC(xf86strdup)
- SYMFUNC(xf86bzero)
- SYMFUNC(xf86usleep)
- SYMFUNC(xf86execl)
-
- SYMFUNC(xf86getsecs)
- SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */
-
- /* Some of these were added for DRI support. */
- SYMFUNC(xf86stat)
- SYMFUNC(xf86fstat)
- SYMFUNC(xf86access)
- SYMFUNC(xf86geteuid)
- SYMFUNC(xf86getegid)
- SYMFUNC(xf86getpid)
- SYMFUNC(xf86mknod)
- SYMFUNC(xf86chmod)
- SYMFUNC(xf86chown)
- SYMFUNC(xf86sleep)
- SYMFUNC(xf86mkdir)
- SYMFUNC(xf86shmget)
- SYMFUNC(xf86shmat)
- SYMFUNC(xf86shmdt)
- SYMFUNC(xf86shmctl)
-#ifdef HAS_GLIBC_SIGSETJMP
- SYMFUNC(xf86setjmp)
- SYMFUNC(xf86setjmp0)
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
- SYMFUNCALIAS("xf86setjmp1", __sigsetjmp)
-#else
- SYMFUNC(xf86setjmp1) /* For libc5 */
-#endif
-#else
- SYMFUNCALIAS("xf86setjmp", setjmp)
- SYMFUNC(xf86setjmp0)
- SYMFUNC(xf86setjmp1)
-#endif
- SYMFUNCALIAS("xf86longjmp", longjmp)
- SYMFUNC(xf86getjmptype)
- SYMFUNC(xf86setjmp1_arg2)
- SYMFUNC(xf86setjmperror)
#ifdef XF86DRI
/*
* These may have more general uses, but for now, they are only used
@@ -1091,17 +908,9 @@ _X_HIDDEN void *xfree86LookupTab[] = {
#endif
#endif
- /* Some variables. */
-
- SYMVAR(xf86stdin)
- SYMVAR(xf86stdout)
- SYMVAR(xf86stderr)
- SYMVAR(xf86errno)
- SYMVAR(xf86HUGE_VAL)
-
/* General variables (from xf86.h) */
- SYMVAR(xf86ScreenIndex)
- SYMVAR(xf86PixmapIndex)
+ SYMVAR(xf86ScreenKey)
+ SYMVAR(xf86PixmapKey)
SYMVAR(xf86Screens)
SYMVAR(byte_reversed)
SYMVAR(xf86inSuspend)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index bb416fddc..e00fdf3f3 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -36,6 +36,7 @@
#include "xf86DDC.h"
#include "xf86Crtc.h"
#include "xf86Modes.h"
+#include "xf86Priv.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
#define DPMS_SERVER
@@ -259,6 +260,30 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
crtc->y = y;
crtc->rotation = rotation;
+ /* Shift offsets that move us out of virtual size */
+ if (x + mode->HDisplay > xf86_config->maxWidth ||
+ y + mode->VDisplay > xf86_config->maxHeight)
+ {
+ if (x + mode->HDisplay > xf86_config->maxWidth)
+ crtc->x = xf86_config->maxWidth - mode->HDisplay;
+ if (y + mode->VDisplay > xf86_config->maxHeight)
+ crtc->y = xf86_config->maxHeight - mode->VDisplay;
+ if (crtc->x < 0 || crtc->y < 0)
+ {
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Mode %dx%d does not fit virtual size %dx%d - "
+ "internal error\n", mode->HDisplay, mode->VDisplay,
+ xf86_config->maxWidth, xf86_config->maxHeight);
+ goto done;
+ }
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Mode %dx%d+%d+%d does not fit virtual size %dx%d - "
+ "offset updated to +%d+%d\n",
+ mode->HDisplay, mode->VDisplay, x, y,
+ xf86_config->maxWidth, xf86_config->maxHeight,
+ crtc->x, crtc->y);
+ }
+
/* XXX short-circuit changes to base location only */
/* Pass our mode to the outputs and the CRTC to give them a chance to
@@ -300,7 +325,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
/* Set up the DPLL and any output state that needs to adjust or depend
* on the DPLL.
*/
- crtc->funcs->mode_set(crtc, mode, adjusted_mode, x, y);
+ crtc->funcs->mode_set(crtc, mode, adjusted_mode, crtc->x, crtc->y);
for (i = 0; i < xf86_config->num_output; i++)
{
xf86OutputPtr output = xf86_config->output[i];
@@ -438,7 +463,7 @@ xf86OutputSetMonitor (xf86OutputPtr output)
}
static Bool
-xf86OutputEnabled (xf86OutputPtr output)
+xf86OutputEnabled (xf86OutputPtr output, Bool strict)
{
Bool enable, disable;
@@ -456,8 +481,16 @@ xf86OutputEnabled (xf86OutputPtr output)
"Output %s disabled by config file\n", output->name);
return FALSE;
}
- /* otherwise, enable if it is not disconnected */
- enable = output->status != XF86OutputStatusDisconnected;
+
+ /* If not, try to only light up the ones we know are connected */
+ if (strict) {
+ enable = output->status == XF86OutputStatusConnected;
+ }
+ /* But if that fails, try to light up even outputs we're unsure of */
+ else {
+ enable = output->status != XF86OutputStatusDisconnected;
+ }
+
xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
"Output %s %sconnected\n", output->name, enable ? "" : "dis");
return enable;
@@ -704,9 +737,9 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
mm_height = output->mm_height;
if (!mm_height)
- mm_height = 203; /* 768 pixels at 96dpi */
+ mm_height = (768 * 25.4) / DEFAULT_DPI;
/*
- * Pick a mode closest to 96dpi
+ * Pick a mode closest to DEFAULT_DPI
*/
for (mode = output->probed_modes; mode; mode = mode->next)
{
@@ -721,7 +754,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
/* yes, use VDisplay here, not xf86ModeHeight */
dpi = (mode->VDisplay * 254) / (mm_height * 10);
- diff = dpi - 96;
+ diff = dpi - DEFAULT_DPI;
diff = diff < 0 ? -diff : diff;
if (target_mode == NULL || (preferred > target_preferred) ||
(preferred == target_preferred && diff < target_diff))
@@ -1054,6 +1087,16 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
any_set = TRUE;
continue;
}
+ if (!modes[or])
+ {
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+ "Cannot position output %s relative to output %s without modes\n",
+ output->name, relative_name);
+ output->initial_x = 0;
+ output->initial_y = 0;
+ any_set = TRUE;
+ continue;
+ }
if (relative->initial_x == POSITION_UNSET)
{
keep_going = TRUE;
@@ -1069,10 +1112,10 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
output->initial_x += xf86ModeWidth (modes[or], relative->initial_rotation);
break;
case OPTION_ABOVE:
- output->initial_y -= xf86ModeHeight (modes[or], relative->initial_rotation);
+ output->initial_y -= xf86ModeHeight (modes[o], relative->initial_rotation);
break;
case OPTION_LEFT_OF:
- output->initial_x -= xf86ModeWidth (modes[or], relative->initial_rotation);
+ output->initial_x -= xf86ModeWidth (modes[o], relative->initial_rotation);
break;
default:
break;
@@ -1536,7 +1579,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
Rotation target_rotation = RR_Rotate_0;
xf86CrtcPtr *crtcs;
DisplayModePtr *modes;
- Bool *enabled;
+ Bool *enabled, any_enabled = FALSE;
int width;
int height;
@@ -1569,9 +1612,23 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
xf86OutputPtr output = config->output[o];
modes[o] = NULL;
- enabled[o] = xf86OutputEnabled (output);
+ any_enabled |= (enabled[o] = xf86OutputEnabled (output, TRUE));
}
+ if (!any_enabled)
+ {
+ xf86DrvMsg (scrn->scrnIndex, X_WARNING,
+ "No outputs definitely connected, trying again...\n");
+
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+
+ modes[o] = NULL;
+ enabled[o] = xf86OutputEnabled (output, FALSE);
+ }
+ }
+
/*
* User preferred > preferred > other modes
*/
@@ -2129,7 +2186,8 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
xf86MonPtr mon;
mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
- xf86DDCApplyQuirks (scrn->scrnIndex, pDDCBus);
+ if (mon)
+ xf86DDCApplyQuirks (scrn->scrnIndex, mon);
return mon;
}
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index ba4fd84ec..f3b1ebb7a 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -227,7 +227,8 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
CursorPtr cursor = xf86_config->cursor;
int c;
- CARD8 *bits = cursor ? cursor->devPriv[screen->myNum] : NULL;
+ CARD8 *bits = cursor ? dixLookupPrivate(&cursor->devPrivates,
+ screen) : NULL;
/* Save ARGB versions of these colors */
xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
@@ -613,7 +614,7 @@ xf86_reload_cursors (ScreenPtr screen)
else
#endif
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
- cursor->devPriv[screen->myNum]);
+ dixLookupPrivate(&cursor->devPrivates, screen));
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
(*cursor_info->ShowCursor)(cursor_info->pScrn);
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 2f26a6450..a125d8c82 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -72,7 +72,8 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
{
/* Belinea 10 15 55 */
if (memcmp (DDC->vendor.name, "MAX", 4) == 0 &&
- DDC->vendor.prod_id == 1516)
+ ((DDC->vendor.prod_id == 1516) ||
+ (DDC->vendor.prod_id == 0x77e)))
return TRUE;
/* Acer AL1706 */
@@ -327,6 +328,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width;
Mode->VTotal = timing->v_active + timing->v_blanking;
+ /* perform basic check on the detail timing */
+ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) {
+ xfree(Mode);
+ return NULL;
+ }
+
xf86SetModeDefaultName(Mode);
/* We ignore h/v_size and h/v_border for now. */
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 3879b9103..3d222cc73 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -38,12 +38,14 @@
extern XF86ConfigPtr xf86configptr;
-/**
- * @file this file contains symbols from xf86Mode.c and friends that are static
- * there but we still want to use. We need to come up with better API here.
+/*
+ * This is the version number where we epoched. These files get copied
+ * into drivers that want to use this setup infrastructure on pre-1.3
+ * servers, so when that happens they need to define these symbols
+ * themselves. However, _in_ the server, we basically always define them now.
*/
-
#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0)
+
/**
* Calculates the horizontal sync rate of a mode.
*
@@ -116,6 +118,24 @@ xf86ModeHeight (DisplayModePtr mode, Rotation rotation)
}
}
+/** Calculates the memory bandwidth (in MiB/sec) of a mode. */
+_X_EXPORT unsigned int
+xf86ModeBandwidth(DisplayModePtr mode, int depth)
+{
+ float a_active, a_total, active_percent, pixels_per_second;
+ int bytes_per_pixel = (depth + 7) / 8;
+
+ if (!mode->HTotal || !mode->VTotal || !mode->Clock)
+ return 0;
+
+ a_active = mode->HDisplay * mode->VDisplay;
+ a_total = mode->HTotal * mode->VTotal;
+ active_percent = a_active / a_total;
+ pixels_per_second = active_percent * mode->Clock * 1000.0;
+
+ return (unsigned int)(pixels_per_second * bytes_per_pixel / (1024 * 1024));
+}
+
/** Sets a default mode name of <width>x<height> on a mode. */
_X_EXPORT void
xf86SetModeDefaultName(DisplayModePtr mode)
@@ -319,12 +339,10 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode)
/**
* Marks as bad any modes with unsupported flags.
*
- * \param modeList doubly-linked or circular list of modes.
+ * \param modeList doubly-linked list of modes.
* \param flags flags supported by the driver.
*
* \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough?
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -343,9 +361,7 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList,
/**
* Marks as bad any modes extending beyond the given max X, Y, or pitch.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -372,9 +388,7 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
* Marks as bad any modes that aren't supported by the given monitor's
* hsync and vrefresh ranges.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -416,12 +430,10 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
/**
* Marks as bad any modes extending beyond outside of the given clock ranges.
*
- * \param modeList doubly-linked or circular list of modes.
+ * \param modeList doubly-linked list of modes.
* \param min pointer to minimums of clock ranges
* \param max pointer to maximums of clock ranges
* \param n_ranges number of ranges.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
@@ -454,9 +466,7 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
*
* MODE_BAD is used as the rejection flag, for lack of a better flag.
*
- * \param modeList doubly-linked or circular list of modes.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
+ * \param modeList doubly-linked list of modes.
*/
_X_EXPORT void
xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList)
@@ -484,13 +494,30 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList)
/**
+ * Marks as bad any modes exceeding the given bandwidth.
+ *
+ * \param modeList doubly-linked list of modes.
+ * \param bandwidth bandwidth in MHz.
+ * \param depth color depth.
+ */
+_X_EXPORT void
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ unsigned int bandwidth, int depth)
+{
+ DisplayModePtr mode;
+
+ for (mode = modeList; mode != NULL; mode = mode->next) {
+ if (xf86ModeBandwidth(mode, depth) > bandwidth)
+ mode->status = MODE_BANDWIDTH;
+ }
+}
+
+/**
* Frees any modes from the list with a status other than MODE_OK.
*
* \param modeList pointer to a doubly-linked or circular list of modes.
* \param verbose determines whether the reason for mode invalidation is
* printed.
- *
- * This is not in xf86Modes.c, but would be part of the proposed new API.
*/
_X_EXPORT void
xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
diff --git a/hw/xfree86/modes/xf86Modes.h b/hw/xfree86/modes/xf86Modes.h
index 3722d25a0..9ad5ee653 100644
--- a/hw/xfree86/modes/xf86Modes.h
+++ b/hw/xfree86/modes/xf86Modes.h
@@ -42,6 +42,7 @@
double xf86ModeHSync(DisplayModePtr mode);
double xf86ModeVRefresh(DisplayModePtr mode);
+unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth);
int
xf86ModeWidth (DisplayModePtr mode, Rotation rotation);
@@ -79,6 +80,10 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList,
MonPtr mon);
void
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ unsigned int bandwidth, int depth);
+
+void
xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
Bool verbose);
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 48e7efe00..1c20082ce 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -60,11 +60,11 @@ static Bool xf86RandR12Init12 (ScreenPtr pScreen);
static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
#endif
-static int xf86RandR12Index;
-static int xf86RandR12Generation;
+static int xf86RandR12Generation;
+static DevPrivateKey xf86RandR12Key;
-#define XF86RANDRINFO(p) \
- ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr)
+#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
+ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
static int
xf86RandR12ModeRefresh (DisplayModePtr mode)
@@ -341,10 +341,12 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
Bool ret = FALSE;
- if (randrp->virtualX == -1 || randrp->virtualY == -1)
- {
- randrp->virtualX = pScrn->virtualX;
- randrp->virtualY = pScrn->virtualY;
+ if (xf86RandR12Key) {
+ if (randrp->virtualX == -1 || randrp->virtualY == -1)
+ {
+ randrp->virtualX = pScrn->virtualX;
+ randrp->virtualY = pScrn->virtualY;
+ }
}
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
@@ -367,7 +369,7 @@ finish:
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
#if RANDR_12_INTERFACE
- if (WindowTable[pScreen->myNum] && ret)
+ if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
RRScreenSizeNotify (pScreen);
#endif
return ret;
@@ -451,10 +453,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
else
{
/*
- * Otherwise, just set the screen to 96dpi
+ * Otherwise, just set the screen to DEFAULT_DPI
*/
- mmWidth = width * 25.4 / 96;
- mmHeight = height * 25.4 / 96;
+ mmWidth = width * 25.4 / DEFAULT_DPI;
+ mmHeight = height * 25.4 / DEFAULT_DPI;
}
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -467,6 +469,9 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
mmHeight);
}
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
if (randrp->virtualX == -1 || randrp->virtualY == -1)
{
randrp->virtualX = pScrn->virtualX;
@@ -492,11 +497,11 @@ xf86RandR12Init (ScreenPtr pScreen)
if (!noPanoramiXExtension)
return TRUE;
#endif
+
if (xf86RandR12Generation != serverGeneration)
- {
- xf86RandR12Index = AllocateScreenPrivateIndex();
xf86RandR12Generation = serverGeneration;
- }
+
+ xf86RandR12Key = &xf86RandR12Key;
randrp = xalloc (sizeof (XF86RandRInfoRec));
if (!randrp)
@@ -522,7 +527,7 @@ xf86RandR12Init (ScreenPtr pScreen)
randrp->maxX = randrp->maxY = 0;
- pScreen->devPrivates[xf86RandR12Index].ptr = randrp;
+ dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp);
#if RANDR_12_INTERFACE
if (!xf86RandR12Init12 (pScreen))
@@ -534,12 +539,18 @@ xf86RandR12Init (ScreenPtr pScreen)
_X_EXPORT void
xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
{
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ XF86RandRInfoPtr randrp;
#if RANDR_12_INTERFACE
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
int c;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+#endif
+
+ if (xf86RandR12Key == NULL)
+ return;
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
for (c = 0; c < config->num_crtc; c++) {
xf86CrtcPtr crtc = config->crtc[c];
@@ -684,11 +695,8 @@ xf86RandRModeConvert (ScrnInfoPtr scrn,
RRModePtr randr_mode,
DisplayModePtr mode)
{
- mode->prev = NULL;
- mode->next = NULL;
- mode->name = NULL;
+ memset(mode, 0, sizeof(DisplayModeRec));
mode->status = MODE_OK;
- mode->type = 0;
mode->Clock = randr_mode->mode.dotClock / 1000;
@@ -1069,9 +1077,11 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ if (xf86RandR12Key == NULL)
+ return TRUE;
+
for (c = 0; c < config->num_crtc; c++)
- xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
-
+ xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
RRScreenSetSizeRange (pScreen, config->minWidth, config->minHeight,
config->maxWidth, config->maxHeight);
@@ -1088,11 +1098,11 @@ xf86RandR12TellChanged (ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
int c;
- if (!randrp)
+ if (xf86RandR12Key == NULL)
return;
+
xf86RandR12SetInfo12 (pScreen);
for (c = 0; c < config->num_crtc; c++)
xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index e5a71c00a..f9a82c68d 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
DIST_SUBDIRS = bsd bus misc linux lynxos solaris sysv sco usl hurd
-sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h \
+sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h \
assyntax.h xf86OSmouse.h
EXTRA_DIST = int10Defines.h xf86OSpriv.h README.OS-lib
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index 446b69ee2..4fc270aa9 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -54,7 +54,6 @@ AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
INCLUDES = $(XORG_INCS)
libbsd_la_SOURCES = \
- $(srcdir)/../shared/libc_wrapper.c \
$(srcdir)/../shared/posix_tty.c \
$(srcdir)/../shared/sigio.c \
$(srcdir)/../shared/vidmem.c \
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index a1b19d0f6..523c4488e 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -368,7 +368,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(-1);
}
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index b556563d3..23948b5d6 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -246,7 +246,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(-1);
}
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index e7db6c10e..42b905483 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -301,7 +301,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(-1);
}
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 6bd0eb7fc..0abb34f98 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -210,7 +210,7 @@
# define ARCH_PCI_INIT ia64linuxPciInit
# endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__i386)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index c864e3385..ff257a8c7 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -559,7 +559,7 @@ _X_EXPORT pointer
xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
{
pointer ret;
- unsigned long pagemask = xf86getpagesize() - 1;
+ unsigned long pagemask = getpagesize() - 1;
unsigned long off = offset & ~pagemask;
unsigned long len = ((offset + size + pagemask) & ~pagemask) - off;
@@ -585,7 +585,7 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
_X_EXPORT void
xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size)
{
- unsigned long mask = xf86getpagesize() - 1;
+ unsigned long mask = getpagesize() - 1;
unsigned long base = (unsigned long)addr & ~mask;
unsigned long len = (((unsigned long)addr + size + mask) & ~mask) - base;
diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c
index 6f7113f15..2d8039c29 100644
--- a/hw/xfree86/os-support/bus/sparcPci.c
+++ b/hw/xfree86/os-support/bus/sparcPci.c
@@ -270,7 +270,7 @@ sparcPciInit(void)
}
sparcPromInit();
- pagemask = xf86getpagesize() - 1;
+ pagemask = getpagesize() - 1;
for (node = promGetChild(promRootNode);
node;
diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c
index 561fbd9f7..d78e0c434 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.c
+++ b/hw/xfree86/os-support/bus/zx1PCI.c
@@ -469,7 +469,7 @@ void
xf86PreScanZX1(void)
{
resRange range;
- unsigned long mapSize = xf86getpagesize();
+ unsigned long mapSize = getpagesize();
unsigned long tmp, base, ioaaddr;
unsigned long flagsd, based, lastd, maskd, routed;
unsigned long flags0, base0, last0, mask0, route0;
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index e6543e133..2214b1c2d 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -4,7 +4,6 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \
hurd_mouse.c hurd_video.c \
$(srcdir)/../shared/VTsw_noop.c \
$(srcdir)/../shared/posix_tty.c \
- $(srcdir)/../shared/libc_wrapper.c \
$(srcdir)/../shared/stdResource.c \
$(srcdir)/../shared/sigiostubs.c \
$(srcdir)/../shared/pm_noop.c \
diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
index 8e6ae8d36..04763ada7 100644
--- a/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/hw/xfree86/os-support/hurd/hurd_video.c
@@ -126,7 +126,7 @@ extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on);
Bool
xf86EnableIO()
{
- if (ioperm(0, 0xffff, 1)) {
+ if (ioperm(0, 0x10000, 1)) {
FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno));
return FALSE;
}
@@ -138,7 +138,7 @@ xf86EnableIO()
void
xf86DisableIO()
{
- ioperm(0,0xffff,0);
+ ioperm(0,0x10000,0);
return;
}
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 5bb252be3..5a52ffdd4 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -34,7 +34,6 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \
$(srcdir)/../shared/vidmem.c \
$(srcdir)/../shared/sigio.c \
$(srcdir)/../shared/stdResource.c \
- $(srcdir)/../shared/libc_wrapper.c \
$(ACPI_SRCS) \
$(APM_SRCS) \
$(PLATFORM_PCI_SUPPORT)
diff --git a/hw/xfree86/os-support/misc/Delay.c b/hw/xfree86/os-support/misc/Delay.c
index e3e93faa4..b18789a3a 100644
--- a/hw/xfree86/os-support/misc/Delay.c
+++ b/hw/xfree86/os-support/misc/Delay.c
@@ -18,7 +18,7 @@ xf86UDelay(long usec)
int sigio;
sigio = xf86BlockSIGIO();
- xf86usleep(usec);
+ usleep(usec);
xf86UnblockSIGIO(sigio);
#endif
diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c
index cccf86a04..8bac87ebe 100644
--- a/hw/xfree86/os-support/shared/bios_mmap.c
+++ b/hw/xfree86/os-support/shared/bios_mmap.c
@@ -55,7 +55,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
DEV_MEM, strerror(errno));
return(-1);
}
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
@@ -137,7 +137,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(-1);
}
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
deleted file mode 100644
index 959424110..000000000
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ /dev/null
@@ -1,2123 +0,0 @@
-/*
- * Copyright 1997-2003 by The XFree86 Project, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Orest Zborowski and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Orest Zborowski
- * and David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
- * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#if defined(linux) && !defined(__GLIBC__)
-#undef __STRICT_ANSI__
-#endif
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include <X11/Xos.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#if defined(__bsdi__)
-#undef _POSIX_SOURCE
-#undef _ANSI_SOURCE
-#endif
-#include <sys/time.h>
-#include <math.h>
-#ifdef sun
-#include <ieeefp.h>
-#endif
-#include <stdarg.h>
-#include <fcntl.h>
-#include <X11/Xfuncproto.h>
-#include "os.h"
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/ioctl.h>
-#ifdef HAS_SVR3_MMAPDRV
-#define NO_MMAP
-#ifdef SELF_CONTAINED_WRAPPER
-#include <sys/at_ansi.h>
-#include <sys/kd.h>
-#include <sys/sysmacros.h>
-#if !defined(_NEED_SYSI86)
-# include <sys/immu.h>
-# include <sys/region.h>
-#endif
-#include <sys/mmap.h>
-struct kd_memloc MapDSC;
-int mmapFd = -2;
-#else
-extern struct kd_memloc MapDSC;
-extern int mmapFd;
-#endif
-#endif
-#ifndef NO_MMAP
-#include <sys/mman.h>
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-#endif
-#if !defined(ISC)
-#include <stdlib.h>
-#endif
-
-#define NEED_XF86_TYPES 1
-#define NEED_XF86_PROTOTYPES 1
-#define DONT_DEFINE_WRAPPERS
-#include "xf86_ansic.h"
-
-#ifndef SELF_CONTAINED_WRAPPER
-#include "xf86.h"
-#include "xf86Priv.h"
-#define NO_OSLIB_PROTOTYPES
-#define XF86_OS_PRIVS
-#define HAVE_WRAPPER_DECLS
-#include "xf86_OSlib.h"
-#else
-void xf86WrapperInit(void);
-#endif
-
-
-#ifndef X_NOT_POSIX
-#include <dirent.h>
-#else
-#ifdef SYSV
-#include <dirent.h>
-#else
-#ifdef USG
-#include <dirent.h>
-#else
-#include <sys/dir.h>
-#ifndef dirent
-#define dirent direct
-#endif
-#endif
-#endif
-#endif
-typedef struct dirent DIRENTRY;
-
-#ifdef ISC202
-#include <sys/types.h>
-#define WIFEXITED(a) ((a & 0x00ff) == 0) /* LSB will be 0 */
-#define WEXITSTATUS(a) ((a & 0xff00) >> 8)
-#define WIFSIGNALED(a) ((a & 0xff00) == 0) /* MSB will be 0 */
-#define WTERMSIG(a) (a & 0x00ff)
-#else
-#if defined(ISC) && !defined(_POSIX_SOURCE)
-#define _POSIX_SOURCE
-#include <sys/types.h>
-#include <sys/wait.h>
-#undef _POSIX_SOURCE
-#else
-#if (defined(ISC) && defined(_POSIX_SOURCE)) || defined(Lynx) || (defined (__alpha__) && defined(linux))
-#include <sys/types.h>
-#endif
-#include <sys/wait.h>
-#endif
-#endif
-#ifdef Lynx
-#if !defined(S_IFIFO) && defined(S_IFFIFO)
-#define S_IFIFO S_IFFIFO
-#endif
-#endif
-
-/* For xf86getpagesize() */
-#if defined(linux)
-#define HAS_SC_PAGESIZE
-#define HAS_GETPAGESIZE
-#elif defined(CSRG_BASED)
-#define HAS_GETPAGESIZE
-#elif defined(DGUX)
-#define HAS_GETPAGESIZE
-#elif defined(sun) && !defined(SVR4)
-#define HAS_GETPAGESIZE
-#endif
-#ifdef XNO_SYSCONF
-#undef _SC_PAGESIZE
-#endif
-#ifdef HAVE_SYSV_IPC
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#endif
-#include <setjmp.h>
-
-#if defined(setjmp) && defined(__GNU_LIBRARY__) && \
- (!defined(__GLIBC__) || (__GLIBC__ < 2) || \
- ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 3)))
-#define HAS_GLIBC_SIGSETJMP 1
-#endif
-
-#if 0
-#define SETBUF_RETURNS_INT
-#endif
-
-_X_EXPORT double xf86HUGE_VAL;
-
-#ifndef SELF_CONTAINED_WRAPPERS
-extern void xf86DisableIO(void);
-#endif
-
-/*
- * This file contains the XFree86 wrappers for libc functions that can be
- * called by loadable modules
- */
-
-_X_EXPORT double
-xf86hypot(double x, double y)
-{
- return(hypot(x,y));
-}
-
-_X_EXPORT void
-xf86qsort(void *base, xf86size_t nmemb, xf86size_t size,
- int (*comp)(const void *, const void *))
-{
- qsort(base, nmemb, size, comp);
-}
-
-/* string functions */
-
-_X_EXPORT char*
-xf86strcat(char* dest, const char* src)
-{
- return(strcat(dest,src));
-}
-
-_X_EXPORT char*
-xf86strchr(const char* s, int c)
-{
- return strchr(s,c);
-}
-
-_X_EXPORT int
-xf86strcmp(const char* s1, const char* s2)
-{
- return strcmp(s1,s2);
-}
-
-/* Just like the BSD version. It assumes that tolower() is ANSI-compliant */
-_X_EXPORT int
-xf86strcasecmp(const char* s1, const char* s2)
-{
- const unsigned char *us1 = (const unsigned char *)s1;
- const unsigned char *us2 = (const unsigned char *)s2;
-
- while (tolower(*us1) == tolower(*us2++))
- if (*us1++ == '\0')
- return 0;
-
- return tolower(*us1) - tolower(*--us2);
-}
-
-_X_EXPORT char*
-xf86strcpy(char* dest, const char* src)
-{
- return strcpy(dest,src);
-}
-
-_X_EXPORT xf86size_t
-xf86strcspn(const char* s1, const char* s2)
-{
- return (xf86size_t)strcspn(s1,s2);
-}
-
-_X_EXPORT xf86size_t
-xf86strlen(const char* s)
-{
- return (xf86size_t)strlen(s);
-}
-
-_X_EXPORT xf86size_t
-xf86strlcat(char *dest, const char *src, xf86size_t size)
-{
- return(strlcat(dest, src, size));
-}
-
-_X_EXPORT xf86size_t
-xf86strlcpy(char *dest, const char *src, xf86size_t size)
-{
- return strlcpy(dest, src, size);
-}
-
-_X_EXPORT char*
-xf86strncat(char* dest, const char* src, xf86size_t n)
-{
- return strncat(dest,src,(size_t)n);
-}
-
-_X_EXPORT int
-xf86strncmp(const char* s1, const char* s2, xf86size_t n)
-{
- return strncmp(s1,s2,(size_t)n);
-}
-
-/* Just like the BSD version. It assumes that tolower() is ANSI-compliant */
-_X_EXPORT int
-xf86strncasecmp(const char* s1, const char* s2, xf86size_t n)
-{
- if (n != 0) {
- const unsigned char *us1 = (const unsigned char *)s1;
- const unsigned char *us2 = (const unsigned char *)s2;
-
- do {
- if (tolower(*us1) != tolower(*us2++))
- return tolower(*us1) - tolower(*--us2);
- if (*us1++ == '\0')
- break;
- } while (--n != 0);
- }
- return 0;
-}
-
-_X_EXPORT char*
-xf86strncpy(char* dest, const char* src, xf86size_t n)
-{
- return strncpy(dest,src,(size_t)n);
-}
-
-_X_EXPORT char*
-xf86strpbrk(const char* s1, const char* s2)
-{
- return strpbrk(s1,s2);
-}
-
-_X_EXPORT char*
-xf86strrchr(const char* s, int c)
-{
- return strrchr(s,c);
-}
-
-_X_EXPORT xf86size_t
-xf86strspn(const char* s1, const char* s2)
-{
- return strspn(s1,s2);
-}
-
-_X_EXPORT char*
-xf86strstr(const char* s1, const char* s2)
-{
- return strstr(s1,s2);
-}
-
-_X_EXPORT char*
-xf86strtok(char* s1, const char* s2)
-{
- return strtok(s1,s2);
-}
-
-_X_EXPORT char*
-xf86strdup(const char* s)
-{
- return xstrdup(s);
-}
-
-_X_EXPORT int
-xf86sprintf(char *s, const char *format, ...)
-{
- int ret;
- va_list args;
- va_start(args, format);
- ret = vsprintf(s, format, args);
- va_end(args);
- return ret;
-}
-
-_X_EXPORT int
-xf86snprintf(char *s, xf86size_t len, const char *format, ...)
-{
- int ret;
- va_list args;
- va_start(args, format);
- ret = vsnprintf(s, (size_t)len, format, args);
- va_end(args);
- return ret;
-}
-
-_X_EXPORT void
-xf86bzero(void* s, unsigned int n)
-{
- memset(s, 0, n);
-}
-
-#ifdef HAVE_VSSCANF
-_X_EXPORT int
-xf86sscanf(char *s, const char *format, ...)
-#else
-_X_EXPORT int
-xf86sscanf(char *s, const char *format, char *a0, char *a1, char *a2,
- char *a3, char *a4, char *a5, char *a6, char *a7, char *a8,
- char *a9) /* limit of ten args */
-#endif
-{
-#ifdef HAVE_VSSCANF
- int ret;
- va_list args;
- va_start(args, format);
-
- ret = vsscanf(s,format,args);
- va_end(args);
- return ret;
-#else
- return sscanf(s, format, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
-#endif
-}
-
-/* Basic I/O */
-
-_X_EXPORT int xf86errno;
-
-/* XXX This is not complete */
-
-static int
-xfToOsOpenFlags(int xfflags)
-{
- int flags = 0;
-
- /* XXX This assumes O_RDONLY is 0 */
- if (xfflags & XF86_O_WRONLY)
- flags |= O_WRONLY;
- if (xfflags & XF86_O_RDWR)
- flags |= O_RDWR;
- if (xfflags & XF86_O_CREAT)
- flags |= O_CREAT;
-
- return flags;
-}
-
-_X_EXPORT int
-xf86open(const char *path, int flags, ...)
-{
- int fd;
- va_list ap;
-
- va_start(ap, flags);
- flags = xfToOsOpenFlags(flags);
- if (flags & O_CREAT) {
- /* can't request a mode_t directly on systems where mode_t
- is an unsigned short */
- mode_t mode = (mode_t)va_arg(ap, unsigned int);
- fd = open(path, flags, mode);
- } else {
- fd = open(path, flags);
- }
- va_end(ap);
- xf86errno = xf86GetErrno();
-
- return fd;
-}
-
-_X_EXPORT int
-xf86close(int fd)
-{
- int status = close(fd);
-
- xf86errno = xf86GetErrno();
- return status;
-}
-
-_X_EXPORT long
-xf86lseek(int fd, long offset, int whence)
-{
- switch (whence) {
- case XF86_SEEK_SET:
- whence = SEEK_SET;
- break;
- case XF86_SEEK_CUR:
- whence = SEEK_CUR;
- break;
- case XF86_SEEK_END:
- whence = SEEK_END;
- break;
- }
- return (long)lseek(fd, (off_t)offset, whence);
-}
-
-_X_EXPORT int
-xf86ioctl(int fd, unsigned long request, pointer argp)
-{
- int status = ioctl(fd, request, argp);
-
- xf86errno = xf86GetErrno();
- return status;
-}
-
-_X_EXPORT xf86ssize_t
-xf86read(int fd, void *buf, xf86size_t nbytes)
-{
- xf86ssize_t n = read(fd, buf, (size_t)nbytes);
-
- xf86errno = xf86GetErrno();
- return n;
-}
-
-_X_EXPORT xf86ssize_t
-xf86write(int fd, const void *buf, xf86size_t nbytes)
-{
- xf86ssize_t n = write(fd, buf, (size_t)nbytes);
-
- xf86errno = xf86GetErrno();
- return n;
-}
-
-_X_EXPORT void*
-xf86mmap(void *start, xf86size_t length, int prot,
- int flags, int fd, xf86size_t /* off_t */ offset)
-{
-#ifndef NO_MMAP
- int p=0, f=0;
- void *rc;
-
- if (flags & XF86_MAP_FIXED) f |= MAP_FIXED;
- if (flags & XF86_MAP_SHARED) f |= MAP_SHARED;
- if (flags & XF86_MAP_PRIVATE) f |= MAP_PRIVATE;
-#if defined(__amd64__) && defined(linux)
- if (flags & XF86_MAP_32BIT) f |= MAP_32BIT;
-#endif
- if (prot & XF86_PROT_EXEC) p |= PROT_EXEC;
- if (prot & XF86_PROT_READ) p |= PROT_READ;
- if (prot & XF86_PROT_WRITE) p |= PROT_WRITE;
- if (prot & XF86_PROT_NONE) p |= PROT_NONE;
-
- rc = mmap(start,(size_t)length,p,f,fd,(off_t)offset);
-
- xf86errno = xf86GetErrno();
- if (rc == MAP_FAILED)
- return XF86_MAP_FAILED;
- else
- return rc;
-#else
-#ifdef HAS_SVR3_MMAPDRV
- void *rc;
-#ifdef SELF_CONTAINED_WRAPPER
- if(mmapFd < 0) {
- if ((mmapFd = open("/dev/mmap", O_RDWR)) == -1) {
- ErrorF("Warning: failed to open /dev/mmap \n");
- xf86errno = xf86_ENOSYS;
- return XF86_MAP_FAILED;
- }
- }
-#endif
- MapDSC.vaddr = (char *)start;
- MapDSC.physaddr = (char *)offset;
- MapDSC.length = length;
- MapDSC.ioflg = 1;
-
- rc = (pointer)ioctl(mmapFd, MAP, &MapDSC);
- xf86errno = xf86GetErrno();
- if (rc == NULL)
- return XF86_MAP_FAILED;
- else
- return rc;
-#else
- ErrorF("Warning: mmap() is not supported on this platform\n");
- xf86errno = xf86_ENOSYS;
- return XF86_MAP_FAILED;
-#endif
-#endif
-}
-
-_X_EXPORT int
-xf86munmap(void *start, xf86size_t length)
-{
-#ifndef NO_MMAP
- int rc = munmap(start,(size_t)length);
-
- xf86errno = xf86GetErrno();
- return rc;
-#else
-#ifdef HAS_SVR3_MMAPDRV
- int rc = ioctl(mmapFd, UNMAPRM , start);
-
- xf86errno = xf86GetErrno();
- return rc;
-#else
- ErrorF("Warning: munmap() is not supported on this platform\n");
- xf86errno = xf86_ENOSYS;
- return -1;
-#endif
-#endif
-}
-
-_X_EXPORT int
-xf86stat(const char *file_name, struct xf86stat *xfst)
-{
- int rc;
- struct stat st;
-
- rc = stat(file_name, &st);
- xf86errno = xf86GetErrno();
- xfst->st_rdev = st.st_rdev; /* Not much is currently supported */
- return rc;
-}
-
-_X_EXPORT int
-xf86fstat(int fd, struct xf86stat *xfst)
-{
- int rc;
- struct stat st;
-
- rc = fstat(fd, &st);
- xf86errno = xf86GetErrno();
- xfst->st_rdev = st.st_rdev; /* Not much is currently supported */
- return rc;
-}
-
-static int
-xfToOsAccessMode(int xfmode)
-{
- switch(xfmode) {
- case XF86_R_OK: return R_OK;
- case XF86_W_OK: return W_OK;
- case XF86_X_OK: return X_OK;
- case XF86_F_OK: return F_OK;
- }
- return 0;
-}
-
-_X_EXPORT int
-xf86access(const char *pathname, int mode)
-{
- int rc;
-
- mode = xfToOsAccessMode(mode);
- rc = access(pathname, mode);
- xf86errno = xf86GetErrno();
- return rc;
-}
-
-
-
-/* limited stdio support */
-
-#define XF86FILE_magic 0x58464856 /* "XFHV" */
-
-typedef struct _xf86_file_ {
- INT32 fileno;
- INT32 magic;
- FILE* filehnd;
- char* fname;
-} XF86FILE_priv;
-
-static XF86FILE_priv stdhnd[3] = {
- { 0, XF86FILE_magic, NULL, "$stdinp$" },
- { 0, XF86FILE_magic, NULL, "$stdout$" },
- { 0, XF86FILE_magic, NULL, "$stderr$" }
-};
-
-_X_EXPORT XF86FILE* xf86stdin = (XF86FILE*)&stdhnd[0];
-_X_EXPORT XF86FILE* xf86stdout = (XF86FILE*)&stdhnd[1];
-_X_EXPORT XF86FILE* xf86stderr = (XF86FILE*)&stdhnd[2];
-
-void
-xf86WrapperInit()
-{
- if (stdhnd[0].filehnd == NULL)
- stdhnd[0].filehnd = stdin;
- if (stdhnd[1].filehnd == NULL)
- stdhnd[1].filehnd = stdout;
- if (stdhnd[2].filehnd == NULL)
- stdhnd[2].filehnd = stderr;
- xf86HUGE_VAL = HUGE_VAL;
-}
-
-_X_EXPORT XF86FILE*
-xf86fopen(const char* fn, const char* mode)
-{
- XF86FILE_priv* fp;
- FILE *f = fopen(fn,mode);
- xf86errno = xf86GetErrno();
- if (!f) return 0;
-
- fp = xalloc(sizeof(XF86FILE_priv));
- fp->magic = XF86FILE_magic;
- fp->filehnd = f;
- fp->fileno = fileno(f);
- fp->fname = xf86strdup(fn);
-#ifdef DEBUG
- ErrorF("xf86fopen(%s,%s) yields FILE %p XF86FILE %p\n",
- fn,mode,f,fp);
-#endif
- return (XF86FILE*)fp;
-}
-
-static void _xf86checkhndl(XF86FILE_priv* f,const char *func)
-{
- if (!f || f->magic != XF86FILE_magic ||
- !f->filehnd || !f->fname) {
- FatalError("libc_wrapper error: passed invalid FILE handle to %s",
- func);
- exit(42);
- }
-}
-
-_X_EXPORT int
-xf86fclose(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
- int ret;
-
- _xf86checkhndl(fp,"xf86fclose");
-
- /* somewhat bad check */
- if (fp->fileno < 3 && fp->fname[0]=='$') {
- /* assume this is stdin/out/err, don't dispose */
- ret = fclose(fp->filehnd);
- } else {
- ret = fclose(fp->filehnd);
- fp->magic = 0; /* invalidate */
- xfree(fp->fname);
- xfree(fp);
- }
- return ret ? -1 : 0;
-}
-
-_X_EXPORT int
-xf86printf(const char *format, ...)
-{
- int ret;
- va_list args;
- va_start(args, format);
-
- ret = printf(format,args);
- va_end(args);
- return ret;
-}
-
-_X_EXPORT int
-xf86fprintf(XF86FILE* f, const char *format, ...)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- int ret;
- va_list args;
- va_start(args, format);
-
-#ifdef DEBUG
- ErrorF("xf86fprintf for XF86FILE %p\n", fp);
-#endif
- _xf86checkhndl(fp,"xf86fprintf");
-
- ret = vfprintf(fp->filehnd,format,args);
- va_end(args);
- return ret;
-}
-
-_X_EXPORT int
-xf86vfprintf(XF86FILE* f, const char *format, va_list ap)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
-#ifdef DEBUG
- ErrorF("xf86vfprintf for XF86FILE %p\n", fp);
-#endif
- _xf86checkhndl(fp,"xf86vfprintf");
-
- return vfprintf(fp->filehnd,format,ap);
-}
-
-_X_EXPORT int
-xf86vsprintf(char *s, const char *format, va_list ap)
-{
- return vsprintf(s, format, ap);
-}
-
-_X_EXPORT int
-xf86vsnprintf(char *s, xf86size_t len, const char *format, va_list ap)
-{
- return vsnprintf(s, (size_t)len, format, ap);
-}
-
-#ifdef HAVE_VFSCANF
-_X_EXPORT int
-xf86fscanf(XF86FILE* f, const char *format, ...)
-#else
-_X_EXPORT int
-xf86fscanf(XF86FILE* f, const char *format, char *a0, char *a1, char *a2,
- char *a3, char *a4, char *a5, char *a6, char *a7, char *a8,
- char *a9) /* limit of ten args */
-#endif
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
-#ifdef HAVE_VFSCANF
- int ret;
- va_list args;
- va_start(args, format);
-
- _xf86checkhndl(fp,"xf86fscanf");
-
- ret = vfscanf(fp->filehnd,format,args);
- va_end(args);
- return ret;
-#else
- _xf86checkhndl(fp,"xf86fscanf");
- return fscanf(fp->filehnd, format, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
-#endif
-}
-
-_X_EXPORT char *
-xf86fgets(char *buf, INT32 n, XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fgets");
- return fgets(buf,(int)n,fp->filehnd);
-}
-
-_X_EXPORT int
-xf86fputs(const char *buf, XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fputs");
- return fputs(buf,fp->filehnd);
-}
-
-_X_EXPORT int
-xf86getc(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86getc");
- return getc(fp->filehnd);
-}
-
-_X_EXPORT int
-xf86fgetc(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fgetc");
- return fgetc(fp->filehnd);
-}
-
-_X_EXPORT int
-xf86fputc(int c,XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fputc");
- return fputc(c,fp->filehnd);
-}
-
-_X_EXPORT int
-xf86fflush(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fflush");
- return fflush(fp->filehnd);
-}
-
-_X_EXPORT xf86size_t
-xf86fread(void* buf, xf86size_t sz, xf86size_t cnt, XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
-#ifdef DEBUG
- ErrorF("xf86fread for XF86FILE %p\n", fp);
-#endif
- _xf86checkhndl(fp,"xf86fread");
- return fread(buf,(size_t)sz,(size_t)cnt,fp->filehnd);
-}
-
-_X_EXPORT xf86size_t
-xf86fwrite(const void* buf, xf86size_t sz, xf86size_t cnt, XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fwrite");
- return fwrite(buf,(size_t)sz,(size_t)cnt,fp->filehnd);
-}
-
-_X_EXPORT int
-xf86fseek(XF86FILE* f, long offset, int whence)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fseek");
- switch (whence) {
- case XF86_SEEK_SET:
- whence = SEEK_SET;
- break;
- case XF86_SEEK_CUR:
- whence = SEEK_CUR;
- break;
- case XF86_SEEK_END:
- whence = SEEK_END;
- break;
- }
- return fseek(fp->filehnd,offset,whence);
-}
-
-_X_EXPORT long
-xf86ftell(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86ftell");
- return ftell(fp->filehnd);
-}
-
-#define mapnum(e) case (xf86_##e): err = e; break;
-
-_X_EXPORT char*
-xf86strerror(int n)
-{
- int err;
-
- switch (n)
- {
- case 0: err = 0; break;
- mapnum (EACCES);
- mapnum (EAGAIN);
- mapnum (EBADF);
- mapnum (EEXIST);
- mapnum (EFAULT);
- mapnum (EINTR);
- mapnum (EINVAL);
- mapnum (EISDIR);
- mapnum (ELOOP); /* not POSIX 1 */
- mapnum (EMFILE);
- mapnum (ENAMETOOLONG);
- mapnum (ENFILE);
- mapnum (ENOENT);
- mapnum (ENOMEM);
- mapnum (ENOSPC);
- mapnum (ENOTDIR);
- mapnum (EPIPE);
- mapnum (EROFS);
- mapnum (ETXTBSY); /* not POSIX 1 */
- mapnum (ENOTTY);
-#ifdef ENOSYS
- mapnum (ENOSYS);
-#endif
- mapnum (EBUSY);
- mapnum (ENODEV);
- mapnum (EIO);
-#ifdef ESRCH
- mapnum (ESRCH);
-#endif
-#ifdef ENXIO
- mapnum (ENXIO);
-#endif
-#ifdef E2BIG
- mapnum (E2BIG);
-#endif
-#ifdef ENOEXEC
- mapnum (ENOEXEC);
-#endif
-#ifdef ECHILD
- mapnum (ECHILD);
-#endif
-#ifdef ENOTBLK
- mapnum (ENOTBLK);
-#endif
-#ifdef EXDEV
- mapnum (EXDEV);
-#endif
-#ifdef EFBIG
- mapnum (EFBIG);
-#endif
-#ifdef ESPIPE
- mapnum (ESPIPE);
-#endif
-#ifdef EMLINK
- mapnum (EMLINK);
-#endif
-#ifdef EDOM
- mapnum (EDOM);
-#endif
-#ifdef ERANGE
- mapnum (ERANGE);
-#endif
-
- default:
- err = 999;
- }
- return strerror(err);
-}
-
-#undef mapnum
-
-
-/* required for portable fgetpos/fsetpos,
- * use as
- * XF86fpos_t* pos = xalloc(xf86fpossize());
- */
-_X_EXPORT long
-xf86fpossize()
-{
- return sizeof(fpos_t);
-}
-
-_X_EXPORT int
-xf86fgetpos(XF86FILE* f,XF86fpos_t* pos)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
- fpos_t *ppos = (fpos_t*)pos;
-
- _xf86checkhndl(fp,"xf86fgetpos");
-#ifndef ISC
- return fgetpos(fp->filehnd,ppos);
-#else
- *ppos = ftell(fp->filehnd);
- if (*ppos < 0L)
- return(-1);
- return(0);
-#endif
-}
-
-_X_EXPORT int
-xf86fsetpos(XF86FILE* f,const XF86fpos_t* pos)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
- fpos_t *ppos = (fpos_t*)pos;
-
- /* XXX need to handle xf86errno here */
- _xf86checkhndl(fp,"xf86fsetpos");
-#ifndef ISC
- return fsetpos(fp->filehnd,ppos);
-#else
- if (ppos == NULL)
- {
- errno = EINVAL;
- return EOF;
- }
- return fseek(fp->filehnd, *ppos, SEEK_SET);
-#endif
-}
-
-_X_EXPORT void
-xf86perror(const char *s)
-{
- perror(s);
-}
-
-_X_EXPORT int
-xf86remove(const char *s)
-{
-#ifdef _POSIX_SOURCE
- return remove(s);
-#else
- return unlink(s);
-#endif
-}
-
-_X_EXPORT int
-xf86rename(const char *old, const char *new)
-{
-#ifdef _POSIX_SOURCE
- return rename(old,new);
-#else
- int ret = link(old,new);
- if (!ret) {
- ret = unlink(old);
- if (ret) unlink(new);
- } else
- ret = unlink(new);
- return ret;
-#endif
-}
-
-_X_EXPORT void
-xf86rewind(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fsetpos");
- rewind(fp->filehnd);
-}
-
-_X_EXPORT void
-xf86clearerr(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86clearerr");
- clearerr(fp->filehnd);
-}
-
-_X_EXPORT int
-xf86feof(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86feof");
- return feof(fp->filehnd);
-}
-
-_X_EXPORT int
-xf86ferror(XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86ferror");
- return ferror(fp->filehnd);
-}
-
-_X_EXPORT XF86FILE*
-xf86freopen(const char* fname,const char* mode,XF86FILE* fold)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)fold;
- FILE *fnew;
-
- _xf86checkhndl(fp,"xf86freopen");
- fnew = freopen(fname,mode,fp->filehnd);
- xf86errno = xf86GetErrno();
- if (!fnew) {
- xf86fclose(fold); /* discard old XF86FILE structure */
- return 0;
- }
- /* recycle the old XF86FILE structure */
- fp->magic = XF86FILE_magic;
- fp->filehnd = fnew;
- fp->fileno = fileno(fnew);
- fp->fname = xf86strdup(fname);
-#ifdef DEBUG
- ErrorF("xf86freopen(%s,%s,%p) yields FILE %p XF86FILE %p\n",
- fname,mode,fold,fnew,fp);
-#endif
- return (XF86FILE*)fp;
-}
-
-_X_EXPORT int
-xf86setbuf(XF86FILE* f, char *buf)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86fsetbuf");
-#ifdef SETBUF_RETURNS_INT
- return setbuf(fp->filehnd, buf);
-#else
- setbuf(fp->filehnd, buf);
- return 0;
-#endif
-}
-
-_X_EXPORT int
-xf86setvbuf(XF86FILE* f, char *buf, int mode, xf86size_t size)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
- int vbufmode;
-
- _xf86checkhndl(fp,"xf86fsetvbuf");
-
- switch (mode) {
- case XF86_IONBF:
- vbufmode = _IONBF;
- break;
- case XF86_IOLBF:
- vbufmode = _IOFBF;
- break;
- case XF86_IOFBF:
- vbufmode = _IOLBF;
- break;
- default:
- FatalError("libc_wrapper error: mode in setvbuf incorrect");
- exit(42);
- }
-
- return setvbuf(fp->filehnd,buf,vbufmode,(size_t)size);
-}
-
-_X_EXPORT XF86FILE*
-xf86tmpfile(void)
-{
-#ifdef NEED_TMPFILE
- return xf86fopen(tmpnam((char*)0),"w+");
-#else
- XF86FILE_priv* fp;
- FILE *f = tmpfile();
- xf86errno = xf86GetErrno();
- if (!f) return 0;
-
- fp = xalloc(sizeof(XF86FILE_priv));
- fp->magic = XF86FILE_magic;
- fp->filehnd = f;
- fp->fileno = fileno(f);
- fp->fname = xf86strdup("*tmpfile*"); /* so that it can be xfree()'d */
-#ifdef DEBUG
- ErrorF("xf86tmpfile() yields FILE %p XF86FILE %p\n",f,fp);
-#endif
- return (XF86FILE*)fp;
-}
-#endif /* HAS_TMPFILE */
-
-
-_X_EXPORT int
-xf86ungetc(int c,XF86FILE* f)
-{
- XF86FILE_priv* fp = (XF86FILE_priv*)f;
-
- _xf86checkhndl(fp,"xf86ungetc");
- return ungetc(c,fp->filehnd);
-}
-
-/* Misc functions. Some are ANSI C, some are not. */
-
-_X_EXPORT void
-xf86usleep(usec)
- unsigned long usec;
-{
-#if (defined(SYSV) || defined(SVR4)) && !defined(sun)
- syscall(3112, (usec) / 1000 + 1);
-#else
- usleep(usec);
-#endif
-}
-
-_X_EXPORT void
-xf86getsecs(long * secs, long * usecs)
-{
- struct timeval tv;
-
- X_GETTIMEOFDAY(&tv);
- if (secs)
- *secs = tv.tv_sec;
- if (usecs)
- *usecs= tv.tv_usec;
-
- return;
-}
-
-_X_EXPORT int
-xf86ffs(int mask)
-{
- int n;
- if (mask == 0) return 0;
- for (n = 1; (mask & 1)==0; n++)
- mask >>= 1;
- return n;
-}
-
-_X_EXPORT char *
-xf86getenv(const char * a)
-{
- /* Only allow this when the real and effective uids are the same */
- if (getuid() != geteuid())
- return NULL;
- else
- return(getenv(a));
-}
-
-_X_EXPORT void *
-xf86bsearch(const void *key, const void *base, xf86size_t nmemb,
- xf86size_t size, int (*compar)(const void *, const void *))
-{
- return bsearch(key, base, (size_t)nmemb, (size_t)size, compar);
-}
-
-_X_EXPORT int
-xf86execl(const char *pathname, const char *arg, ...)
-{
- int i;
- pid_t pid;
- int exit_status;
- char *arglist[5];
- va_list args;
- va_start(args, arg);
- arglist[0] = (char*)&args;
- i = 1;
- while (i < 5 && (arglist[i++] = va_arg(args, char *)) != NULL)
- ;
- va_end(args);
-
- if ((pid = fork()) < 0) {
- ErrorF("Fork failed (%s)\n", strerror(errno));
- return -1;
- } else if (pid == 0) { /* child */
- /*
- * Make sure that the child doesn't inherit any I/O permissions it
- * shouldn't have. It's better to put constraints on the development
- * of a clock program than to give I/O permissions to a bogus program
- * in someone's XF86Config file
- */
-#ifndef SELF_CONTAINED_WRAPPER
- xf86DisableIO();
-#endif
- if (setuid(getuid()) == -1) {
- ErrorF("xf86Execl: setuid() failed: %s\n", strerror(errno));
- exit(255);
- }
-#if !defined(SELF_CONTAINED_WRAPPER)
- /* set stdin, stdout to the consoleFD, and leave stderr alone */
- for (i = 0; i < 2; i++)
- {
- if (xf86Info.consoleFd != i)
- {
- close(i);
- dup(xf86Info.consoleFd);
- }
- }
-#endif
-
- execv(pathname, arglist);
- ErrorF("Exec failed for command \"%s\" (%s)\n",
- pathname, strerror(errno));
- exit(255);
- }
-
- /* parent */
- wait(&exit_status);
- if (WIFEXITED(exit_status))
- {
- switch (WEXITSTATUS(exit_status))
- {
- case 0: /* OK */
- return 0;
- case 255: /* exec() failed */
- return(255);
- default: /* bad exit status */
- ErrorF("Program \"%s\" had bad exit status %d\n",
- pathname, WEXITSTATUS(exit_status));
- return(WEXITSTATUS(exit_status));
- }
- }
- else if (WIFSIGNALED(exit_status))
- {
- ErrorF("Program \"%s\" died on signal %d\n",
- pathname, WTERMSIG(exit_status));
- return(WTERMSIG(exit_status));
- }
-#ifdef WIFSTOPPED
- else if (WIFSTOPPED(exit_status))
- {
- ErrorF("Program \"%s\" stopped by signal %d\n",
- pathname, WSTOPSIG(exit_status));
- return(WSTOPSIG(exit_status));
- }
-#endif
- else /* should never get to this point */
- {
- ErrorF("Program \"%s\" has unknown exit condition\n",
- pathname);
- return(1);
- }
-}
-
-_X_EXPORT void
-xf86abort(void)
-{
- ErrorF("Module called abort() function\n");
- abort();
-}
-
-_X_EXPORT void
-xf86exit(int ex)
-{
- ErrorF("Module called exit() function with value=%d\n",ex);
- exit(ex);
-}
-
-/* directory handling functions */
-#define XF86DIR_magic 0x78666876 /* "xfhv" */
-
-typedef struct _xf86_dir_ {
- DIR *dir;
- INT32 magic;
- XF86DIRENT *dirent;
-} XF86DIR_priv;
-
-static void
-_xf86checkdirhndl(XF86DIR_priv* f,const char *func)
-{
- if (!f || f->magic != XF86DIR_magic || !f->dir || !f->dirent) {
- FatalError("libc_wrapper error: passed invalid DIR handle to %s",
- func);
- exit(42);
- }
-}
-
-_X_EXPORT XF86DIR *
-xf86opendir(const char *name)
-{
- XF86DIR_priv *dp;
- DIR *dirp;
-
- dirp = opendir(name);
- if (!dirp)
- return (XF86DIR*)0;
-
- dp = xalloc(sizeof(XF86DIR_priv));
- dp->magic = XF86DIR_magic; /* This time I have this, Dirk! :-) */
- dp->dir = dirp;
- dp->dirent = xalloc(sizeof(struct _xf86dirent));
-
- return (XF86DIR*)dp;
-}
-
-_X_EXPORT XF86DIRENT*
-xf86readdir(XF86DIR* dirp)
-{
- XF86DIR_priv* dp = (XF86DIR_priv*)dirp;
- DIRENTRY *de;
- XF86DIRENT* xde;
- int sz;
-
- _xf86checkdirhndl(dp,"xf86readdir");
-
- de = readdir(dp->dir);
- if (!de)
- return (XF86DIRENT*)0;
- xde = dp->dirent;
- sz = strlen(de->d_name);
- strncpy(xde->d_name,de->d_name, sz>_XF86NAMELEN ? (_XF86NAMELEN+1) : (sz+1));
- xde->d_name[_XF86NAMELEN] = '\0'; /* be sure to have a 0 byte */
- return xde;
-}
-
-_X_EXPORT void
-xf86rewinddir(XF86DIR* dirp)
-{
- XF86DIR_priv* dp = (XF86DIR_priv*)dirp;
-
- _xf86checkdirhndl(dp,"xf86readdir");
- rewinddir(dp->dir);
-}
-
-_X_EXPORT int
-xf86closedir(XF86DIR* dir)
-{
- XF86DIR_priv* dp = (XF86DIR_priv*)dir;
- int n;
-
- _xf86checkdirhndl(dp,"xf86readdir");
-
- n = closedir(dp->dir);
- dp->magic = 0;
- xfree(dp->dirent);
- xfree(dp);
-
- return n;
-}
-
-static mode_t
-xfToOsChmodMode(xf86mode_t xfmode)
-{
- mode_t mode = 0;
-
- if (xfmode & XF86_S_ISUID) mode |= S_ISUID;
- if (xfmode & XF86_S_ISGID) mode |= S_ISGID;
- if (xfmode & XF86_S_ISVTX) mode |= S_ISVTX;
- if (xfmode & XF86_S_IRUSR) mode |= S_IRUSR;
- if (xfmode & XF86_S_IWUSR) mode |= S_IWUSR;
- if (xfmode & XF86_S_IXUSR) mode |= S_IXUSR;
- if (xfmode & XF86_S_IRGRP) mode |= S_IRGRP;
- if (xfmode & XF86_S_IWGRP) mode |= S_IWGRP;
- if (xfmode & XF86_S_IXGRP) mode |= S_IXGRP;
- if (xfmode & XF86_S_IROTH) mode |= S_IROTH;
- if (xfmode & XF86_S_IWOTH) mode |= S_IWOTH;
- if (xfmode & XF86_S_IXOTH) mode |= S_IXOTH;
-
- return mode;
-}
-
-_X_EXPORT int
-xf86chmod(const char *path, xf86mode_t xfmode)
-{
- mode_t mode = xfToOsChmodMode(xfmode);
- int rc = chmod(path, mode);
-
- xf86errno = xf86GetErrno();
- return rc;
-}
-
-_X_EXPORT int
-xf86chown(const char *path, xf86uid_t owner, xf86gid_t group)
-{
- int rc = chown(path, owner, group);
- xf86errno = xf86GetErrno();
- return rc;
-}
-
-_X_EXPORT xf86uid_t
-xf86geteuid(void)
-{
- return geteuid();
-}
-
-_X_EXPORT xf86gid_t
-xf86getegid(void)
-{
- return getegid();
-}
-
-_X_EXPORT int
-xf86getpid(void)
-{
- return getpid();
-}
-
-static mode_t
-xfToOsMknodMode(xf86mode_t xfmode)
-{
- mode_t mode = xfToOsChmodMode(xfmode);
-
- if (xfmode & XF86_S_IFREG) mode |= S_IFREG;
- if (xfmode & XF86_S_IFCHR) mode |= S_IFCHR;
- if (xfmode & XF86_S_IFBLK) mode |= S_IFBLK;
- if (xfmode & XF86_S_IFIFO) mode |= S_IFIFO;
-
- return mode;
-}
-
-_X_EXPORT int xf86mknod(const char *pathname, xf86mode_t xfmode, xf86dev_t dev)
-{
- mode_t mode = xfToOsMknodMode(xfmode);
- int rc = mknod(pathname, mode, dev);
- xf86errno = xf86GetErrno();
- return rc;
-}
-
-_X_EXPORT unsigned int xf86sleep(unsigned int seconds)
-{
- return sleep(seconds);
-}
-
-_X_EXPORT int xf86mkdir(const char *pathname, xf86mode_t xfmode)
-{
- mode_t mode = xfToOsChmodMode(xfmode);
- int rc = mkdir(pathname, mode);
-
- xf86errno = xf86GetErrno();
- return rc;
-}
-
-
-/* Several math functions */
-
-_X_EXPORT int
-xf86abs(int x)
-{
- return abs(x);
-}
-
-_X_EXPORT double
-xf86acos(double x)
-{
- return acos(x);
-}
-
-_X_EXPORT double
-xf86asin(double x)
-{
- return asin(x);
-}
-
-_X_EXPORT double
-xf86atan(double x)
-{
- return atan(x);
-}
-
-_X_EXPORT double
-xf86atan2(double x,double y)
-{
- return atan2(x,y);
-}
-
-_X_EXPORT double
-xf86atof(const char* s)
-{
- return atof(s);
-}
-
-_X_EXPORT int
-xf86atoi(const char* s)
-{
- return atoi(s);
-}
-
-_X_EXPORT long
-xf86atol(const char* s)
-{
- return atol(s);
-}
-
-_X_EXPORT double
-xf86ceil(double x)
-{
- return ceil(x);
-}
-
-_X_EXPORT double
-xf86cos(double x)
-{
- return(cos(x));
-}
-
-_X_EXPORT double
-xf86exp(double x)
-{
- return(exp(x));
-}
-
-_X_EXPORT double
-xf86fabs(double x)
-{
- return(fabs(x));
-}
-
-_X_EXPORT int
-xf86finite(double x)
-{
-#ifndef QNX4
- return(finite(x));
-#else
- /* XXX Replace this with something that really works. */
- return 1;
-#endif
-}
-
-_X_EXPORT double
-xf86floor(double x)
-{
- return floor(x);
-}
-
-_X_EXPORT double
-xf86fmod(double x,double y)
-{
- return fmod(x,y);
-}
-
-_X_EXPORT long
-xf86labs(long x)
-{
- return labs(x);
-}
-
-_X_EXPORT double
-xf86ldexp(double x, int exp)
-{
- return ldexp(x, exp);
-}
-
-_X_EXPORT double
-xf86log(double x)
-{
- return(log(x));
-}
-
-_X_EXPORT double
-xf86log10(double x)
-{
- return(log10(x));
-}
-
-_X_EXPORT double
-xf86modf(double x,double* y)
-{
- return modf(x,y);
-}
-
-_X_EXPORT double
-xf86pow(double x, double y)
-{
- return(pow(x,y));
-}
-
-_X_EXPORT double
-xf86sin(double x)
-{
- return sin(x);
-}
-
-_X_EXPORT double
-xf86sqrt(double x)
-{
- return(sqrt(x));
-}
-
-_X_EXPORT double
-xf86strtod(const char *s, char **end)
-{
- return strtod(s,end);
-}
-
-_X_EXPORT long
-xf86strtol(const char *s, char **end, int radix)
-{
- return strtol(s,end,radix);
-}
-
-_X_EXPORT unsigned long
-xf86strtoul(const char *s, char **end,int radix)
-{
- return strtoul(s,end,radix);
-}
-
-_X_EXPORT double
-xf86tan(double x)
-{
- return tan(x);
-}
-
-/* memory functions */
-_X_EXPORT void*
-xf86memchr(const void* s, int c, xf86size_t n)
-{
- return memchr(s,c,(size_t)n);
-}
-
-_X_EXPORT int
-xf86memcmp(const void* s1, const void* s2, xf86size_t n)
-{
- return(memcmp(s1,s2,(size_t)n));
-}
-
-_X_EXPORT void*
-xf86memcpy(void* dest, const void* src, xf86size_t n)
-{
- return(memcpy(dest,src,(size_t)n));
-}
-
-_X_EXPORT void*
-xf86memmove(void* dest, const void* src, xf86size_t n)
-{
- return(memmove(dest,src,(size_t)n));
-}
-
-_X_EXPORT void*
-xf86memset(void* s, int c, xf86size_t n)
-{
- return(memset(s,c,(size_t)n));
-}
-
-/* ctype functions */
-
-_X_EXPORT int
-xf86isalnum(int c)
-{
- return isalnum(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isalpha(int c)
-{
- return isalpha(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86iscntrl(int c)
-{
- return iscntrl(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isdigit(int c)
-{
- return isdigit(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isgraph(int c)
-{
- return isgraph(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86islower(int c)
-{
- return islower(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isprint(int c)
-{
- return isprint(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86ispunct(int c)
-{
- return ispunct(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isspace(int c)
-{
- return isspace(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isupper(int c)
-{
- return isupper(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86isxdigit(int c)
-{
- return isxdigit(c) ? 1 : 0;
-}
-
-_X_EXPORT int
-xf86tolower(int c)
-{
- return tolower(c);
-}
-
-_X_EXPORT int
-xf86toupper(int c)
-{
- return toupper(c);
-}
-
-/* memory allocation functions */
-_X_EXPORT void*
-xf86calloc(xf86size_t sz,xf86size_t n)
-{
- return xcalloc(sz, n);
-}
-
-_X_EXPORT void
-xf86free(void* p)
-{
- xfree(p);
-}
-
-_X_EXPORT double
-xf86frexp(double x, int *exp)
-{
- return frexp(x, exp);
-}
-
-_X_EXPORT void*
-xf86malloc(xf86size_t n)
-{
- return xalloc(n);
-}
-
-_X_EXPORT void*
-xf86realloc(void* p, xf86size_t n)
-{
- return xrealloc(p,n);
-}
-
-/*
- * XXX This probably doesn't belong here.
- */
-_X_EXPORT int
-xf86getpagesize()
-{
- static int pagesize = -1;
-
- if (pagesize != -1)
- return pagesize;
-
-#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE)
- pagesize = sysconf(_SC_PAGESIZE);
-#endif
-#ifdef _SC_PAGE_SIZE
- if (pagesize == -1)
- pagesize = sysconf(_SC_PAGE_SIZE);
-#endif
-#ifdef HAS_GETPAGESIZE
- if (pagesize == -1)
- pagesize = getpagesize();
-#endif
-#ifdef PAGE_SIZE
- if (pagesize == -1)
- pagesize = PAGE_SIZE;
-#endif
- if (pagesize == -1)
- FatalError("xf86getpagesize: Cannot determine page size");
-
- return pagesize;
-}
-
-
-#define mapnum(e) case (e): return (xf86_##e)
-
-_X_EXPORT int
-xf86GetErrno ()
-{
- switch (errno)
- {
- case 0: return 0;
- mapnum (EACCES);
- mapnum (EAGAIN);
- mapnum (EBADF);
- mapnum (EEXIST);
- mapnum (EFAULT);
- mapnum (EINTR);
- mapnum (EINVAL);
- mapnum (EISDIR);
- mapnum (ELOOP); /* not POSIX 1 */
- mapnum (EMFILE);
- mapnum (ENAMETOOLONG);
- mapnum (ENFILE);
- mapnum (ENOENT);
- mapnum (ENOMEM);
- mapnum (ENOSPC);
- mapnum (ENOTDIR);
- mapnum (EPIPE);
- mapnum (EROFS);
- mapnum (ETXTBSY); /* not POSIX 1 */
- mapnum (ENOTTY);
-#ifdef ENOSYS
- mapnum (ENOSYS);
-#endif
- mapnum (EBUSY);
- mapnum (ENODEV);
- mapnum (EIO);
-#ifdef ESRCH
- mapnum (ESRCH);
-#endif
-#ifdef ENXIO
- mapnum (ENXIO);
-#endif
-#ifdef E2BIG
- mapnum (E2BIG);
-#endif
-#ifdef ENOEXEC
- mapnum (ENOEXEC);
-#endif
-#ifdef ECHILD
- mapnum (ECHILD);
-#endif
-#ifdef ENOTBLK
- mapnum (ENOTBLK);
-#endif
-#ifdef EXDEV
- mapnum (EXDEV);
-#endif
-#ifdef EFBIG
- mapnum (EFBIG);
-#endif
-#ifdef ESPIPE
- mapnum (ESPIPE);
-#endif
-#ifdef EMLINK
- mapnum (EMLINK);
-#endif
-#ifdef EDOM
- mapnum (EDOM);
-#endif
-#ifdef ERANGE
- mapnum (ERANGE);
-#endif
- default:
- return (xf86_UNKNOWN);
- }
-}
-
-#undef mapnum
-
-
-
-#ifdef HAVE_SYSV_IPC
-
-_X_EXPORT int
-xf86shmget(xf86key_t key, int size, int xf86shmflg)
-{
- int shmflg;
- int ret;
-
- /* This copies the permissions (SHM_R, SHM_W for u, g, o). */
- shmflg = xf86shmflg & 0777;
-
- if (key == XF86IPC_PRIVATE) key = IPC_PRIVATE;
-
- if (xf86shmflg & XF86IPC_CREAT) shmflg |= IPC_CREAT;
- if (xf86shmflg & XF86IPC_EXCL) shmflg |= IPC_EXCL;
- if (xf86shmflg & XF86IPC_NOWAIT) shmflg |= IPC_NOWAIT;
- ret = shmget((key_t) key, size, shmflg);
-
- if (ret == -1)
- xf86errno = xf86GetErrno();
-
- return ret;
-}
-
-_X_EXPORT char *
-xf86shmat(int id, char *addr, int xf86shmflg)
-{
- int shmflg = 0;
- pointer ret;
-
-#ifdef SHM_RDONLY
- if (xf86shmflg & XF86SHM_RDONLY) shmflg |= SHM_RDONLY;
-#endif
-#ifdef SHM_RND
- if (xf86shmflg & XF86SHM_RND) shmflg |= SHM_RND;
-#endif
-#ifdef SHM_REMAP
- if (xf86shmflg & XF86SHM_REMAP) shmflg |= SHM_REMAP;
-#endif
-
- ret = shmat(id,addr,shmflg);
-
- if (ret == (pointer) -1)
- xf86errno = xf86GetErrno();
-
- return ret;
-}
-
-_X_EXPORT int
-xf86shmdt(char *addr)
-{
- int ret;
-
- ret = shmdt(addr);
-
- if (ret == -1)
- xf86errno = xf86GetErrno();
-
- return ret;
-}
-
-/*
- * for now only implement the rmid command.
- */
-_X_EXPORT int
-xf86shmctl(int id, int xf86cmd, pointer buf)
-{
- int cmd;
- int ret;
-
- switch (xf86cmd) {
- case XF86IPC_RMID:
- cmd = IPC_RMID;
- break;
- default:
- return 0;
- }
-
- ret = shmctl(id, cmd, buf);
-
- if (ret == -1)
- xf86errno = xf86GetErrno();
-
- return ret;
-}
-#else
-
-int
-xf86shmget(xf86key_t key, int size, int xf86shmflg)
-{
- xf86errno = ENOSYS;
-
- return -1;
-}
-
-char *
-xf86shmat(int id, char *addr, int xf86shmflg)
-{
- xf86errno = ENOSYS;
-
- return (char *)-1;
-}
-
-int
-xf86shmctl(int id, int xf86cmd, pointer buf)
-{
- xf86errno = ENOSYS;
-
- return -1;
-}
-
-int
-xf86shmdt(char *addr)
-{
- xf86errno = ENOSYS;
-
- return -1;
-}
-#endif /* HAVE_SYSV_IPC */
-
-_X_EXPORT int
-xf86getjmptype()
-{
-#ifdef HAS_GLIBC_SIGSETJMP
- return 1;
-#else
- return 0;
-#endif
-}
-
-#ifdef HAS_GLIBC_SIGSETJMP
-
-_X_EXPORT int
-xf86setjmp(xf86jmp_buf env)
-{
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
- return __sigsetjmp((void *)env, xf86setjmp1_arg2());
-#else
- return xf86setjmp1(env, xf86setjmp1_arg2());
-#endif
-}
-
-_X_EXPORT int
-xf86setjmp0(xf86jmp_buf env)
-{
- FatalError("setjmp: type 0 called instead of type %d", xf86getjmptype());
-}
-
-#if !defined(__GLIBC__) || (__GLIBC__ < 2) /* libc5 */
-
-_X_EXPORT int
-xf86setjmp1(xf86jmp_buf env, int arg2)
-{
- __sigjmp_save((void *)env, arg2);
- return __setjmp((void *)env);
-}
-
-#endif
-
-#else /* HAS_GLIBC_SIGSETJMP */
-
-int
-xf86setjmp1(xf86jmp_buf env, int arg2)
-{
- FatalError("setjmp: type 1 called instead of type %d", xf86getjmptype());
-}
-
-int
-xf86setjmp0(xf86jmp_buf env)
-{
- return setjmp((void *)env);
-}
-
-#endif /* HAS_GLIBC_SIGSETJMP */
-
-_X_EXPORT int
-xf86setjmp1_arg2()
-{
- return 1;
-}
-
-_X_EXPORT int
-xf86setjmperror(xf86jmp_buf env)
-{
- FatalError("setjmp: don't know how to handle setjmp() type %d",
- xf86getjmptype());
-}
-
-long
-xf86random()
-{
- return random();
-}
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index 5ed60bc55..68f6b4cd0 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -20,7 +20,6 @@ solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S
noinst_LTLIBRARIES = libsolaris.la
libsolaris_la_SOURCES = sun_bios.c sun_init.c \
sun_mouse.c sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
- $(srcdir)/../shared/libc_wrapper.c \
$(srcdir)/../shared/kmod_noop.c \
$(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \
$(srcdir)/../shared/stdResource.c \
diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c
index 1223dcd68..a27a5a5a7 100644
--- a/hw/xfree86/os-support/solaris/sun_bios.c
+++ b/hw/xfree86/os-support/solaris/sun_bios.c
@@ -26,7 +26,7 @@
#include <xorg-config.h>
#endif
-#ifdef __i386__
+#if defined(__i386__) || defined(__i386)
#define _NEED_SYSI86
#endif
#include "xf86.h"
@@ -62,11 +62,11 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
*
* Use /dev/xsvc for everything.
*/
- psize = xf86getpagesize();
+ psize = getpagesize();
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-#if defined(__i386__) && !defined(__SOL8__)
+#if (defined(__i386__) || defined(__i386)) && !defined(__SOL8__)
if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0)
sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno);
else
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index c7fac524f..1f389cb40 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -29,7 +29,7 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
# include <sys/kd.h>
#endif
@@ -40,7 +40,7 @@ static int VTnum = -1;
static int xf86StartVT = -1;
#endif
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
static char fb_dev[PATH_MAX] = "/dev/fb";
#else
static char fb_dev[PATH_MAX] = "/dev/console";
@@ -209,11 +209,8 @@ xf86CloseConsole(void)
#ifdef HAS_USL_VTS
struct vt_mode VT;
#endif
-#if defined(__SOL8__) || !defined(__i386__)
- int tmp;
-#endif
-#if !defined(__i386__) && !defined(__x86)
+#if !defined(__i386__) && !defined(__i386) && !defined(__x86)
if (!xf86DoProbe && !xf86DoConfigure) {
int fd;
@@ -332,7 +329,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
#endif /* HAS_USL_VTS */
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
if ((i + 1) < argc) {
if (!strcmp(argv[i], "-dev")) {
diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c
index aa509d08b..b1b7797f1 100644
--- a/hw/xfree86/os-support/solaris/sun_mouse.c
+++ b/hw/xfree86/os-support/solaris/sun_mouse.c
@@ -121,8 +121,11 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse);
static void vuidMouseAdjustFrame(int index, int x, int y, int flags);
static int vuidMouseGeneration = 0;
-static int vuidMouseScreenIndex;
-#define vuidMouseScreenPrivate(s) ((s)->devPrivates[vuidMouseScreenIndex].ptr)
+static DevPrivateKey vuidMouseScreenKey = &vuidMouseScreenKey;
+#define vuidGetMouseScreenPrivate(s) ((VuidMsePtr) \
+ dixLookupPrivate(&(s)->devPrivates, vuidMouseScreenKey))
+#define vuidSetMouseScreenPrivate(s,p) \
+ dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, p)
#endif /* HAVE_ABSOLUTE_MOUSE_SCALING */
static inline
@@ -455,7 +458,7 @@ static void vuidMouseAdjustFrame(int index, int x, int y, int flags)
ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = pScrn->pScreen;
xf86AdjustFrameProc *wrappedAdjustFrame
- = (xf86AdjustFrameProc *) vuidMouseScreenPrivate(pScreen);
+ = (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen);
VuidMsePtr m;
if(wrappedAdjustFrame) {
@@ -496,15 +499,12 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
case DEVICE_INIT:
#ifdef HAVE_ABSOLUTE_MOUSE_SCALING
if (vuidMouseGeneration != serverGeneration) {
- if ((vuidMouseScreenIndex = AllocateScreenPrivateIndex()) >= 0) {
for (i = 0; i < screenInfo.numScreens; i++) {
ScreenPtr pScreen = screenInfo.screens[i];
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
- vuidMouseScreenPrivate(pScreen)
- = (pointer) pScrn->AdjustFrame;
+ vuidMouseSetScreenPrivate(pScreen, pScrn->AdjustFrame);
pScrn->AdjustFrame = vuidMouseAdjustFrame;
}
- }
vuidMouseGeneration = serverGeneration;
}
#endif
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 494b2cfbf..e7b529ccb 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -28,7 +28,7 @@
#include <sys/types.h> /* get __x86 definition if not set by compiler */
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
#define _NEED_SYSI86
#endif
#include "xf86.h"
@@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
/* I/O Permissions section */
/***************************************************************************/
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
static Bool ExtendedEnabled = FALSE;
#endif
_X_EXPORT Bool
xf86EnableIO(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (ExtendedEnabled)
return TRUE;
@@ -171,7 +171,7 @@ xf86EnableIO(void)
_X_EXPORT void
xf86DisableIO(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if(!ExtendedEnabled)
return;
@@ -188,7 +188,7 @@ xf86DisableIO(void)
_X_EXPORT Bool xf86DisableInterrupts(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return FALSE;
@@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void)
_X_EXPORT void xf86EnableInterrupts(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return;
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 662dbaace..aba47581f 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -76,21 +76,6 @@
#include <X11/Xos.h>
#include <X11/Xfuncproto.h>
-/*
- * Define some things from the "ANSI" C wrappers that are needed in the
- * the core server.
- */
-#ifndef HAVE_WRAPPER_DECLS
-#define HAVE_WRAPPER_DECLS
-#undef usleep
-#define usleep(a) xf86usleep(a)
-extern void xf86usleep(unsigned long);
-extern int xf86getpagesize(void);
-extern int xf86GetErrno(void);
-typedef unsigned long xf86size_t;
-typedef signed long xf86ssize_t;
-#endif
-
#include <stdio.h>
#include <ctype.h>
#include <stddef.h>
@@ -140,7 +125,7 @@ typedef signed long xf86ssize_t;
# endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
# if defined(sun) && defined (SVR4) /* Solaris? */
-# if defined(__i386__) || defined(__x86) /* on x86 or x64? */
+# if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */
# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
# include <sys/v86.h> /* Nope */
# endif
@@ -148,7 +133,7 @@ typedef signed long xf86ssize_t;
# else
# include <sys/v86.h> /* Not solaris */
# endif /* sun && i386 && SVR4 */
-# if defined(sun) && (defined (__i386__) || defined(__x86)) && defined (SVR4)
+# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
# include <sys/psw.h>
# endif
# endif /* _NEED_SYSI86 */
@@ -224,7 +209,7 @@ typedef signed long xf86ssize_t;
# define POSIX_TTY
# endif
-# if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__)
+# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__)
# define USE_VT_SYSREQ
# define VT_SYSREQ_DEFAULT TRUE
# endif
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
deleted file mode 100644
index 0afd96744..000000000
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright 1997-2003 by The XFree86 Project, Inc
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of the above listed copyright holders
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. The above listed
- * copyright holders make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifndef _XF86_ANSIC_H
-#define _XF86_ANSIC_H
-
-#include <stdarg.h>
-
-/*
- * The first set of definitions are required both for modules and
- * libc_wrapper.c.
- */
-
-#if !defined(SYSV) && !defined(SVR4) && !defined(Lynx) || \
- defined(__SCO__) || defined(__UNIXWARE__)
-#define HAVE_VSSCANF
-#define HAVE_VFSCANF
-#endif
-
-#ifndef NULL
-#if (defined(SVR4) || defined(SYSV)) && !defined(__GNUC__)
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/* <limits.h> stuff */
-#define x_BITSPERBYTE 8
-#define x_BITS(type) (x_BITSPERBYTE * (int)sizeof(type))
-#define x_SHORTBITS x_BITS(short)
-#define x_INTBITS x_BITS(int)
-#define x_LONGBITS x_BITS(long)
-#ifndef SHRT_MIN
-#define SHRT_MIN ((short)(1 << (x_SHORTBITS - 1)))
-#endif
-
-#ifndef FONTMODULE
-#include "misc.h"
-#endif
-#include "xf86_libc.h"
-#ifndef SHRT_MAX
-#define SHRT_MAX ((short)~SHRT_MIN)
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX ((unsigned short)~0)
-#endif
-#ifndef MINSHORT
-#define MINSHORT SHRT_MIN
-#endif
-#ifndef MAXSHORT
-#define MAXSHORT SHRT_MAX
-#endif
-#ifndef INT_MIN
-#define INT_MIN (1 << (x_INTBITS - 1))
-#endif
-#ifndef INT_MAX
-#define INT_MAX (~INT_MIN)
-#endif
-#ifndef UINT_MAX
-#define UINT_MAX (~0)
-#endif
-#ifndef MININT
-#define MININT INT_MIN
-#endif
-#ifndef MAXINT
-#define MAXINT INT_MAX
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN ((long)(1 << (x_LONGBITS - 1)))
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX ((long)~LONG_MIN)
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX ((unsigned long)~0UL)
-#endif
-#ifndef MINLONG
-#define MINLONG LONG_MIN
-#endif
-#ifndef MAXLONG
-#define MAXLONG LONG_MAX
-#endif
-
-/*
- * ANSI C compilers only.
- */
-
-/* ANSI C emulation library */
-
-extern void xf86abort(void);
-extern int xf86abs(int);
-extern double xf86acos(double);
-extern double xf86asin(double);
-extern double xf86atan(double);
-extern double xf86atan2(double,double);
-extern double xf86atof(const char*);
-extern int xf86atoi(const char*);
-extern long xf86atol(const char*);
-extern void *xf86bsearch(const void *, const void *, xf86size_t, xf86size_t,
- int (*)(const void *, const void *));
-extern double xf86ceil(double);
-extern void* xf86calloc(xf86size_t,xf86size_t);
-extern void xf86clearerr(XF86FILE*);
-extern double xf86cos(double);
-extern void xf86exit(int);
-extern double xf86exp(double);
-extern double xf86fabs(double);
-extern int xf86fclose(XF86FILE*);
-extern int xf86feof(XF86FILE*);
-extern int xf86ferror(XF86FILE*);
-extern int xf86fflush(XF86FILE*);
-extern int xf86fgetc(XF86FILE*);
-extern int xf86getc(XF86FILE*);
-extern int xf86fgetpos(XF86FILE*,XF86fpos_t*);
-extern char* xf86fgets(char*,INT32,XF86FILE*);
-extern int xf86finite(double);
-extern double xf86floor(double);
-extern double xf86fmod(double,double);
-extern XF86FILE* xf86fopen(const char*,const char*);
-extern double xf86frexp(double, int*);
-extern int xf86printf(const char*,...);
-extern int xf86fprintf(XF86FILE*,const char*,...);
-extern int xf86fputc(int,XF86FILE*);
-extern int xf86fputs(const char*,XF86FILE*);
-extern xf86size_t xf86fread(void*,xf86size_t,xf86size_t,XF86FILE*);
-extern void xf86free(void*);
-extern XF86FILE* xf86freopen(const char*,const char*,XF86FILE*);
-#if defined(HAVE_VFSCANF) || !defined(NEED_XF86_PROTOTYPES)
-extern int xf86fscanf(XF86FILE*,const char*,...);
-#else
-extern int xf86fscanf(/*XF86FILE*,const char*,char *,char *,char *,char *,
- char *,char *,char *,char *,char *,char * */);
-#endif
-extern int xf86fseek(XF86FILE*,long,int);
-extern int xf86fsetpos(XF86FILE*,const XF86fpos_t*);
-extern long xf86ftell(XF86FILE*);
-extern xf86size_t xf86fwrite(const void*,xf86size_t,xf86size_t,XF86FILE*);
-extern char* xf86getenv(const char*);
-extern int xf86isalnum(int);
-extern int xf86isalpha(int);
-extern int xf86iscntrl(int);
-extern int xf86isdigit(int);
-extern int xf86isgraph(int);
-extern int xf86islower(int);
-extern int xf86isprint(int);
-extern int xf86ispunct(int);
-extern int xf86isspace(int);
-extern int xf86isupper(int);
-extern int xf86isxdigit(int);
-extern long xf86labs(long);
-extern double xf86ldexp(double,int);
-extern double xf86log(double);
-extern double xf86log10(double);
-extern void* xf86malloc(xf86size_t);
-extern void* xf86memchr(const void*,int,xf86size_t);
-extern int xf86memcmp(const void*,const void*,xf86size_t);
-extern void* xf86memcpy(void*,const void*,xf86size_t);
-extern void* xf86memmove(void*,const void*,xf86size_t);
-extern void* xf86memset(void*,int,xf86size_t);
-extern double xf86modf(double,double*);
-extern void xf86perror(const char*);
-extern double xf86pow(double,double);
-extern void xf86qsort(void*, xf86size_t, xf86size_t,
- int(*)(const void*, const void*));
-extern void* xf86realloc(void*,xf86size_t);
-extern long xf86random(void);
-extern int xf86remove(const char*);
-extern int xf86rename(const char*,const char*);
-extern void xf86rewind(XF86FILE*);
-extern int xf86setbuf(XF86FILE*,char*);
-extern int xf86setvbuf(XF86FILE*,char*,int,xf86size_t);
-extern double xf86sin(double);
-extern int xf86sprintf(char*,const char*,...);
-extern int xf86snprintf(char*,xf86size_t,const char*,...);
-extern double xf86sqrt(double);
-#if defined(HAVE_VSSCANF) || !defined(NEED_XF86_PROTOTYPES)
-extern int xf86sscanf(char*,const char*,...);
-#else
-extern int xf86sscanf(/*char*,const char*,char *,char *,char *,char *,
- char *,char *,char *,char *,char *,char * */);
-#endif
-extern char* xf86strcat(char*,const char*);
-extern char* xf86strchr(const char*, int c);
-extern int xf86strcmp(const char*,const char*);
-extern int xf86strcasecmp(const char*,const char*);
-extern char* xf86strcpy(char*,const char*);
-extern xf86size_t xf86strcspn(const char*,const char*);
-extern char* xf86strerror(int);
-extern xf86size_t xf86strlcat(char*,const char*,xf86size_t);
-extern xf86size_t xf86strlcpy(char*,const char*,xf86size_t);
-extern xf86size_t xf86strlen(const char*);
-extern char* xf86strncat(char *, const char *, xf86size_t);
-extern int xf86strncmp(const char*,const char*,xf86size_t);
-extern int xf86strncasecmp(const char*,const char*,xf86size_t);
-extern char* xf86strncpy(char*,const char*,xf86size_t);
-extern char* xf86strpbrk(const char*,const char*);
-extern char* xf86strrchr(const char*,int);
-extern xf86size_t xf86strspn(const char*,const char*);
-extern char* xf86strstr(const char*,const char*);
-extern double xf86strtod(const char*,char**);
-extern char* xf86strtok(char*,const char*);
-extern long xf86strtol(const char*,char**,int);
-extern unsigned long xf86strtoul(const char*,char**,int);
-extern double xf86tan(double);
-extern XF86FILE* xf86tmpfile(void);
-extern char* xf86tmpnam(char*);
-extern int xf86tolower(int);
-extern int xf86toupper(int);
-extern int xf86ungetc(int,XF86FILE*);
-extern int xf86vfprintf(XF86FILE*,const char*,va_list);
-extern int xf86vsprintf(char*,const char*,va_list);
-extern int xf86vsnprintf(char*,xf86size_t,const char*,va_list);
-
-extern int xf86open(const char*, int,...);
-extern int xf86close(int);
-extern long xf86lseek(int, long, int);
-extern int xf86ioctl(int, unsigned long, pointer);
-extern xf86ssize_t xf86read(int, void *, xf86size_t);
-extern xf86ssize_t xf86write(int, const void *, xf86size_t);
-extern void* xf86mmap(void*, xf86size_t, int, int, int, xf86size_t /* off_t */);
-extern int xf86munmap(void*, xf86size_t);
-extern int xf86stat(const char *, struct xf86stat *);
-extern int xf86fstat(int, struct xf86stat *);
-extern int xf86access(const char *, int);
-extern int xf86errno;
-extern int xf86GetErrno(void);
-
-extern double xf86HUGE_VAL;
-
-extern double xf86hypot(double,double);
-
-/* non-ANSI C functions */
-extern XF86DIR* xf86opendir(const char*);
-extern int xf86closedir(XF86DIR*);
-extern XF86DIRENT* xf86readdir(XF86DIR*);
-extern void xf86rewinddir(XF86DIR*);
-extern void xf86bcopy(const void*,void*,xf86size_t);
-extern int xf86ffs(int);
-extern char* xf86strdup(const char*);
-extern void xf86bzero(void*,unsigned int);
-extern int xf86execl(const char *, const char *, ...);
-extern long xf86fpossize(void);
-extern int xf86chmod(const char *, xf86mode_t);
-extern int xf86chown(const char *, xf86uid_t, xf86gid_t);
-extern xf86uid_t xf86geteuid(void);
-extern xf86gid_t xf86getegid(void);
-extern int xf86getpid(void);
-extern int xf86mknod(const char *, xf86mode_t, xf86dev_t);
-extern int xf86mkdir(const char *, xf86mode_t);
-unsigned int xf86sleep(unsigned int seconds);
-/* sysv IPC */
-extern int xf86shmget(xf86key_t key, int size, int xf86shmflg);
-extern char * xf86shmat(int id, char *addr, int xf86shmflg);
-extern int xf86shmdt(char *addr);
-extern int xf86shmctl(int id, int xf86cmd, pointer buf);
-
-extern int xf86setjmp(xf86jmp_buf env);
-extern int xf86setjmp0(xf86jmp_buf env);
-extern int xf86setjmp1(xf86jmp_buf env, int);
-extern int xf86setjmp1_arg2(void);
-extern int xf86setjmperror(xf86jmp_buf env);
-extern int xf86getjmptype(void);
-extern void xf86longjmp(xf86jmp_buf env, int val);
-#define xf86setjmp_macro(env) \
- (xf86getjmptype() == 0 ? xf86setjmp0((env)) : \
- (xf86getjmptype() == 1 ? xf86setjmp1((env), xf86setjmp1_arg2()) : \
- xf86setjmperror((env))))
-
-/*
- * These things are always required by drivers (but not by libc_wrapper.c),
- * even for a static server because some OSs don't provide them.
- */
-
-extern int xf86getpagesize(void);
-extern void xf86usleep(unsigned long);
-extern void xf86getsecs(long *, long *);
-#ifndef DONT_DEFINE_WRAPPERS
-#undef getpagesize
-#define getpagesize() xf86getpagesize()
-#undef usleep
-#define usleep(ul) xf86usleep(ul)
-#undef getsecs
-#define getsecs(a, b) xf86getsecs(a, b)
-#endif
-#endif /* _XF86_ANSIC_H */
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
deleted file mode 100644
index 199fcd6b9..000000000
--- a/hw/xfree86/os-support/xf86_libc.h
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * This file is an attempt to make developing code for the new loadable module
- * architecure simpler. It tries to use macros to hide all libc wrappers so
- * that all that is needed to "port" a module to this architecture is to
- * include this one header file
- *
- * Revision history:
- *
- *
- * 0.4 Apr 12 1997 add the ANSI defines
- * 0.3 Feb 24 1997 handle getenv
- * 0.2 Feb 24 1997 hide few FILE functions
- * 0.1 Feb 24 1997 hide the trivial functions mem* str*
- */
-
-#ifndef XF86_LIBC_H
-#define XF86_LIBC_H 1
-
-#include <X11/Xfuncs.h>
-#include <stddef.h>
-
-/*
- * The first set of definitions are required both for modules and
- * libc_wrapper.c.
- */
-
-/*
- * First, the new data types
- *
- * note: if some pointer is declared "opaque" here, pass it between
- * xf86* functions only, and don't rely on it having a whatever internal
- * structure, even if some source file might reveal the existence of
- * such a structure.
- */
-typedef void XF86FILE; /* opaque FILE replacement */
-extern XF86FILE* xf86stdin;
-extern XF86FILE* xf86stdout;
-extern XF86FILE* xf86stderr;
-
-typedef void XF86fpos_t; /* opaque fpos_t replacement */
-
-#define _XF86NAMELEN 263 /* enough for a larger filename */
- /* (divisble by 8) */
-typedef void XF86DIR; /* opaque DIR replacement */
-
-/* Note: the following is POSIX! POSIX only requires the d_name member.
- * Normal Unix has often a number of other members, but don't rely on that
- */
-struct _xf86dirent { /* types in struct dirent/direct: */
- char d_name[_XF86NAMELEN+1]; /* char [MAXNAMLEN]; might be smaller or unaligned */
-};
-typedef struct _xf86dirent XF86DIRENT;
-
-typedef unsigned long xf86size_t;
-typedef signed long xf86ssize_t;
-typedef unsigned long xf86dev_t;
-typedef unsigned int xf86mode_t;
-typedef unsigned int xf86uid_t;
-typedef unsigned int xf86gid_t;
-
-struct xf86stat {
- xf86dev_t st_rdev; /* This is incomplete, and makes assumptions */
-};
-
-/* sysv IPC */
-typedef int xf86key_t;
-
-/* setjmp/longjmp */
-#if defined(__ia64__)
-typedef int xf86jmp_buf[1024] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-#else
-typedef int xf86jmp_buf[1024];
-#endif
-
-/* for setvbuf */
-#define XF86_IONBF 1
-#define XF86_IOFBF 2
-#define XF86_IOLBF 3
-
-/* for open (XXX not complete) */
-#define XF86_O_RDONLY 0x0000
-#define XF86_O_WRONLY 0x0001
-#define XF86_O_RDWR 0x0002
-#define XF86_O_CREAT 0x0200
-
-/* for mmap */
-#define XF86_PROT_EXEC 0x0001
-#define XF86_PROT_READ 0x0002
-#define XF86_PROT_WRITE 0x0004
-#define XF86_PROT_NONE 0x0008
-#define XF86_MAP_FIXED 0x0001
-#define XF86_MAP_SHARED 0x0002
-#define XF86_MAP_PRIVATE 0x0004
-#define XF86_MAP_32BIT 0x0040
-#define XF86_MAP_FAILED ((void *)-1)
-
-/* for fseek */
-#define XF86_SEEK_SET 0
-#define XF86_SEEK_CUR 1
-#define XF86_SEEK_END 2
-
-/* for access */
-#define XF86_R_OK 0
-#define XF86_W_OK 1
-#define XF86_X_OK 2
-#define XF86_F_OK 3
-
-/* for chmod */
-#define XF86_S_ISUID 04000 /* set user ID on execution */
-#define XF86_S_ISGID 02000 /* set group ID on execution */
-#define XF86_S_ISVTX 01000 /* sticky bit */
-#define XF86_S_IRUSR 00400 /* read by owner */
-#define XF86_S_IWUSR 00200 /* write by owner */
-#define XF86_S_IXUSR 00100 /* execute/search by owner */
-#define XF86_S_IRGRP 00040 /* read by group */
-#define XF86_S_IWGRP 00020 /* write by group */
-#define XF86_S_IXGRP 00010 /* execute/search by group */
-#define XF86_S_IROTH 00004 /* read by others */
-#define XF86_S_IWOTH 00002 /* write by others */
-#define XF86_S_IXOTH 00001 /* execute/search by others */
-
-/* for mknod */
-#define XF86_S_IFREG 0010000
-#define XF86_S_IFCHR 0020000
-#define XF86_S_IFBLK 0040000
-#define XF86_S_IFIFO 0100000
-
-/*
- * errno values
- * They start at 1000 just so they don't match real errnos at all
- */
-#define xf86_UNKNOWN 1000
-#define xf86_EACCES 1001
-#define xf86_EAGAIN 1002
-#define xf86_EBADF 1003
-#define xf86_EEXIST 1004
-#define xf86_EFAULT 1005
-#define xf86_EINTR 1006
-#define xf86_EINVAL 1007
-#define xf86_EISDIR 1008
-#define xf86_ELOOP 1009
-#define xf86_EMFILE 1010
-#define xf86_ENAMETOOLONG 1011
-#define xf86_ENFILE 1012
-#define xf86_ENOENT 1013
-#define xf86_ENOMEM 1014
-#define xf86_ENOSPC 1015
-#define xf86_ENOTDIR 1016
-#define xf86_EPIPE 1017
-#define xf86_EROFS 1018
-#define xf86_ETXTBSY 1019
-#define xf86_ENOTTY 1020
-#define xf86_ENOSYS 1021
-#define xf86_EBUSY 1022
-#define xf86_ENODEV 1023
-#define xf86_EIO 1024
-
-#define xf86_ESRCH 1025
-#define xf86_ENXIO 1026
-#define xf86_E2BIG 1027
-#define xf86_ENOEXEC 1028
-#define xf86_ECHILD 1029
-#define xf86_ENOTBLK 1030
-#define xf86_EXDEV 1031
-#define xf86_EFBIG 1032
-#define xf86_ESPIPE 1033
-#define xf86_EMLINK 1034
-#define xf86_EDOM 1035
-#define xf86_ERANGE 1036
-
-
-/* sysv IPV */
-/* xf86shmget() */
-#define XF86IPC_CREAT 01000
-#define XF86IPC_EXCL 02000
-#define XF86IPC_NOWAIT 04000
-#define XF86SHM_R 0400
-#define XF86SHM_W 0200
-#define XF86IPC_PRIVATE ((xf86key_t)0)
-/* xf86shmat() */
-#define XF86SHM_RDONLY 010000 /* attach read-only else read-write */
-#define XF86SHM_RND 020000 /* round attach address to SHMLBA */
-#define XF86SHM_REMAP 040000 /* take-over region on attach */
-/* xf86shmclt() */
-#define XF86IPC_RMID 0
-
-/*
- * the rest of this file should only be included for code that is supposed
- * to go into modules
- */
-
-#if !defined(DONT_DEFINE_WRAPPERS)
-
-#undef abort
-#define abort() xf86abort()
-#undef abs
-#define abs(i) xf86abs(i)
-#undef acos
-#define acos(d) xf86acos(d)
-#undef asin
-#define asin(d) xf86asin(d)
-#undef atan
-#define atan(d) xf86atan(d)
-#undef atan2
-#define atan2(d1,d2) xf86atan2(d1,d2)
-#undef atof
-#define atof(ccp) xf86atof(ccp)
-#undef atoi
-#define atoi(ccp) xf86atoi(ccp)
-#undef atol
-#define atol(ccp) xf86atol(ccp)
-#undef bsearch
-#define bsearch(a,b,c,d,e) xf86bsearch(a,b,c,d,e)
-#undef ceil
-#define ceil(d) xf86ceil(d)
-#undef calloc
-#define calloc(I1,I2) xf86calloc(I1,I2)
-#undef clearerr
-#define clearerr(FP) xf86clearerr(FP)
-#undef cos
-#define cos(d) xf86cos(d)
-#undef exit
-#define exit(i) xf86exit(i)
-#undef exp
-#define exp(d) xf86exp(d)
-#undef fabs
-#define fabs(d) xf86fabs(d)
-#undef fclose
-#define fclose(FP) xf86fclose(FP)
-#undef feof
-#define feof(FP) xf86feof(FP)
-#undef ferror
-#define ferror(FP) xf86ferror(FP)
-#undef fflush
-#define fflush(FP) xf86fflush(FP)
-#undef fgetc
-#define fgetc(FP) xf86fgetc(FP)
-#undef getc
-#define getc(FP) xf86getc(FP)
-#undef fgetpos
-#define fgetpos(FP,fpp) xf86fgetpos(FP,fpp)
-#undef fgets
-#define fgets(cp,i,FP) xf86fgets(cp,i,FP)
-#undef finite
-#define finite(d) xf86finite(d)
-#undef floor
-#define floor(d) xf86floor(d)
-#undef fmod
-#define fmod(d1,d2) xf86fmod(d1,d2)
-#undef fopen
-#define fopen(ccp1,ccp2) xf86fopen(ccp1,ccp2)
-#undef printf
-#define printf xf86printf
-#undef fprintf
-#define fprintf xf86fprintf
-#undef fputc
-#define fputc(i,FP) xf86fputc(i,FP)
-#undef fputs
-#define fputs(ccp,FP) xf86fputs(ccp,FP)
-#undef fread
-#define fread(vp,I1,I2,FP) xf86fread(vp,I1,I2,FP)
-#undef free
-#define free(vp) xf86free(vp)
-#undef freopen
-#define freopen(ccp1,ccp2,FP) xf86freopen(ccp1,ccp2,FP)
-#undef frexp
-#define frexp(x,exp) xf86frexp(x,exp)
-#undef fscanf
-#define fscanf xf86fscanf
-#undef fseek
-#define fseek(FP,l,i) xf86fseek(FP,l,i)
-#undef fsetpos
-#define fsetpos(FP,cfpp) xf86fsetpos(FP,cfpp)
-#undef ftell
-#define ftell(FP) xf86ftell(FP)
-#undef fwrite
-#define fwrite(cvp,I1,I2,FP) xf86fwrite(cvp,I1,I2,FP)
-#undef getenv
-#define getenv(ccp) xf86getenv(ccp)
-#undef isalnum
-#define isalnum(i) xf86isalnum(i)
-#undef isalpha
-#define isalpha(i) xf86isalpha(i)
-#undef iscntrl
-#define iscntrl(i) xf86iscntrl(i)
-#undef isdigit
-#define isdigit(i) xf86isdigit(i)
-#undef isgraph
-#define isgraph(i) xf86isgraph(i)
-#undef islower
-#define islower(i) xf86islower(i)
-#undef isprint
-#define isprint(i) xf86isprint(i)
-#undef ispunct
-#define ispunct(i) xf86ispunct(i)
-#undef isspace
-#define isspace(i) xf86isspace(i)
-#undef isupper
-#define isupper(i) xf86isupper(i)
-#undef isxdigit
-#define isxdigit(i) xf86isxdigit(i)
-#undef labs
-#define labs(l) xf86labs(l)
-#undef ldexp
-#define ldexp(x, exp) xf86ldexp(x, exp)
-#undef log
-#define log(d) xf86log(d)
-#undef log10
-#define log10(d) xf86log10(d)
-#undef malloc
-#define malloc(I) xf86malloc(I)
-#undef memchr
-#define memchr(cvp,i,I) xf86memchr(cvp,i,I)
-#undef memcmp
-#define memcmp(cvp1,cvp2,I) xf86memcmp(cvp1,cvp2,I)
-#undef memcpy
-#define memcpy(vp,cvp,I) xf86memcpy(vp,cvp,I)
-#undef memmove
-#define memmove(vp,cvp,I) xf86memmove(vp,cvp,I)
-#undef memset
-#define memset(vp,int,I) xf86memset(vp,int,I)
-#undef modf
-#define modf(d,dp) xf86modf(d,dp)
-#undef perror
-#define perror(ccp) xf86perror(ccp)
-#undef pow
-#define pow(d1,d2) xf86pow(d1,d2)
-#undef random
-#define random() xf86random()
-#undef realloc
-#define realloc(vp,I) xf86realloc(vp,I)
-#undef remove
-#define remove(ccp) xf86remove(ccp)
-#undef rename
-#define rename(ccp1,ccp2) xf86rename(ccp1,ccp2)
-#undef rewind
-#define rewind(FP) xf86rewind(FP)
-#undef setbuf
-#define setbuf(FP,cp) xf86setbuf(FP,cp)
-#undef setvbuf
-#define setvbuf(FP,cp,i,I) xf86setvbuf(FP,cp,i,I)
-#undef sin
-#define sin(d) xf86sin(d)
-#undef snprintf
-#define snprintf xf86snprintf
-#undef sprintf
-#define sprintf xf86sprintf
-#undef sqrt
-#define sqrt(d) xf86sqrt(d)
-#undef sscanf
-#define sscanf xf86sscanf
-#undef strcat
-#define strcat(cp,ccp) xf86strcat(cp,ccp)
-#undef strcmp
-#define strcmp(ccp1,ccp2) xf86strcmp(ccp1,ccp2)
-#undef strcasecmp
-#define strcasecmp(ccp1,ccp2) xf86strcasecmp(ccp1,ccp2)
-#undef strcpy
-#define strcpy(cp,ccp) xf86strcpy(cp,ccp)
-#undef strcspn
-#define strcspn(ccp1,ccp2) xf86strcspn(ccp1,ccp2)
-#undef strerror
-#define strerror(i) xf86strerror(i)
-#undef strlcat
-#define strlcat(cp,ccp,I) xf86strlcat(cp,ccp,I)
-#undef strlcpy
-#define strlcpy(cp,ccp,I) xf86strlcpy(cp,ccp,I)
-#undef strlen
-#define strlen(ccp) xf86strlen(ccp)
-#undef strncmp
-#define strncmp(ccp1,ccp2,I) xf86strncmp(ccp1,ccp2,I)
-#undef strncasecmp
-#define strncasecmp(ccp1,ccp2,I) xf86strncasecmp(ccp1,ccp2,I)
-#undef strncpy
-#define strncpy(cp,ccp,I) xf86strncpy(cp,ccp,I)
-#undef strpbrk
-#define strpbrk(ccp1,ccp2) xf86strpbrk(ccp1,ccp2)
-#undef strchr
-#define strchr(ccp,i) xf86strchr(ccp,i)
-#undef strrchr
-#define strrchr(ccp,i) xf86strrchr(ccp,i)
-#undef strspn
-#define strspn(ccp1,ccp2) xf86strspn(ccp1,ccp2)
-#undef strstr
-#define strstr(ccp1,ccp2) xf86strstr(ccp1,ccp2)
-#undef srttod
-#define strtod(ccp,cpp) xf86strtod(ccp,cpp)
-#undef strtok
-#define strtok(cp,ccp) xf86strtok(cp,ccp)
-#undef strtol
-#define strtol(ccp,cpp,i) xf86strtol(ccp,cpp,i)
-#undef strtoul
-#define strtoul(ccp,cpp,i) xf86strtoul(ccp,cpp,i)
-#undef tan
-#define tan(d) xf86tan(d)
-#undef tmpfile
-#define tmpfile() xf86tmpfile()
-#undef tolower
-#define tolower(i) xf86tolower(i)
-#undef toupper
-#define toupper(i) xf86toupper(i)
-#undef ungetc
-#define ungetc(i,FP) xf86ungetc(i,FP)
-#undef vfprintf
-#define vfprintf(p,f,a) xf86vfprintf(p,f,a)
-#undef vsnprintf
-#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a)
-#undef vsprintf
-#define vsprintf(s,f,a) xf86vsprintf(s,f,a)
-/* XXX Disable assert as if NDEBUG was defined */
-/* Some X headers defined this away too */
-#undef assert
-#define assert(a) ((void)0)
-#undef HUGE_VAL
-#define HUGE_VAL xf86HUGE_VAL
-
-#undef hypot
-#define hypot(x,y) xf86hypot(x,y)
-
-#undef qsort
-#define qsort(b, n, s, f) xf86qsort(b, n, s, f)
-
-/* non-ANSI C functions */
-#undef opendir
-#define opendir(cp) xf86opendir(cp)
-#undef closedir
-#define closedir(DP) xf86closedir(DP)
-#undef readdir
-#define readdir(DP) xf86readdir(DP)
-#undef rewinddir
-#define rewinddir(DP) xf86rewinddir(DP)
-#undef bcopy
-#define bcopy(vp,cvp,I) xf86memmove(cvp,vp,I)
-#undef ffs
-#define ffs(i) xf86ffs(i)
-#undef strdup
-#define strdup(ccp) xf86strdup(ccp)
-#undef bzero
-#define bzero(vp,ui) xf86bzero(vp,ui)
-#undef execl
-#define execl xf86execl
-#undef chmod
-#define chmod(a,b) xf86chmod(a,b)
-#undef chown
-#define chown(a,b,c) xf86chown(a,b,c)
-#undef geteuid
-#define geteuid xf86geteuid
-#undef getegid
-#define getegid xf86getegid
-#undef getpid
-#define getpid xf86getpid
-#undef mknod
-#define mknod(a,b,c) xf86mknod(a,b,c)
-#undef sleep
-#define sleep(a) xf86sleep(a)
-#undef mkdir
-#define mkdir(a,b) xf86mkdir(a,b)
-#undef getpagesize
-#define getpagesize xf86getpagesize
-#undef shmget
-#define shmget(a,b,c) xf86shmget(a,b,c)
-#undef shmat
-#define shmat(a,b,c) xf86shmat(a,b,c)
-#undef shmdt
-#define shmdt(a) xf86shmdt(a)
-#undef shmctl
-#define shmctl(a,b,c) xf86shmctl(a,b,c)
-
-#undef S_ISUID
-#define S_ISUID XF86_S_ISUID
-#undef S_ISGID
-#define S_ISGID XF86_S_ISGID
-#undef S_ISVTX
-#define S_ISVTX XF86_S_ISVTX
-#undef S_IRUSR
-#define S_IRUSR XF86_S_IRUSR
-#undef S_IWUSR
-#define S_IWUSR XF86_S_IWUSR
-#undef S_IXUSR
-#define S_IXUSR XF86_S_IXUSR
-#undef S_IRGRP
-#define S_IRGRP XF86_S_IRGRP
-#undef S_IWGRP
-#define S_IWGRP XF86_S_IWGRP
-#undef S_IXGRP
-#define S_IXGRP XF86_S_IXGRP
-#undef S_IROTH
-#define S_IROTH XF86_S_IROTH
-#undef S_IWOTH
-#define S_IWOTH XF86_S_IWOTH
-#undef S_IXOTH
-#define S_IXOTH XF86_S_IXOTH
-#undef S_IFREG
-#define S_IFREG XF86_S_IFREG
-#undef S_IFCHR
-#define S_IFCHR XF86_S_IFCHR
-#undef S_IFBLK
-#define S_IFBLK XF86_S_IFBLK
-#undef S_IFIFO
-#define S_IFIFO XF86_S_IFIFO
-
-/* some types */
-#undef FILE
-#define FILE XF86FILE
-#undef fpos_t
-#define fpos_t XF86fpos_t
-#undef DIR
-#define DIR XF86DIR
-#undef DIRENT
-#define DIRENT XF86DIRENT
-#undef size_t
-#define size_t xf86size_t
-#undef ssize_t
-#define ssize_t xf86ssize_t
-#undef dev_t
-#define dev_t xf86dev_t
-#undef mode_t
-#define mode_t xf86mode_t
-#undef uid_t
-#define uid_t xf86uid_t
-#undef gid_t
-#define gid_t xf86gid_t
-#undef stat_t
-#define stat_t struct xf86stat
-
-#undef ulong
-#define ulong unsigned long
-
-/*
- * There should be no need to #undef any of these. If they are already
- * defined it is because some illegal header has been included.
- */
-
-/* some vars */
-#undef stdin
-#define stdin xf86stdin
-#undef stdout
-#define stdout xf86stdout
-#undef stderr
-#define stderr xf86stderr
-
-#undef SEEK_SET
-#define SEEK_SET XF86_SEEK_SET
-#undef SEEK_CUR
-#define SEEK_CUR XF86_SEEK_CUR
-#undef SEEK_END
-#define SEEK_END XF86_SEEK_END
-
-/*
- * XXX Basic I/O functions BAD,BAD,BAD!
- */
-#define open xf86open
-#define close(a) xf86close(a)
-#define lseek(a,b,c) xf86lseek(a,b,c)
-#if !defined(__DragonFly__)
-#define ioctl(a,b,c) xf86ioctl(a,b,c)
-#endif
-#define read(a,b,c) xf86read(a,b,c)
-#define write(a,b,c) xf86write(a,b,c)
-#define mmap(a,b,c,d,e,f) xf86mmap(a,b,c,d,e,f)
-#define munmap(a,b) xf86munmap(a,b)
-#define stat(a,b) xf86stat(a,b)
-#define fstat(a,b) xf86fstat(a,b)
-#define access(a,b) xf86access(a,b)
-#undef O_RDONLY
-#define O_RDONLY XF86_O_RDONLY
-#undef O_WRONLY
-#define O_WRONLY XF86_O_WRONLY
-#undef O_RDWR
-#define O_RDWR XF86_O_RDWR
-#undef O_CREAT
-#define O_CREAT XF86_O_CREAT
-#undef PROT_EXEC
-#define PROT_EXEC XF86_PROT_EXEC
-#undef PROT_READ
-#define PROT_READ XF86_PROT_READ
-#undef PROT_WRITE
-#define PROT_WRITE XF86_PROT_WRITE
-#undef PROT_NONE
-#define PROT_NONE XF86_PROT_NONE
-#undef MAP_FIXED
-#define MAP_FIXED XF86_MAP_FIXED
-#undef MAP_SHARED
-#define MAP_SHARED XF86_MAP_SHARED
-#undef MAP_PRIVATE
-#define MAP_PRIVATE XF86_MAP_PRIVATE
-#undef MAP_FAILED
-#define MAP_FAILED XF86_MAP_FAILED
-#undef R_OK
-#define R_OK XF86_R_OK
-#undef W_OK
-#define W_OK XF86_W_OK
-#undef X_OK
-#define X_OK XF86_X_OK
-#undef F_OK
-#define F_OK XF86_F_OK
-#undef errno
-#define errno xf86errno
-#undef putchar
-#define putchar(i) xf86fputc(i, xf86stdout)
-#undef puts
-#define puts(s) xf86fputs(s, xf86stdout)
-
-#undef EACCES
-#define EACCES xf86_EACCES
-#undef EAGAIN
-#define EAGAIN xf86_EAGAIN
-#undef EBADF
-#define EBADF xf86_EBADF
-#undef EEXIST
-#define EEXIST xf86_EEXIST
-#undef EFAULT
-#define EFAULT xf86_EFAULT
-#undef EINTR
-#define EINTR xf86_EINTR
-#undef EINVAL
-#define EINVAL xf86_EINVAL
-#undef EISDIR
-#define EISDIR xf86_EISDIR
-#undef ELOOP
-#define ELOOP xf86_ELOOP
-#undef EMFILE
-#define EMFILE xf86_EMFILE
-#undef ENAMETOOLONG
-#define ENAMETOOLONG xf86_ENAMETOOLONG
-#undef ENFILE
-#define ENFILE xf86_ENFILE
-#undef ENOENT
-#define ENOENT xf86_ENOENT
-#undef ENOMEM
-#define ENOMEM xf86_ENOMEM
-#undef ENOSPC
-#define ENOSPC xf86_ENOSPC
-#undef ENOTDIR
-#define ENOTDIR xf86_ENOTDIR
-#undef EPIPE
-#define EPIPE xf86_EPIPE
-#undef EROFS
-#define EROFS xf86_EROFS
-#undef ETXTBSY
-#define ETXTBSY xf86_ETXTBSY
-#undef ENOTTY
-#define ENOTTY xf86_ENOTTY
-#undef ENOSYS
-#define ENOSYS xf86_ENOSYS
-#undef EBUSY
-#define EBUSY xf86_EBUSY
-#undef ENODEV
-#define ENODEV xf86_ENODEV
-#undef EIO
-#define EIO xf86_EIO
-
-/* IPC stuff */
-#undef SHM_RDONLY
-#define SHM_RDONLY XF86SHM_RDONLY
-#undef SHM_RND
-#define SHM_RND XF86SHM_RND
-#undef SHM_REMAP
-#define SHM_REMAP XF86SHM_REMAP
-#undef IPC_RMID
-#define IPC_RMID XF86IPC_RMID
-#undef IPC_CREAT
-#define IPC_CREAT XF86IPC_CREAT
-#undef IPC_EXCL
-#define IPC_EXCL XF86IPC_EXCL
-#undef PC_NOWAIT
-#define IPC_NOWAIT XF86IPC_NOWAIT
-#undef SHM_R
-#define SHM_R XF86SHM_R
-#undef SHM_W
-#define SHM_W XF86SHM_W
-#undef IPC_PRIVATE
-#define IPC_PRIVATE XF86IPC_PRIVATE
-
-/* Some ANSI macros */
-#undef FILENAME_MAX
-#define FILENAME_MAX 1024
-
-#if (defined(sun) && defined(__SVR4))
-# define _FILEDEFED /* Already have FILE defined, don't redefine it */
-#endif
-
-#endif /* !DONT_DEFINE_WRAPPERS */
-
-#if (!defined(DONT_DEFINE_WRAPPERS) || defined(DEFINE_SETJMP_WRAPPERS))
-#undef setjmp
-#define setjmp(a) xf86setjmp_macro(a)
-#undef longjmp
-#define longjmp(a,b) xf86longjmp(a,b)
-#undef jmp_buf
-#define jmp_buf xf86jmp_buf
-#endif
-
-#endif /* XF86_LIBC_H */
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 730ea0cab..19b9d1477 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -63,6 +63,7 @@
#include "xf86tokens.h"
#include "Configint.h"
#include <math.h>
+#include <X11/Xfuncproto.h>
extern LexRec val;
@@ -330,7 +331,7 @@ xf86findOption (XF86OptionPtr list, const char *name)
* returned. If the option is not found, a NULL is returned.
*/
-__attribute__((visibility("default"))) char *
+_X_EXPORT char *
xf86findOptionValue (XF86OptionPtr list, const char *name)
{
XF86OptionPtr p = xf86findOption (list, name);
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index 4524f17f6..ad08c1382 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -214,6 +214,7 @@ static xf86ConfigSymTabRec ScreenTab[] =
{DEFAULTDEPTH, "defaultdepth"},
{DEFAULTBPP, "defaultbpp"},
{DEFAULTFBBPP, "defaultfbbpp"},
+ {VIRTUAL, "virtual"},
{OPTION, "option"},
{-1, ""},
};
@@ -299,6 +300,14 @@ xf86parseScreenSection (void)
}
}
break;
+ case VIRTUAL:
+ if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER)
+ Error (VIRTUAL_MSG, NULL);
+ ptr->scrn_virtualX = val.num;
+ if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER)
+ Error (VIRTUAL_MSG, NULL);
+ ptr->scrn_virtualY = val.num;
+ break;
case OPTION:
ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst);
break;
@@ -364,6 +373,10 @@ xf86printScreenSection (FILE * cf, XF86ConfScreenPtr ptr)
{
fprintf (cf, "\tVideoAdaptor \"%s\"\n", aptr->al_adaptor_str);
}
+ if (ptr->scrn_virtualX && ptr->scrn_virtualY)
+ fprintf (cf, "\tVirtual %d %d\n",
+ ptr->scrn_virtualX,
+ ptr->scrn_virtualY);
for (dptr = ptr->scrn_display_lst; dptr; dptr = dptr->list.next)
{
fprintf (cf, "\tSubSection \"Display\"\n");
diff --git a/hw/xfree86/parser/cpconfig.c b/hw/xfree86/parser/cpconfig.c
index 46a5a8b56..0347f7d2a 100644
--- a/hw/xfree86/parser/cpconfig.c
+++ b/hw/xfree86/parser/cpconfig.c
@@ -62,7 +62,7 @@ xrealloc (void *p, int size)
#endif
#define CONFPATH "%A,%R,/etc/X11/%R,%P/etc/X11/%R,%E,%F,/etc/X11/%F," \
- "%P/etc/X11/%F,%D/%X,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \
+ "%P/etc/X11/%F,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \
"%P/etc/X11/%X,%P/lib/X11/%X.%H,%P/lib/X11/%X"
int
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index e7989d107..9706d483b 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -64,6 +64,7 @@
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
+#include <X11/Xfuncproto.h>
#if !defined(X_NOT_POSIX)
#if defined(_POSIX_SOURCE)
@@ -558,7 +559,6 @@ xf86pathIsSafe(const char *path)
* %E config file environment ($XORGCONFIG) as an absolute path
* %F config file environment ($XORGCONFIG) as a relative path
* %G config file environment ($XORGCONFIG) as a safe path
- * %D $HOME
* %P projroot
* %M major version number
* %% %
@@ -703,14 +703,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
} else
BAIL_OUT;
break;
- case 'D':
- if (!home)
- home = getenv("HOME");
- if (home && xf86pathIsAbsolute(home))
- APPEND_STR(home);
- else
- BAIL_OUT;
- break;
case 'P':
if (projroot && xf86pathIsAbsolute(projroot))
APPEND_STR(projroot);
@@ -948,7 +940,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab)
* Compare two names. The characters '_', ' ', and '\t' are ignored
* in the comparison.
*/
-__attribute__((visibility("default"))) int
+_X_EXPORT int
xf86nameCompare (const char *s1, const char *s2)
{
char c1, c2;
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index a078361d3..fd6cc530b 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -307,6 +307,7 @@ typedef struct
XF86ConfDisplayPtr scrn_display_lst;
XF86OptionPtr scrn_option_lst;
char *scrn_comment;
+ int scrn_virtualX, scrn_virtualY;
}
XF86ConfScreenRec, *XF86ConfScreenPtr;
diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c
index 24566ab2c..8215f9827 100644
--- a/hw/xfree86/rac/xf86RAC.c
+++ b/hw/xfree86/rac/xf86RAC.c
@@ -39,9 +39,8 @@
pScreen->x = y;}
#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x
-#define SCREEN_PROLOG(x) \
- pScreen->x = \
- ((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr)->x
+#define SCREEN_PROLOG(x) pScreen->x = ((RACScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->x
#define SCREEN_EPILOG(x,y) pScreen->x = y;
#define WRAP_PICT_COND(x,y,cond) if (ps)\
@@ -50,9 +49,8 @@
ps->x = y;}
#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;}
-#define PICTURE_PROLOGUE(field) \
- ps->field = \
- ((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr)->field
+#define PICTURE_PROLOGUE(field) ps->field = \
+ ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->field
#define PICTURE_EPILOGUE(field, wrap) \
ps->field = wrap
@@ -65,9 +63,9 @@
#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x
#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \
-(miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr;\
- RACScreenPtr pScreenPriv = \
-((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr);\
+ (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); \
+ RACScreenPtr pScreenPriv = \
+ ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey));\
PointPriv->spriteFuncs = pScreenPriv->miSprite;
#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\
PointPriv->spriteFuncs = &RACSpriteFuncs;
@@ -82,7 +80,7 @@
(x)->ops = &RACGCOps;\
(x)->funcs = &RACGCFuncs;
#define GC_UNWRAP(x)\
- RACGCPtr pGCPriv = (RACGCPtr) (x)->devPrivates[RACGCIndex].ptr;\
+ RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&(x)->devPrivates, RACGCKey);\
(x)->ops = pGCPriv->wrapOps;\
(x)->funcs = pGCPriv->wrapFuncs;
@@ -258,9 +256,8 @@ static miPointerSpriteFuncRec RACSpriteFuncs = {
RACSpriteMoveCursor
};
-static int RACScreenIndex = -1;
-static int RACGCIndex = -1;
-static unsigned long RACGeneration = 0;
+static DevPrivateKey RACScreenKey = &RACScreenKey;
+static DevPrivateKey RACGCKey = &RACGCKey;
Bool
@@ -274,24 +271,17 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag)
#endif
pScrn = xf86Screens[pScreen->myNum];
- PointPriv = (miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr;
-
+ PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miPointerScreenKey);
DPRINT_S("RACInit",pScreen->myNum);
- if (RACGeneration != serverGeneration) {
- if ( ((RACScreenIndex = AllocateScreenPrivateIndex()) < 0) ||
- ((RACGCIndex = AllocateGCPrivateIndex()) < 0))
- return FALSE;
-
- RACGeneration = serverGeneration;
- }
- if (!AllocateGCPrivate(pScreen, RACGCIndex, sizeof(RACGCRec)))
+ if (!dixRequestPrivate(RACGCKey, sizeof(RACGCRec)))
return FALSE;
if (!(pScreenPriv = xalloc(sizeof(RACScreenRec))))
return FALSE;
- pScreen->devPrivates[RACScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, RACScreenKey, pScreenPriv);
WRAP_SCREEN(CloseScreen, RACCloseScreen);
WRAP_SCREEN(SaveScreen, RACSaveScreen);
@@ -328,10 +318,10 @@ static Bool
RACCloseScreen (int i, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
- miPointerScreenPtr PointPriv
- = (miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
+ miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, miPointerScreenKey);
#ifdef RENDER
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
#endif
@@ -592,8 +582,8 @@ static void
RACAdjustFrame(int index, int x, int y, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
DPRINT_S("RACAdjustFrame",index);
xf86EnableAccess(xf86Screens[index]);
@@ -605,8 +595,8 @@ static Bool
RACSwitchMode(int index, DisplayModePtr mode, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
DPRINT_S("RACSwitchMode",index);
xf86EnableAccess(xf86Screens[index]);
@@ -618,8 +608,8 @@ static Bool
RACEnterVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
DPRINT_S("RACEnterVT",index);
xf86EnableAccess(xf86Screens[index]);
@@ -631,8 +621,8 @@ static void
RACLeaveVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
DPRINT_S("RACLeaveVT",index);
xf86EnableAccess(xf86Screens[index]);
@@ -644,8 +634,8 @@ static void
RACFreeScreen(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
- RACScreenPtr pScreenPriv =
- (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr;
+ RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, RACScreenKey);
DPRINT_S("RACFreeScreen",index);
xf86EnableAccess(xf86Screens[index]);
@@ -657,7 +647,7 @@ static Bool
RACCreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
- RACGCPtr pGCPriv = (RACGCPtr) (pGC)->devPrivates[RACGCIndex].ptr;
+ RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&pGC->devPrivates, RACGCKey);
Bool ret;
DPRINT_S("RACCreateGC",pScreen->myNum);
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index c968f185f..5c909c7c4 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -12,14 +12,13 @@
* MPX.
* inputInfo is needed to pass the core pointer as the default argument into
* the cursor functions.
- *
+ *
* Externing inputInfo is not the nice way to do it but it works.
*/
#include "inputstr.h"
extern InputInfo inputInfo;
-int xf86CursorScreenIndex = -1;
-static unsigned long xf86CursorGeneration = 0;
+DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey;
/* sprite functions */
@@ -58,12 +57,6 @@ xf86InitCursor(
xf86CursorScreenPtr ScreenPriv;
miPointerScreenPtr PointPriv;
- if (xf86CursorGeneration != serverGeneration) {
- if ((xf86CursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- xf86CursorGeneration = serverGeneration;
- }
-
if (!xf86InitHardwareCursor(pScreen, infoPtr))
return FALSE;
@@ -71,7 +64,7 @@ xf86InitCursor(
if (!ScreenPriv)
return FALSE;
- pScreen->devPrivates[xf86CursorScreenIndex].ptr = ScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, xf86CursorScreenKey, ScreenPriv);
ScreenPriv->SWCursor = TRUE;
ScreenPriv->isUp = FALSE;
@@ -94,7 +87,7 @@ xf86InitCursor(
ScreenPriv->PalettedCursor = TRUE;
}
- PointPriv = pScreen->devPrivates[miPointerScreenIndex].ptr;
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
ScreenPriv->showTransparent = PointPriv->showTransparent;
if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT)
@@ -123,10 +116,10 @@ static Bool
xf86CursorCloseScreen(int i, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- miPointerScreenPtr PointPriv =
- pScreen->devPrivates[miPointerScreenIndex].ptr;
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, miPointerScreenKey);
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (ScreenPriv->isUp && pScrn->vtSema)
xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
@@ -156,8 +149,8 @@ xf86CursorQueryBestSize(
unsigned short *height,
ScreenPtr pScreen)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (class == CursorShape) {
if(*width > ScreenPriv->CursorInfoPtr->MaxWidth)
@@ -171,8 +164,8 @@ xf86CursorQueryBestSize(
static void
xf86CursorInstallColormap(ColormapPtr pMap)
{
- xf86CursorScreenPtr ScreenPriv =
- pMap->pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pMap->pScreen->devPrivates, xf86CursorScreenKey);
ScreenPriv->pInstalledMap = pMap;
@@ -186,8 +179,8 @@ xf86CursorRecolorCursor(
CursorPtr pCurs,
Bool displayed)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (!displayed)
return;
@@ -208,8 +201,8 @@ xf86CursorEnableDisableFBAccess(
DeviceIntPtr pDev = inputInfo.pointer;
ScreenPtr pScreen = screenInfo.screens[index];
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (!enable && ScreenPriv->CurrentCursor != NullCursor) {
CursorPtr currentCursor = ScreenPriv->CurrentCursor;
@@ -240,10 +233,10 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags)
{
Bool ret;
ScreenPtr pScreen = screenInfo.screens[index];
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
- miPointerScreenPtr PointPriv =
- pScreen->devPrivates[miPointerScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
+ miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, miPointerScreenKey);
if (ScreenPriv->isUp) {
xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
@@ -268,11 +261,11 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags)
static Bool
xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (pCurs->refcnt <= 1)
- pCurs->devPriv[pScreen->myNum] = NULL;
+ dixSetPrivate(&pCurs->devPrivates, pScreen, NULL);
return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs);
}
@@ -281,12 +274,12 @@ static Bool
xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
CursorPtr pCurs)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (pCurs->refcnt <= 1) {
- xfree(pCurs->devPriv[pScreen->myNum]);
- pCurs->devPriv[pScreen->myNum] = NULL;
+ xfree(dixLookupPrivate(&pCurs->devPrivates, pScreen));
+ dixSetPrivate(&pCurs->devPrivates, pScreen, NULL);
}
return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs);
@@ -296,8 +289,8 @@ static void
xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
int x, int y)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
miPointerScreenPtr PointPriv;
@@ -324,8 +317,8 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
ScreenPriv->HotX = pCurs->bits->xhot;
ScreenPriv->HotY = pCurs->bits->yhot;
- PointPriv = pScreen->devPrivates[miPointerScreenIndex].ptr;
-
+ PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
+ miPointerScreenKey);
if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || ((
#ifdef ARGB_CURSOR
pCurs->bits->argb && infoPtr->UseHWCursorARGB &&
@@ -369,8 +362,8 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
static void
xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
ScreenPriv->x = x;
ScreenPriv->y = y;
@@ -388,9 +381,8 @@ void
xf86ForceHWCursor (ScreenPtr pScreen, Bool on)
{
DeviceIntPtr pDev = inputInfo.pointer;
-
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
if (on)
{
diff --git a/hw/xfree86/ramdac/xf86CursorPriv.h b/hw/xfree86/ramdac/xf86CursorPriv.h
index 472e2b06b..f82be2edc 100644
--- a/hw/xfree86/ramdac/xf86CursorPriv.h
+++ b/hw/xfree86/ramdac/xf86CursorPriv.h
@@ -45,6 +45,6 @@ Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
CARD32 xf86ReverseBitOrder(CARD32 data);
-extern int xf86CursorScreenIndex;
+extern DevPrivateKey xf86CursorScreenKey;
#endif /* _XF86CURSORPRIV_H */
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index 2dfc4b27b..4c5ef4039 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -117,8 +117,8 @@ xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr)
void
xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
unsigned char *bits;
@@ -127,7 +127,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
return;
}
- bits = pCurs->devPriv[pScreen->myNum];
+ bits = (unsigned char *)dixLookupPrivate(&pCurs->devPrivates, pScreen);
x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX;
y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY;
@@ -137,7 +137,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
#endif
if (!bits) {
bits = (*infoPtr->RealizeCursor)(infoPtr, pCurs);
- pCurs->devPriv[pScreen->myNum] = bits;
+ dixSetPrivate(&pCurs->devPrivates, pScreen, bits);
}
if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
@@ -161,8 +161,8 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
void
xf86SetTransparentCursor(ScreenPtr pScreen)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
if (!ScreenPriv->transparentData)
@@ -182,8 +182,8 @@ xf86SetTransparentCursor(ScreenPtr pScreen)
void
xf86MoveCursor(ScreenPtr pScreen, int x, int y)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX;
@@ -195,8 +195,8 @@ xf86MoveCursor(ScreenPtr pScreen, int x, int y)
void
xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed)
{
- xf86CursorScreenPtr ScreenPriv =
- pScreen->devPrivates[xf86CursorScreenIndex].ptr;
+ xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
+ &pScreen->devPrivates, xf86CursorScreenKey);
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
#ifdef ARGB_CURSOR
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 52fdcbef6..74beefb67 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -94,14 +94,13 @@ typedef struct {
} ShadowGCRec, *ShadowGCPtr;
-static int ShadowScreenIndex = -1;
-static int ShadowGCIndex = -1;
-static unsigned long ShadowGeneration = 0;
+static DevPrivateKey ShadowScreenKey = &ShadowScreenKey;
+static DevPrivateKey ShadowGCKey = &ShadowGCKey;
#define GET_SCREEN_PRIVATE(pScreen) \
- (ShadowScreenPtr)((pScreen)->devPrivates[ShadowScreenIndex].ptr)
+ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey)
#define GET_GC_PRIVATE(pGC) \
- (ShadowGCPtr)((pGC)->devPrivates[ShadowGCIndex].ptr)
+ (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey);
#define SHADOW_GC_FUNC_PROLOGUE(pGC)\
ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\
@@ -172,20 +171,13 @@ ShadowFBInit2 (
if(!preRefreshArea && !postRefreshArea) return FALSE;
- if (ShadowGeneration != serverGeneration) {
- if(((ShadowScreenIndex = AllocateScreenPrivateIndex ()) < 0) ||
- ((ShadowGCIndex = AllocateGCPrivateIndex()) < 0))
- return FALSE;
- ShadowGeneration = serverGeneration;
- }
-
- if(!AllocateGCPrivate(pScreen, ShadowGCIndex, sizeof(ShadowGCRec)))
+ if(!dixRequestPrivate(ShadowGCKey, sizeof(ShadowGCRec)))
return FALSE;
if(!(pPriv = (ShadowScreenPtr)xalloc(sizeof(ShadowScreenRec))))
return FALSE;
- pScreen->devPrivates[ShadowScreenIndex].ptr = (pointer)pPriv;
+ dixSetPrivate(&pScreen->devPrivates, ShadowScreenKey, pPriv);
pPriv->pScrn = pScrn;
pPriv->preRefresh = preRefreshArea;
diff --git a/hw/xfree86/utils/xorgcfg/Makefile.am b/hw/xfree86/utils/xorgcfg/Makefile.am
index e7113035f..31d1b3f00 100644
--- a/hw/xfree86/utils/xorgcfg/Makefile.am
+++ b/hw/xfree86/utils/xorgcfg/Makefile.am
@@ -42,7 +42,6 @@ xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libxf86config.a $(LOADERLIB) \
#if DoLoadableServer
LDSRCS = \
- $(top_srcdir)/hw/xfree86/os-support/shared/libc_wrapper.c \
loader.c loadmod.c
LOADERLIB = ../../loader/libloader.a
#endif
diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h
index b5baba465..ea12e8879 100644
--- a/hw/xfree86/utils/xorgcfg/config.h
+++ b/hw/xfree86/utils/xorgcfg/config.h
@@ -101,7 +101,6 @@ extern int config_mode;
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index efabc9d1f..30eb83182 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -631,7 +631,7 @@ mouse_configuration(void) {
config_emulate3buttons = 0;
printf("\n");
-#if (defined(sun) && (defined(__i386__) || defined(__x86)))
+#if (defined(sun) && (defined(__i386) || defined(__x86)))
/* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse,
but PS/2 mice default to /dev/kdmouse */
if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {
diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c
index 1a4732baa..63233e05d 100644
--- a/hw/xfree86/xaa/xaaDashLine.c
+++ b/hw/xfree86/xaa/xaaDashLine.c
@@ -35,7 +35,8 @@ XAAPolyLinesDashed(
#endif
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates,
+ XAAGetGCKey());
BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip);
int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip);
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c
index b3dc83ada..e6083d529 100644
--- a/hw/xfree86/xaa/xaaGC.c
+++ b/hw/xfree86/xaa/xaaGC.c
@@ -38,7 +38,8 @@ Bool
XAACreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates,
+ XAAGetGCKey());
Bool ret;
XAA_SCREEN_PROLOGUE(pScreen,CreateGC);
diff --git a/hw/xfree86/xaa/xaaGCmisc.c b/hw/xfree86/xaa/xaaGCmisc.c
index a7a3f4081..5823cc064 100644
--- a/hw/xfree86/xaa/xaaGCmisc.c
+++ b/hw/xfree86/xaa/xaaGCmisc.c
@@ -305,7 +305,8 @@ XAAValidatePolylines(
DrawablePtr pDraw )
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates,
+ XAAGetGCKey());
if(pGC->lineStyle == LineSolid) changes &= ~GCDashList;
if(!changes) return;
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 196569278..892cbcfc3 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -39,22 +39,20 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
static void XAAEnableDisableFBAccess (int index, Bool enable);
static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
-static int XAAScreenIndex = -1;
-static int XAAGCIndex = -1;
-static int XAAPixmapIndex = -1;
+static DevPrivateKey XAAScreenKey = &XAAScreenKey;
+static DevPrivateKey XAAGCKey = &XAAGCKey;
+static DevPrivateKey XAAPixmapKey = &XAAPixmapKey;
-static unsigned long XAAGeneration = 0;
-
-int XAAGetScreenIndex(void) {
- return XAAScreenIndex;
+DevPrivateKey XAAGetScreenKey(void) {
+ return XAAScreenKey;
}
-int XAAGetGCIndex(void) {
- return XAAGCIndex;
+DevPrivateKey XAAGetGCKey(void) {
+ return XAAGCKey;
}
-int XAAGetPixmapIndex(void) {
- return XAAPixmapIndex;
+DevPrivateKey XAAGetPixmapKey(void) {
+ return XAAPixmapKey;
}
/* temp kludge */
@@ -104,25 +102,16 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
if (!infoRec)
return TRUE;
- if (XAAGeneration != serverGeneration) {
- if ( ((XAAScreenIndex = AllocateScreenPrivateIndex()) < 0) ||
- ((XAAGCIndex = AllocateGCPrivateIndex()) < 0) ||
- ((XAAPixmapIndex = AllocatePixmapPrivateIndex()) < 0))
- return FALSE;
-
- XAAGeneration = serverGeneration;
- }
-
- if (!AllocateGCPrivate(pScreen, XAAGCIndex, sizeof(XAAGCRec)))
+ if (!dixRequestPrivate(XAAGCKey, sizeof(XAAGCRec)))
return FALSE;
- if (!AllocatePixmapPrivate(pScreen, XAAPixmapIndex, sizeof(XAAPixmapRec)))
+ if (!dixRequestPrivate(XAAPixmapKey, sizeof(XAAPixmapRec)))
return FALSE;
if (!(pScreenPriv = xalloc(sizeof(XAAScreenRec))))
return FALSE;
- pScreen->devPrivates[XAAScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv);
if(!xf86FBManagerRunning(pScreen))
infoRec->Flags &= ~(PIXMAP_CACHE | OFFSCREEN_PIXMAPS);
@@ -219,7 +208,7 @@ XAACloseScreen (int i, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
pScrn->EnterVT = pScreenPriv->EnterVT;
pScrn->LeaveVT = pScreenPriv->LeaveVT;
@@ -516,7 +505,7 @@ XAAEnterVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
return((*pScreenPriv->EnterVT)(index, flags));
}
@@ -526,7 +515,7 @@ XAALeaveVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
if(infoRec->NeedToSync) {
@@ -549,7 +538,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet)
ScreenPtr pScreen = screenInfo.screens[index];
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
int ret;
if (!num && infoRec->dgaSaves) { /* restore old pixmap cache state */
@@ -611,7 +600,7 @@ XAAEnableDisableFBAccess (int index, Bool enable)
ScreenPtr pScreen = screenInfo.screens[index];
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
+ (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
if(!enable) {
if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps))
diff --git a/hw/xfree86/xaa/xaaLineMisc.c b/hw/xfree86/xaa/xaaLineMisc.c
index 537b08b97..cefb59a8e 100644
--- a/hw/xfree86/xaa/xaaLineMisc.c
+++ b/hw/xfree86/xaa/xaaLineMisc.c
@@ -64,7 +64,8 @@ void
XAAComputeDash(GCPtr pGC)
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
- XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates,
+ XAAGetGCKey());
Bool EvenDash = (pGC->numInDashList & 0x01) ? FALSE : TRUE;
int PatternLength = 0;
unsigned char* DashPtr = (unsigned char*)pGC->dash;
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 47599d7d3..64ca998ee 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -151,11 +151,10 @@ typedef struct {
int (*TiledFillChooser)(GCPtr);
} XAAOverlayRec, *XAAOverlayPtr;
-static int XAAOverlayIndex = -1;
-static unsigned long XAAOverlayGeneration = 0;
+static DevPrivateKey XAAOverlayKey = &XAAOverlayKey;
#define GET_OVERLAY_PRIV(pScreen) \
- ((XAAOverlayPtr)((pScreen)->devPrivates[XAAOverlayIndex].ptr))
+ (XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey)
#define SWITCH_DEPTH(d) \
if(pOverPriv->currentDepth != d) { \
@@ -173,18 +172,10 @@ XAAInitDualFramebufferOverlay(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAAOverlayPtr pOverPriv;
- if (XAAOverlayGeneration != serverGeneration) {
- if((XAAOverlayIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
-
- XAAOverlayGeneration = serverGeneration;
- }
-
-
if(!(pOverPriv = xalloc(sizeof(XAAOverlayRec))))
return FALSE;
- pScreen->devPrivates[XAAOverlayIndex].ptr = (pointer)pOverPriv;
+ dixSetPrivate(&pScreen->devPrivates, XAAOverlayKey, pOverPriv);
pOverPriv->pScrn = pScrn;
pOverPriv->callback = callback;
diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c
index 02c556b33..443bda628 100644
--- a/hw/xfree86/xaa/xaaStateChange.c
+++ b/hw/xfree86/xaa/xaaStateChange.c
@@ -274,18 +274,17 @@ typedef struct _XAAStateWrapRec {
#endif
} XAAStateWrapRec, *XAAStateWrapPtr;
-static int XAAStateIndex = -1;
-static unsigned long XAAStateGeneration = 0;
+static DevPrivateKey XAAStateKey = &XAAStateKey;
/* Wrap functions start here */
#define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\
-(XAAStateWrapPtr)(pGC->pScreen->devPrivates[XAAStateIndex].ptr)
+(XAAStateWrapPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAStateKey)
#define GET_STATEPRIV_SCREEN(pScreen) XAAStateWrapPtr pStatePriv =\
-(XAAStateWrapPtr)(pScreen->devPrivates[XAAStateIndex].ptr)
+(XAAStateWrapPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAStateKey)
#define GET_STATEPRIV_PSCRN(pScrn) XAAStateWrapPtr pStatePriv =\
-(XAAStateWrapPtr)(pScrn->pScreen->devPrivates[XAAStateIndex].ptr)
+(XAAStateWrapPtr)dixLookupPrivate(&(pScrn)->pScreen->devPrivates, XAAStateKey)
#define STATE_CHECK_SP(pStatePriv) {\
ScrnInfoPtr pScrn = pStatePriv->pScrn;\
@@ -1504,12 +1503,8 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
XAAStateWrapPtr pStatePriv;
int i = 0;
- if (XAAStateGeneration != serverGeneration) {
- if((XAAStateIndex = AllocateScreenPrivateIndex()) < 0) return FALSE;
- XAAStateGeneration = serverGeneration;
- }
if(!(pStatePriv = xalloc(sizeof(XAAStateWrapRec)))) return FALSE;
- pScreen->devPrivates[XAAStateIndex].ptr = (pointer)pStatePriv;
+ dixSetPrivate(&pScreen->devPrivates, XAAStateKey, pStatePriv);
pStatePriv->RestoreAccelState = infoRec->RestoreAccelState;
pStatePriv->pScrn = pScrn;
diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c
index b0176f03f..5d6ea05cf 100644
--- a/hw/xfree86/xaa/xaaWrapper.c
+++ b/hw/xfree86/xaa/xaaWrapper.c
@@ -86,10 +86,8 @@ typedef struct {
int depth;
} xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr;
-#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr)( \
- (xaaWrapperScrPrivateIndex != -1) \
- ? (s)->devPrivates[xaaWrapperScrPrivateIndex].ptr\
- : NULL))
+#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr) \
+ dixLookupPrivate(&(s)->devPrivates, xaaWrapperScrPrivateKey))
#define xaaWrapperScrPriv(s) xaaWrapperScrPrivPtr pScrPriv = xaaWrapperGetScrPriv(s)
#define wrap(priv,real,mem,func) {\
@@ -127,13 +125,12 @@ typedef struct _xaaWrapperGCPriv {
} xaaWrapperGCPrivRec, *xaaWrapperGCPrivPtr;
#define xaaWrapperGetGCPriv(pGC) ((xaaWrapperGCPrivPtr) \
- (pGC)->devPrivates[xaaWrapperGCPrivateIndex].ptr)
+ dixLookupPrivate(&(pGC)->devPrivates, xaaWrapperGCPrivateKey))
#define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC)
-static int xaaWrapperScrPrivateIndex = -1;
-static int xaaWrapperGCPrivateIndex = -1;
-static int xaaWrapperGeneration = -1;
+static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKey;
+static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKey;
static Bool
xaaWrapperCreateScreenResources(ScreenPtr pScreen)
@@ -274,18 +271,8 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
#ifdef RENDER
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
#endif
- if (xaaWrapperGeneration != serverGeneration) {
- xaaWrapperScrPrivateIndex = AllocateScreenPrivateIndex ();
- if (xaaWrapperScrPrivateIndex == -1)
- return FALSE;
- xaaWrapperGCPrivateIndex = AllocateGCPrivateIndex ();
- if (xaaWrapperGCPrivateIndex == -1)
- return FALSE;
- xaaWrapperGeneration = serverGeneration;
- }
- if (!AllocateGCPrivate (pScreen, xaaWrapperGCPrivateIndex,
- sizeof (xaaWrapperGCPrivRec)))
+ if (!dixRequestPrivate(xaaWrapperGCPrivateKey, sizeof(xaaWrapperGCPrivRec)))
return FALSE;
pScrPriv = (xaaWrapperScrPrivPtr) xalloc (sizeof (xaaWrapperScrPrivRec));
@@ -335,7 +322,7 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
}
#endif
pScrPriv->depth = depth;
- pScreen->devPrivates[xaaWrapperScrPrivateIndex].ptr = (pointer) pScrPriv;
+ dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv);
*func = XAASync;
@@ -486,8 +473,8 @@ xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
void
XAASync(ScreenPtr pScreen)
{
- XAAScreenPtr pScreenPriv =
- (XAAScreenPtr) pScreen->devPrivates[XAAGetScreenIndex()].ptr;
+ XAAScreenPtr pScreenPriv = (XAAScreenPtr)
+ dixLookupPrivate(&pScreen->devPrivates, XAAGetScreenKey());
XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
if(infoRec->NeedToSync) {
diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h
index 686cc876d..e25b9df52 100644
--- a/hw/xfree86/xaa/xaalocal.h
+++ b/hw/xfree86/xaa/xaalocal.h
@@ -1629,9 +1629,9 @@ XAAGetPixelFromRGBA (
extern GCOps XAAFallbackOps;
extern GCOps *XAAGetFallbackOps(void);
extern GCFuncs XAAGCFuncs;
-extern int XAAGetScreenIndex(void);
-extern int XAAGetGCIndex(void);
-extern int XAAGetPixmapIndex(void);
+extern DevPrivateKey XAAGetScreenKey(void);
+extern DevPrivateKey XAAGetGCKey(void);
+extern DevPrivateKey XAAGetPixmapKey(void);
extern unsigned int XAAShiftMasks[32];
@@ -1640,28 +1640,28 @@ extern unsigned int byte_expand3[256], byte_reversed_expand3[256];
CARD32 XAAReverseBitOrder(CARD32 data);
#define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\
- (pScreen)->devPrivates[XAAGetScreenIndex()].ptr
+ dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey())
#define GET_XAASCREENPTR_FROM_GC(pGC)\
- (pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
+ dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey())
#define GET_XAASCREENPTR_FROM_DRAWABLE(pDraw)\
- (pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
+ dixLookupPrivate(&(pDraw)->pScreen->devPrivates, XAAGetScreenKey())
#define GET_XAAINFORECPTR_FROM_SCREEN(pScreen)\
- ((XAAScreenPtr)((pScreen)->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
+((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_GC(pGC)\
-((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
+((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_DRAWABLE(pDraw)\
-((XAAScreenPtr)((pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
+((XAAScreenPtr)dixLookupPrivate(&(pDraw)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn)\
-((XAAScreenPtr)((pScrn)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
+((XAAScreenPtr)dixLookupPrivate(&(pScrn)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec
#define XAA_GET_PIXMAP_PRIVATE(pix)\
- (XAAPixmapPtr)((pix)->devPrivates[XAAGetPixmapIndex()].ptr)
+ (XAAPixmapPtr)dixLookupPrivate(&(pix)->devPrivates, XAAGetPixmapKey())
#define CHECK_RGB_EQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h
index 32c17a60c..38c97d70b 100644
--- a/hw/xfree86/xaa/xaawrap.h
+++ b/hw/xfree86/xaa/xaawrap.h
@@ -1,14 +1,14 @@
#define XAA_SCREEN_PROLOGUE(pScreen, field)\
((pScreen)->field = \
- ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
((pScreen)->field = wrapper)
#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
(pGC)->funcs = pGCPriv->wrapFuncs;\
if(pGCPriv->flags)\
(pGC)->ops = pGCPriv->wrapOps
@@ -24,13 +24,13 @@
#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
pGC->ops = pGCPriv->wrapOps
#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
GCFuncs *oldFuncs = pGC->funcs;\
if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \
pGC->funcs = pGCPriv->wrapFuncs;\
@@ -44,7 +44,7 @@
#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
@@ -64,7 +64,7 @@
#ifdef RENDER
#define XAA_RENDER_PROLOGUE(pScreen,field)\
(GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
(GetPictureScreen(pScreen)->field = wrapper)
@@ -74,7 +74,7 @@
#define SYNC_CHECK(pGC) {\
XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec;\
+((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
if(infoRec->NeedToSync) {\
(*infoRec->Sync)(infoRec->pScrn);\
infoRec->NeedToSync = FALSE;\
diff --git a/hw/xfree86/xf4bpp/mfbfillarc.c b/hw/xfree86/xf4bpp/mfbfillarc.c
index d5b5372f5..89aeadd2b 100644
--- a/hw/xfree86/xf4bpp/mfbfillarc.c
+++ b/hw/xfree86/xf4bpp/mfbfillarc.c
@@ -253,7 +253,8 @@ xf4bppPolyFillArcSolid
mfbPrivGC *priv;
int rop;
- priv = (mfbPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
+ priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates,
+ mfbGetGCPrivateKey());
rop = priv->rop;
if ((rop == RROP_NOP) || !(pGC->planemask & 1))
#else
diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c
index 73e7ce064..4f9561161 100644
--- a/hw/xfree86/xf4bpp/mfbimggblt.c
+++ b/hw/xfree86/xf4bpp/mfbimggblt.c
@@ -149,7 +149,8 @@ xf4bppImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font);
- pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
+ pPrivGC = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates,
+ mfbGetGCPrivateKey());
oldfillStyle = pPrivGC->colorRrop.fillStyle; /* GJA */
oldfg = pPrivGC->colorRrop.fgPixel; /* GJA */
oldalu = pPrivGC->colorRrop.alu; /* GJA */
diff --git a/hw/xfree86/xf4bpp/mfbzerarc.c b/hw/xfree86/xf4bpp/mfbzerarc.c
index c7a8c4d56..61fc7b184 100644
--- a/hw/xfree86/xf4bpp/mfbzerarc.c
+++ b/hw/xfree86/xf4bpp/mfbzerarc.c
@@ -108,7 +108,8 @@ v16ZeroArcSS
int pmask;
register int *paddr;
- if (((mfbPrivGC *)(pGC->devPrivates[mfbGetGCPrivateIndex()].ptr))->rop ==
+ if (((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates,
+ mfbGetGCPrivateKey()))->rop ==
RROP_BLACK)
pixel = 0;
else
diff --git a/hw/xfree86/xf4bpp/ppcArea.c b/hw/xfree86/xf4bpp/ppcArea.c
index e95696260..df7856a35 100644
--- a/hw/xfree86/xf4bpp/ppcArea.c
+++ b/hw/xfree86/xf4bpp/ppcArea.c
@@ -49,7 +49,7 @@ int alu ;
unsigned long int fg, bg, pm ;
int xSrc, ySrc ;
PixmapPtr pPixmap ;
-ppcPrivGC *pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
+ppcPrivGC *pPrivGC = dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey());
TRACE( ( "xf4bppFillArea(0x%x,%d,0x%x,0x%x)\n", pWin, nboxes, pBox, pGC ) ) ;
diff --git a/hw/xfree86/xf4bpp/ppcGC.c b/hw/xfree86/xf4bpp/ppcGC.c
index 674a38b78..7ef312d39 100644
--- a/hw/xfree86/xf4bpp/ppcGC.c
+++ b/hw/xfree86/xf4bpp/ppcGC.c
@@ -182,7 +182,7 @@ register GCPtr pGC ;
* a pointer to a ppcPrivGC in its slot.
*/
*pPriv = vgaPrototypeGCPriv;
- (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) = (pointer) pPriv;
+ dixSetPrivate(&pGC->devPrivates, mfbGetGCPrivateKey(), pPriv);
/* Set the vgaGCOps */
*pOps = vgaGCOps;
@@ -202,7 +202,7 @@ xf4bppDestroyGC( pGC )
if ( pGC->freeCompClip && pGC->pCompositeClip )
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
if(pGC->ops->devPrivate.val) xfree( pGC->ops );
- xfree( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
+ xfree(dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()));
return ;
}
@@ -213,7 +213,7 @@ ppcChangePixmapGC
register Mask changes
)
{
-register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
+register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey());
register unsigned long int idx ; /* used for stepping through bitfields */
#define LOWBIT( x ) ( x & - x ) /* Two's complement */
@@ -291,8 +291,8 @@ xf4bppValidateGC( pGC, changes, pDrawable )
register ppcPrivGCPtr devPriv ;
WindowPtr pWin ;
- devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
-
+ devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates,
+ mfbGetGCPrivateKey());
if ( pDrawable->type != devPriv->lastDrawableType ) {
devPriv->lastDrawableType = pDrawable->type ;
xf4bppChangeGCtype( pGC, devPriv ) ;
diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c
index dfc648660..9fd29efce 100644
--- a/hw/xfree86/xf4bpp/ppcPixFS.c
+++ b/hw/xfree86/xf4bpp/ppcPixFS.c
@@ -124,7 +124,7 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()))->colorRrop.alu ) == GXnoop )
return ;
n = nInit * miFindMaxBand(pGC->pCompositeClip) ;
@@ -142,8 +142,8 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
for ( ; n-- ; ppt++, pwidth++ ) {
@@ -258,14 +258,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
pTile = pGC->stipple ;
tlwidth = pTile->devKind ;
@@ -356,15 +356,15 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
- bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
+ bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
pTile = pGC->stipple ;
@@ -459,14 +459,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
/* the following code is for 8 bits per pixel addressable memory only */
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
pTile = pGC->tile.pixmap ;
tileWidth = pTile->drawable.width ;
diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c
index 241217bf4..d04aacf82 100644
--- a/hw/xfree86/xf4bpp/ppcPixmap.c
+++ b/hw/xfree86/xf4bpp/ppcPixmap.c
@@ -123,6 +123,7 @@ xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint )
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
+ pScreen->totalPixmapSize);
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
+ pPixmap->usage_hint = usage_hint;
return pPixmap ;
}
@@ -138,6 +139,7 @@ xf4bppCopyPixmap(pSrc)
pDst = xalloc(sizeof(PixmapRec) + size);
if (!pDst)
return NullPixmap;
+ pDst->devPrivates = NULL;
pDst->drawable = pSrc->drawable;
pDst->drawable.id = 0;
pDst->drawable.serialNumber = NEXT_SERIAL_NUMBER;
diff --git a/hw/xfree86/xf4bpp/ppcPolyPnt.c b/hw/xfree86/xf4bpp/ppcPolyPnt.c
index 1d6905563..c61fd6d26 100644
--- a/hw/xfree86/xf4bpp/ppcPolyPnt.c
+++ b/hw/xfree86/xf4bpp/ppcPolyPnt.c
@@ -102,7 +102,7 @@ if ( pDrawable->type == DRAWABLE_PIXMAP ) {
return ;
}
-devPriv = (ppcPrivGC *) ( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
+devPriv = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey());
if ( ( alu = devPriv->colorRrop.alu ) == GXnoop )
return ;
diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c
index 78001d793..1522afd9e 100644
--- a/hw/xfree86/xf4bpp/ppcWinFS.c
+++ b/hw/xfree86/xf4bpp/ppcWinFS.c
@@ -96,7 +96,7 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
n = nInit * miFindMaxBand( pGC->pCompositeClip ) ;
@@ -114,8 +114,8 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
for ( ; n-- ; ppt++, pwidth++ )
if ( *pwidth )
@@ -163,14 +163,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
@@ -215,15 +215,15 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
- bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ;
+ bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
@@ -260,7 +260,7 @@ int fSorted ;
TRACE( ( "xf4bppTileWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n",
pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ;
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
@@ -268,7 +268,7 @@ int fSorted ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ;
for ( ; n-- ; ppt++, pwidth++ )
xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm,
diff --git a/hw/xfree86/xf4bpp/vgaGC.c b/hw/xfree86/xf4bpp/vgaGC.c
index 5a8604090..6495e5638 100644
--- a/hw/xfree86/xf4bpp/vgaGC.c
+++ b/hw/xfree86/xf4bpp/vgaGC.c
@@ -107,7 +107,7 @@ xf4bppChangeWindowGC( pGC, changes )
register GC *pGC ;
register Mask changes ;
{
-register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) ;
+register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey());
register unsigned long int idx ; /* used for stepping through bitfields */
#define LOWBIT( x ) ( x & - x ) /* Two's complement */
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h
index e14096568..6e985da20 100644
--- a/hw/xfree86/xf8_32bpp/cfb8_32.h
+++ b/hw/xfree86/xf8_32bpp/cfb8_32.h
@@ -22,10 +22,8 @@ typedef struct {
} cfb8_32ScreenRec, *cfb8_32ScreenPtr;
-extern int cfb8_32GCPrivateIndex; /* XXX */
-extern int cfb8_32GetGCPrivateIndex(void);
-extern int cfb8_32ScreenPrivateIndex; /* XXX */
-extern int cfb8_32GetScreenPrivateIndex(void);
+extern DevPrivateKey cfb8_32GetGCPrivateKey(void);
+extern DevPrivateKey cfb8_32GetScreenPrivateKey(void);
RegionPtr
cfb8_32CopyArea(
@@ -182,11 +180,11 @@ cfb8_32ChangeWindowAttributes(
);
-#define CFB8_32_GET_GC_PRIVATE(pGC)\
- (cfb8_32GCPtr)((pGC)->devPrivates[cfb8_32GetGCPrivateIndex()].ptr)
+#define CFB8_32_GET_GC_PRIVATE(pGC) ((cfb8_32GCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, cfb8_32GetGCPrivateKey()))
-#define CFB8_32_GET_SCREEN_PRIVATE(pScreen)\
- (cfb8_32ScreenPtr)((pScreen)->devPrivates[cfb8_32GetScreenPrivateIndex()].ptr)
+#define CFB8_32_GET_SCREEN_PRIVATE(pScreen) ((cfb8_32ScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, cfb8_32GetScreenPrivateKey()))
Bool xf86Overlay8Plus32Init (ScreenPtr pScreen);
diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c
index 5e2657f2b..c3432b803 100644
--- a/hw/xfree86/xf8_32bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c
@@ -31,38 +31,37 @@
/* CAUTION: We require that cfb8 and cfb32 were NOT
compiled with CFB_NEED_SCREEN_PRIVATE */
-int cfb8_32GCPrivateIndex;
-int cfb8_32GetGCPrivateIndex(void) { return cfb8_32GCPrivateIndex; }
-int cfb8_32ScreenPrivateIndex;
-int cfb8_32GetScreenPrivateIndex(void) { return cfb8_32ScreenPrivateIndex; }
-static unsigned long cfb8_32Generation = 0;
+static DevPrivateKey cfb8_32GCPrivateKey = &cfb8_32GCPrivateKey;
+DevPrivateKey cfb8_32GetGCPrivateKey(void)
+{
+ return cfb8_32GCPrivateKey;
+}
+
+static DevPrivateKey cfb8_32ScreenPrivateKey = &cfb8_32ScreenPrivateKey;
+DevPrivateKey cfb8_32GetScreenPrivateKey(void)
+{
+ return cfb8_32ScreenPrivateKey;
+}
static Bool
cfb8_32AllocatePrivates(ScreenPtr pScreen)
{
cfb8_32ScreenPtr pScreenPriv;
- if(cfb8_32Generation != serverGeneration) {
- if(((cfb8_32GCPrivateIndex = AllocateGCPrivateIndex()) < 0) ||
- ((cfb8_32ScreenPrivateIndex = AllocateScreenPrivateIndex()) < 0))
- return FALSE;
- cfb8_32Generation = serverGeneration;
- }
-
if (!(pScreenPriv = xalloc(sizeof(cfb8_32ScreenRec))))
return FALSE;
- pScreen->devPrivates[cfb8_32ScreenPrivateIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, pScreenPriv);
/* All cfb will have the same GC and Window private indicies */
- if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex))
+ if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey))
return FALSE;
- if(!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
+ if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC)))
return FALSE;
- if(!AllocateGCPrivate(pScreen, cfb8_32GCPrivateIndex, sizeof(cfb8_32GCRec)))
+ if(!dixRequestPrivate(cfb8_32GCPrivateKey, sizeof(cfb8_32GCRec)))
return FALSE;
return TRUE;
@@ -160,7 +159,7 @@ cfb8_32CloseScreen (int i, ScreenPtr pScreen)
xfree(pScreenPriv->visualData);
xfree((pointer) pScreenPriv);
- pScreen->devPrivates[cfb8_32ScreenPrivateIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, NULL);
return(cfb32CloseScreen(i, pScreen));
}
diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c
index 47b2b52db..c63b3cfd1 100644
--- a/hw/xfree86/xf8_32bpp/xf86overlay.c
+++ b/hw/xfree86/xf8_32bpp/xf86overlay.c
@@ -177,23 +177,22 @@ typedef struct {
} OverlayPixmapRec, *OverlayPixmapPtr;
-static int OverlayScreenIndex = -1;
-static int OverlayGCIndex = -1;
-static int OverlayPixmapIndex = -1;
-static unsigned long OverlayGeneration = 0;
+static DevPrivateKey OverlayScreenKey = &OverlayScreenKey;
+static DevPrivateKey OverlayGCKey = &OverlayGCKey;
+static DevPrivateKey OverlayPixmapKey = &OverlayPixmapKey;
/** Macros **/
#define TILE_EXISTS(pGC) (!(pGC)->tileIsPixel && (pGC)->tile.pixmap)
-#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) \
- (OverlayPixmapPtr)((pPix)->devPrivates[OverlayPixmapIndex].ptr)
+#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) ((OverlayPixmapPtr) \
+ dixLookupPrivate(&(pPix)->devPrivates, OverlayPixmapKey))
-#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) \
- (OverlayScreenPtr)((pScreen)->devPrivates[OverlayScreenIndex].ptr)
+#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) ((OverlayScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, OverlayScreenKey))
-#define OVERLAY_GET_GC_PRIVATE(pGC) \
- (OverlayGCPtr)((pGC)->devPrivates[OverlayGCIndex].ptr)
+#define OVERLAY_GET_GC_PRIVATE(pGC) ((OverlayGCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, OverlayGCKey))
#define OVERLAY_GC_FUNC_PROLOGUE(pGC)\
OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\
@@ -255,26 +254,16 @@ xf86Overlay8Plus32Init (ScreenPtr pScreen)
{
OverlayScreenPtr pScreenPriv;
- if(OverlayGeneration != serverGeneration) {
- if(((OverlayScreenIndex = AllocateScreenPrivateIndex()) < 0) ||
- ((OverlayGCIndex = AllocateGCPrivateIndex()) < 0) ||
- ((OverlayPixmapIndex = AllocatePixmapPrivateIndex()) < 0))
- return FALSE;
-
- OverlayGeneration = serverGeneration;
- }
-
- if (!AllocateGCPrivate(pScreen, OverlayGCIndex, sizeof(OverlayGCRec)))
+ if (!dixRequestPrivate(OverlayGCKey, sizeof(OverlayGCRec)))
return FALSE;
- if (!AllocatePixmapPrivate(pScreen, OverlayPixmapIndex,
- sizeof(OverlayPixmapRec)))
+ if (!dixRequestPrivate(OverlayPixmapKey, sizeof(OverlayPixmapRec)))
return FALSE;
if (!(pScreenPriv = xalloc(sizeof(OverlayScreenRec))))
return FALSE;
- pScreen->devPrivates[OverlayScreenIndex].ptr = (pointer)pScreenPriv;
+ dixSetPrivate(&pScreen->devPrivates, OverlayScreenKey, pScreenPriv);
pScreenPriv->CreateGC = pScreen->CreateGC;
pScreenPriv->CloseScreen = pScreen->CloseScreen;
diff --git a/hw/xgl/egl/kinput.c b/hw/xgl/egl/kinput.c
index 981cffcfa..774e00eb5 100644
--- a/hw/xgl/egl/kinput.c
+++ b/hw/xgl/egl/kinput.c
@@ -439,7 +439,7 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff)
switch (onoff)
{
case DEVICE_INIT:
- if (pDev != LookupKeyboardDevice())
+ if (pDev != (DevicePtr)inputInfo.keyboard)
{
return !Success;
}
diff --git a/hw/xgl/egl/xegl.c b/hw/xgl/egl/xegl.c
index c671dbe7c..1cf615bb6 100644
--- a/hw/xgl/egl/xegl.c
+++ b/hw/xgl/egl/xegl.c
@@ -42,14 +42,13 @@
#define XEGL_DEFAULT_SCREEN_WIDTH 800
#define XEGL_DEFAULT_SCREEN_HEIGHT 600
-int xeglScreenGeneration = -1;
-int xeglScreenPrivateIndex;
+DevPrivateKey xeglScreenPrivateKey = &xeglScreenPrivateKey;
-#define XEGL_GET_SCREEN_PRIV(pScreen) \
- ((xeglScreenPtr) (pScreen)->devPrivates[xeglScreenPrivateIndex].ptr)
+#define XEGL_GET_SCREEN_PRIV(pScreen) ((xeglScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey))
-#define XEGL_SET_SCREEN_PRIV(pScreen, v) \
- ((pScreen)->devPrivates[xeglScreenPrivateIndex].ptr = (pointer) v)
+#define XEGL_SET_SCREEN_PRIV(pScreen, v) \
+ dixSetPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey, v)
#define XEGL_SCREEN_PRIV(pScreen) \
xeglScreenPtr pScreenPriv = XEGL_GET_SCREEN_PRIV (pScreen)
@@ -66,15 +65,6 @@ xeglAllocatePrivates (ScreenPtr pScreen)
{
xeglScreenPtr pScreenPriv;
- if (xeglScreenGeneration != serverGeneration)
- {
- xeglScreenPrivateIndex = AllocateScreenPrivateIndex ();
- if (xeglScreenPrivateIndex < 0)
- return FALSE;
-
- xeglScreenGeneration = serverGeneration;
- }
-
pScreenPriv = xalloc (sizeof (xeglScreenRec));
if (!pScreenPriv)
return FALSE;
diff --git a/hw/xgl/egl/xegl.h b/hw/xgl/egl/xegl.h
index be9b48c9c..0a07397bf 100644
--- a/hw/xgl/egl/xegl.h
+++ b/hw/xgl/egl/xegl.h
@@ -109,7 +109,7 @@ extern KdMouseInfo *kdMouseInfo;
extern KdOsFuncs *kdOsFuncs;
extern Bool kdDontZap;
extern Bool kdDisableZaphod;
-extern int xeglScreenPrivateIndex;
+extern DevPrivateKey xeglScreenPrivateKey;
extern KdMouseFuncs LinuxEvdevMouseFuncs;
extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
@@ -117,8 +117,8 @@ extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
(RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270)
#define RR_Reflect_All (RR_Reflect_X | RR_Reflect_Y)
-#define KdGetScreenPriv(pScreen) \
- ((xeglScreenPtr) ((pScreen)->devPrivates[xeglScreenPrivateIndex].ptr))
+#define KdGetScreenPriv(pScreen) ((xeglScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey))
#define KdScreenPriv(pScreen) \
xeglScreenPtr pScreenPriv = KdGetScreenPriv (pScreen)
diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c
index 87d8a4ea8..33b276b74 100644
--- a/hw/xgl/glx/xglx.c
+++ b/hw/xgl/glx/xglx.c
@@ -105,14 +105,13 @@ typedef struct _xglxScreen {
CloseScreenProcPtr CloseScreen;
} xglxScreenRec, *xglxScreenPtr;
-int xglxScreenGeneration = -1;
-int xglxScreenPrivateIndex;
+DevPrivateKey xglxScreenPrivateKey = &xglxScreenPrivateKey;
-#define XGLX_GET_SCREEN_PRIV(pScreen) \
- ((xglxScreenPtr) (pScreen)->devPrivates[xglxScreenPrivateIndex].ptr)
+#define XGLX_GET_SCREEN_PRIV(pScreen) ((xglxScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, xglxScreenPrivateKey))
-#define XGLX_SET_SCREEN_PRIV(pScreen, v) \
- ((pScreen)->devPrivates[xglxScreenPrivateIndex].ptr = (pointer) v)
+#define XGLX_SET_SCREEN_PRIV(pScreen, v) \
+ dixSetPrivate(&(pScreen)->devPrivates, xglxScreenPrivateKey, v)
#define XGLX_SCREEN_PRIV(pScreen) \
xglxScreenPtr pScreenPriv = XGLX_GET_SCREEN_PRIV (pScreen)
@@ -122,10 +121,10 @@ typedef struct _xglxCursor {
} xglxCursorRec, *xglxCursorPtr;
#define XGLX_GET_CURSOR_PRIV(pCursor, pScreen) \
- ((xglxCursorPtr) (pCursor)->devPriv[(pScreen)->myNum])
+ ((xglxCursorPtr)dixLookupPrivate(&(pCursor)->devPrivates, pScreen))
#define XGLX_SET_CURSOR_PRIV(pCursor, pScreen, v) \
- ((pCursor)->devPriv[(pScreen)->myNum] = (pointer) v)
+ dixSetPrivate(&(pCursor)->devPrivates, pScreen, v)
#define XGLX_CURSOR_PRIV(pCursor, pScreen) \
xglxCursorPtr pCursorPriv = XGLX_GET_CURSOR_PRIV (pCursor, pScreen)
@@ -148,15 +147,6 @@ xglxAllocatePrivates (ScreenPtr pScreen)
{
xglxScreenPtr pScreenPriv;
- if (xglxScreenGeneration != serverGeneration)
- {
- xglxScreenPrivateIndex = AllocateScreenPrivateIndex ();
- if (xglxScreenPrivateIndex < 0)
- return FALSE;
-
- xglxScreenGeneration = serverGeneration;
- }
-
pScreenPriv = xalloc (sizeof (xglxScreenRec));
if (!pScreenPriv)
return FALSE;
@@ -1110,7 +1100,7 @@ xglxKeybdProc (DeviceIntPtr pDevice,
int xkbOp, xkbEvent, xkbError, xkbMajor, xkbMinor;
#endif
- if (pDev != LookupKeyboardDevice ())
+ if (pDev != (DevicePtr)inputInfo.keyboard)
return !Success;
xmodMap = XGetModifierMapping (xdisplay);
diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h
index 80fa69577..03dc90c70 100644
--- a/hw/xgl/xgl.h
+++ b/hw/xgl/xgl.h
@@ -224,10 +224,11 @@ typedef struct _xglGlyph {
xglAreaPtr pArea;
} xglGlyphRec, *xglGlyphPtr;
-extern int xglGlyphPrivateIndex;
+extern DevPrivateKey xglGlyphPrivateKey;
#define XGL_GET_GLYPH_PRIV(pScreen, pGlyph) ((xglGlyphPtr) \
- (GetGlyphPrivatesForScreen (pGlyph, pScreen))[xglGlyphPrivateIndex].ptr)
+ dixLookupPrivate(GetGlyphPrivatesForScreen (pGlyph, pScreen), \
+ xglGlyphPrivateKey))
#define XGL_GLYPH_PRIV(pScreen, pGlyph) \
xglGlyphPtr pGlyphPriv = XGL_GET_GLYPH_PRIV (pScreen, pGlyph)
@@ -293,13 +294,13 @@ typedef struct _xglScreen {
#endif
} xglScreenRec, *xglScreenPtr;
-extern int xglScreenPrivateIndex;
+extern DevPrivateKey xglScreenPrivateKey;
-#define XGL_GET_SCREEN_PRIV(pScreen) \
- ((xglScreenPtr) (pScreen)->devPrivates[xglScreenPrivateIndex].ptr)
+#define XGL_GET_SCREEN_PRIV(pScreen) ((xglScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, xglScreenPrivateKey))
-#define XGL_SET_SCREEN_PRIV(pScreen, v) \
- ((pScreen)->devPrivates[xglScreenPrivateIndex].ptr = (pointer) v)
+#define XGL_SET_SCREEN_PRIV(pScreen, v) \
+ dixSetPrivate(&(pScreen)->devPrivates, xglScreenPrivateKey, v)
#define XGL_SCREEN_PRIV(pScreen) \
xglScreenPtr pScreenPriv = XGL_GET_SCREEN_PRIV (pScreen)
@@ -334,10 +335,10 @@ typedef struct _xglGC {
GCOpsPtr ops;
} xglGCRec, *xglGCPtr;
-extern int xglGCPrivateIndex;
+extern DevPrivateKey xglGCPrivateKey;
-#define XGL_GET_GC_PRIV(pGC) \
- ((xglGCPtr) (pGC)->devPrivates[xglGCPrivateIndex].ptr)
+#define XGL_GET_GC_PRIV(pGC) ((xglGCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, xglGCPrivateKey))
#define XGL_GC_PRIV(pGC) \
xglGCPtr pGCPriv = XGL_GET_GC_PRIV (pGC)
@@ -394,10 +395,10 @@ typedef struct _xglPixmap {
} xglPixmapRec, *xglPixmapPtr;
-extern int xglPixmapPrivateIndex;
+extern DevPrivateKey xglPixmapPrivateKey;
-#define XGL_GET_PIXMAP_PRIV(pPixmap) \
- ((xglPixmapPtr) (pPixmap)->devPrivates[xglPixmapPrivateIndex].ptr)
+#define XGL_GET_PIXMAP_PRIV(pPixmap) ((xglPixmapPtr) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, xglPixmapPrivateKey))
#define XGL_PIXMAP_PRIV(pPixmap) \
xglPixmapPtr pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap)
@@ -409,10 +410,10 @@ typedef struct _xglWin {
PixmapPtr pPixmap;
} xglWinRec, *xglWinPtr;
-extern int xglWinPrivateIndex;
+extern DevPrivateKey xglWinPrivateKey;
-#define XGL_GET_WINDOW_PRIV(pWin) \
- ((xglWinPtr) (pWin)->devPrivates[xglWinPrivateIndex].ptr)
+#define XGL_GET_WINDOW_PRIV(pWin) ((xglWinPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, xglWinPrivateKey))
#define XGL_WINDOW_PRIV(pWin) \
xglWinPtr pWinPriv = XGL_GET_WINDOW_PRIV (pWin)
diff --git a/hw/xgl/xglinput.c b/hw/xgl/xglinput.c
index cda21ad49..9499fcf1f 100644
--- a/hw/xgl/xglinput.c
+++ b/hw/xgl/xglinput.c
@@ -224,7 +224,7 @@ xglKeybdProc (DeviceIntPtr pDevice,
switch (onoff) {
case DEVICE_INIT:
- if (pDev != LookupKeyboardDevice ())
+ if (pDev != (DevicePtr)inputInfo.keyboard)
return !Success;
ret = InitKeyboardDeviceStruct (pDev,
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 8c54d64fc..8e602cee3 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -254,6 +254,7 @@ xglCreatePixmap (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = 0;
+ pPixmap->usage_hint = usage_hint;
pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap);
@@ -311,6 +312,7 @@ xglDestroyPixmap (PixmapPtr pPixmap)
xglFiniPixmap (pPixmap);
+ dixFreePrivates(pPixmap->devPrivates);
xfree (pPixmap);
return TRUE;
diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c
index cd3b59a34..47ed34508 100644
--- a/hw/xgl/xglscreen.c
+++ b/hw/xgl/xglscreen.c
@@ -463,7 +463,8 @@ xglCreateSolidAlphaPicture (ScreenPtr pScreen)
tmpval[0] = xTrue;
pScreenPriv->pSolidAlpha = CreatePicture (0, &pPixmap->drawable, pFormat,
- CPRepeat, tmpval, 0, &error);
+ CPRepeat, tmpval,
+ serverClient, &error);
(*pScreen->DestroyPixmap) (pPixmap);
if (pScreenPriv->pSolidAlpha)
diff --git a/hw/xgl/xglxv.c b/hw/xgl/xglxv.c
index 8138a0cbb..353f9b3bb 100644
--- a/hw/xgl/xglxv.c
+++ b/hw/xgl/xglxv.c
@@ -35,11 +35,11 @@
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvproto.h>
-static unsigned int xglXvScreenIndex = 0;
+static DevPrivateKey xglXvScreenKey;
static unsigned long portResource = 0;
-#define XGL_GET_XV_SCREEN(pScreen) \
- ((XvScreenPtr) ((pScreen)->devPrivates[xglXvScreenIndex].ptr))
+#define XGL_GET_XV_SCREEN(pScreen) ((XvScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, xglXvScreenKey))
#define XGL_XV_SCREEN(pScreen) \
XvScreenPtr pXvScreen = XGL_GET_XV_SCREEN (pScreen)
@@ -591,7 +591,7 @@ xglXvScreenInit (ScreenPtr pScreen)
if (status != Success)
return FALSE;
- xglXvScreenIndex = XvGetScreenIndex ();
+ xglXvScreenKey = XvGetScreenKey ();
portResource = XvGetRTPort ();
pXvScreen = XGL_GET_XV_SCREEN (pScreen);
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 134276e7b..138698068 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -104,8 +104,8 @@ xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
bg_color.green = pCursor->backGreen;
bg_color.blue = pCursor->backBlue;
- pCursor->devPriv[pScreen->myNum] = (pointer)xalloc(sizeof(xnestPrivCursor));
- xnestCursorPriv(pCursor, pScreen)->cursor =
+ xnestSetCursorPriv(pCursor, pScreen, xalloc(sizeof(xnestPrivCursor)));
+ xnestCursor(pCursor, pScreen) =
XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color,
pCursor->bits->xhot, pCursor->bits->yhot);
@@ -119,7 +119,7 @@ Bool
xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
{
XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen));
- xfree(xnestCursorPriv(pCursor, pScreen));
+ xfree(xnestGetCursorPriv(pCursor, pScreen));
return True;
}
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index a52ce1f35..06e6e0205 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -35,7 +35,7 @@ is" without express or implied warranty.
#include "XNFont.h"
#include "Color.h"
-int xnestGCPrivateIndex;
+DevPrivateKey xnestGCPrivateKey = &xnestGCPrivateKey;
static GCFuncs xnestFuncs = {
xnestValidateGC,
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 4699111b9..7b344e25f 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -74,8 +74,6 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
break;
}
- xnestWindowPrivateIndex = AllocateWindowPrivateIndex();
- xnestGCPrivateIndex = AllocateGCPrivateIndex();
xnestFontPrivateIndex = AllocateFontPrivateIndex();
if (!xnestNumScreens) xnestNumScreens = 1;
@@ -124,7 +122,7 @@ void ddxGiveUp()
AbortDDX();
}
-#ifdef __DARWIN__
+#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index 92f840c97..8601b2988 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -50,8 +50,7 @@ libfbcmap_a_CFLAGS = $(AM_CFLAGS)
XNEST_LIBS = \
@XNEST_LIBS@ \
- libfbcmap.a \
- $(XSERVER_LIBS)
+ libfbcmap.a
Xnest_SOURCES = $(SRCS)
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 1f420015a..04311966d 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -24,6 +24,7 @@ is" without express or implied warranty.
#include "regionstr.h"
#include "gc.h"
#include "servermd.h"
+#include "privates.h"
#include "mi.h"
#include "Xnest.h"
@@ -32,7 +33,7 @@ is" without express or implied warranty.
#include "Screen.h"
#include "XNPixmap.h"
-int xnestPixmapPrivateIndex;
+DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKey;
PixmapPtr
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
@@ -56,8 +57,9 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pPixmap->refcnt = 1;
pPixmap->devKind = PixmapBytePad(width, depth);
- pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
- (pointer)((char *)pPixmap + pScreen->totalPixmapSize);
+ pPixmap->usage_hint = usage_hint;
+ dixSetPrivate(&pPixmap->devPrivates, xnestPixmapPrivateKey,
+ (char *)pPixmap + pScreen->totalPixmapSize);
if (width && height)
xnestPixmapPriv(pPixmap)->pixmap =
XCreatePixmap(xnestDisplay,
@@ -75,6 +77,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap)
if(--pPixmap->refcnt)
return TRUE;
XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
+ dixFreePrivates(pPixmap->devPrivates);
xfree(pPixmap);
return TRUE;
}
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 02e82d193..61a325f3c 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -45,8 +45,6 @@ is" without express or implied warranty.
Window xnestDefaultWindows[MAXSCREENS];
Window xnestScreenSaverWindows[MAXSCREENS];
-static int xnestScreenGeneration = -1;
-
ScreenPtr
xnestScreen(Window window)
{
@@ -142,21 +140,13 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
VisualID defaultVisual;
int rootDepth;
- if (!(AllocateWindowPrivate(pScreen, xnestWindowPrivateIndex,
- sizeof(xnestPrivWin)) &&
- AllocateGCPrivate(pScreen, xnestGCPrivateIndex,
- sizeof(xnestPrivGC))))
+ if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin)))
+ return False;
+ if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC)))
return False;
-
- if (xnestScreenGeneration != serverGeneration) {
- if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0)
- return False;
- xnestScreenGeneration = serverGeneration;
- }
-
- if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex,
- sizeof (xnestPrivPixmap)))
+ if (!dixRequestPrivate(xnestPixmapPrivateKey, sizeof (xnestPrivPixmap)))
return False;
+
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
numVisuals = 0;
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index e83fb90d5..bc9d8bed2 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -39,7 +39,7 @@ is" without express or implied warranty.
#include "Events.h"
#include "Args.h"
-int xnestWindowPrivateIndex;
+DevPrivateKey xnestWindowPrivateKey = &xnestWindowPrivateKey;
static int
xnestFindWindowMatch(WindowPtr pWin, pointer ptr)
diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h
index ffec9eb0a..9705f6bea 100644
--- a/hw/xnest/XNCursor.h
+++ b/hw/xnest/XNCursor.h
@@ -19,11 +19,14 @@ typedef struct {
Cursor cursor;
} xnestPrivCursor;
-#define xnestCursorPriv(pCursor, pScreen) \
- ((xnestPrivCursor *)((pCursor)->devPriv[pScreen->myNum]))
+#define xnestGetCursorPriv(pCursor, pScreen) \
+ ((xnestPrivCursor *)dixLookupPrivate(&(pCursor)->devPrivates, pScreen))
+
+#define xnestSetCursorPriv(pCursor, pScreen, v) \
+ dixSetPrivate(&(pCursor)->devPrivates, pScreen, v)
#define xnestCursor(pCursor, pScreen) \
- (xnestCursorPriv(pCursor, pScreen)->cursor)
+ (xnestGetCursorPriv(pCursor, pScreen)->cursor)
Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
diff --git a/hw/xnest/XNGC.h b/hw/xnest/XNGC.h
index d3ac3df0b..19535fe3a 100644
--- a/hw/xnest/XNGC.h
+++ b/hw/xnest/XNGC.h
@@ -22,10 +22,10 @@ typedef struct {
int nClipRects;
} xnestPrivGC;
-extern int xnestGCPrivateIndex;
+extern DevPrivateKey xnestGCPrivateKey;
-#define xnestGCPriv(pGC) \
- ((xnestPrivGC *)((pGC)->devPrivates[xnestGCPrivateIndex].ptr))
+#define xnestGCPriv(pGC) ((xnestPrivGC *) \
+ dixLookupPrivate(&(pGC)->devPrivates, xnestGCPrivateKey))
#define xnestGC(pGC) (xnestGCPriv(pGC)->gc)
diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h
index 9eb2a3c70..614827587 100644
--- a/hw/xnest/XNPixmap.h
+++ b/hw/xnest/XNPixmap.h
@@ -15,14 +15,14 @@ is" without express or implied warranty.
#ifndef XNESTPIXMAP_H
#define XNESTPIXMAP_H
-extern int xnestPixmapPrivateIndex;
+extern DevPrivateKey xnestPixmapPrivateKey;
typedef struct {
Pixmap pixmap;
} xnestPrivPixmap;
-#define xnestPixmapPriv(pPixmap) \
- ((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr))
+#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h
index 6c63f1f76..4cb66c8ce 100644
--- a/hw/xnest/XNWindow.h
+++ b/hw/xnest/XNWindow.h
@@ -35,10 +35,10 @@ typedef struct {
Window window;
} xnestWindowMatch;
-extern int xnestWindowPrivateIndex;
+extern DevPrivateKey xnestWindowPrivateKey;
-#define xnestWindowPriv(pWin) \
- ((xnestPrivWin *)((pWin)->devPrivates[xnestWindowPrivateIndex].ptr))
+#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
+ dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am
index c440473a0..1b8004841 100644
--- a/hw/xprint/Makefile.am
+++ b/hw/xprint/Makefile.am
@@ -53,3 +53,5 @@ Xprt_SOURCES = \
$(top_srcdir)/fb/fbcmap_mi.c
EXTRA_DIST = ValTree.c
+
+CLEANFILES = miinitext-wrapper.c dpmsstubs-wrapper.c
diff --git a/hw/xprint/attributes.c b/hw/xprint/attributes.c
index d8ee5adf8..e79360496 100644
--- a/hw/xprint/attributes.c
+++ b/hw/xprint/attributes.c
@@ -124,7 +124,7 @@ SysAttrs systemAttributes;
* attrCtxtPrivIndex hold the attribute store's context private index.
* This index is allocated at the time the attribute store is initialized.
*/
-static int attrCtxtPrivIndex;
+static DevPrivateKey attrCtxtPrivKey = &attrCtxtPrivKey;
/*
* The ContextAttrs structure descibes the context private space reserved
@@ -521,8 +521,7 @@ XpBuildAttributeStore(
{
if(attrList != (PrAttrPtr)NULL)
FreeAttrList();
- attrCtxtPrivIndex = XpAllocateContextPrivateIndex();
- XpAllocateContextPrivate(attrCtxtPrivIndex, sizeof(ContextAttrs));
+ dixRequestPrivate(attrCtxtPrivKey, sizeof(ContextAttrs));
BuildSystemAttributes();
attrGeneration = serverGeneration;
@@ -592,7 +591,8 @@ XpInitAttributes(XpContextPtr pContext)
PrAttrPtr pPrAttr = attrList;
/* Initialize all the pointers to NULL */
- pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
(void)memset((void *)pCtxtAttrs, 0, (size_t) sizeof(ContextAttrs));
for(pPrAttr = attrList; pPrAttr != (PrAttrPtr)NULL; pPrAttr = pPrAttr->next)
@@ -612,8 +612,8 @@ XpDestroyAttributes(
{
ContextAttrPtr pCtxtAttrs;
- pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
-
+ pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL)
XrmDestroyDatabase(pCtxtAttrs->printerAttrs);
if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL)
@@ -661,7 +661,8 @@ XpGetOneAttribute(
}
else
{
- pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
switch(class)
{
case XPPrinterAttr:
@@ -714,7 +715,8 @@ XpPutOneAttribute(
XrmBinding bindings[1];
XrmQuark quarks[2];
- pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
switch(class)
{
case XPPrinterAttr:
@@ -900,7 +902,8 @@ XpGetAttributes(
db = systemAttributes.server;
else
{
- pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
switch(class)
{
case XPServerAttr:
@@ -952,7 +955,8 @@ XpAugmentAttributes(
db = XrmGetStringDatabase(attributes);
if(db == (XrmDatabase)NULL) return BadAlloc;
- pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
switch(class)
{
case XPPrinterAttr:
@@ -988,7 +992,8 @@ XpSetAttributes(
db = XrmGetStringDatabase(attributes);
if(db == (XrmDatabase)NULL) return BadAlloc;
- pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr;
+ pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates,
+ attrCtxtPrivKey);
switch(class)
{
case XPPrinterAttr:
@@ -1378,7 +1383,7 @@ ReplaceAllKeywords(
defined(ISC) || \
defined(Lynx) || \
defined(__QNX__) || \
- defined(__DARWIN__)
+ defined(__APPLE__)
#define iswspace(c) (isascii(c) && isspace(toascii(c)))
#endif
diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c
index 1e7652e60..d744121aa 100644
--- a/hw/xprint/ddxInit.c
+++ b/hw/xprint/ddxInit.c
@@ -205,7 +205,7 @@ ProcessInputEvents(void)
{
}
-#ifdef __DARWIN__
+#ifdef __APPLE__
#include "micmap.h"
void GlxExtensionInit(void);
diff --git a/hw/xprint/pcl/Pcl.h b/hw/xprint/pcl/Pcl.h
index 0c50ed241..d46a03401 100644
--- a/hw/xprint/pcl/Pcl.h
+++ b/hw/xprint/pcl/Pcl.h
@@ -83,10 +83,10 @@ typedef char *XPointer;
/******
* externally visible variables from PclInit.c
******/
-extern int PclScreenPrivateIndex, PclWindowPrivateIndex;
-extern int PclContextPrivateIndex;
-extern int PclPixmapPrivateIndex;
-extern int PclGCPrivateIndex;
+extern DevPrivateKey PclScreenPrivateKey, PclWindowPrivateKey;
+extern DevPrivateKey PclContextPrivateKey;
+extern DevPrivateKey PclPixmapPrivateKey;
+extern DevPrivateKey PclGCPrivateKey;
/******
* externally visible variables from PclAttVal.c
diff --git a/hw/xprint/pcl/PclArc.c b/hw/xprint/pcl/PclArc.c
index 0d8289e33..20d3f723d 100644
--- a/hw/xprint/pcl/PclArc.c
+++ b/hw/xprint/pcl/PclArc.c
@@ -85,7 +85,7 @@ PclDoArc(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
XpGetReproductionArea( pCon, &repro );
/*
diff --git a/hw/xprint/pcl/PclColor.c b/hw/xprint/pcl/PclColor.c
index 8b05da056..5e8ffa63c 100644
--- a/hw/xprint/pcl/PclColor.c
+++ b/hw/xprint/pcl/PclColor.c
@@ -129,8 +129,8 @@ PclCreateColormap(ColormapPtr pColor)
PclCmapToContexts *new;
PclScreenPrivPtr sPriv;
- sPriv = (PclScreenPrivPtr)pColor->pScreen
- ->devPrivates[PclScreenPrivateIndex].ptr;
+ sPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
/*
* Use existing code to initialize the values in the colormap
@@ -175,8 +175,8 @@ PclDestroyColormap(ColormapPtr pColor)
/*
* Find the colormap <-> contexts mapping
*/
- sPriv = (PclScreenPrivPtr)pColor->pScreen
- ->devPrivates[PclScreenPrivateIndex].ptr;
+ sPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
pCmap = sPriv->colormaps;
while( pCmap )
{
@@ -195,8 +195,8 @@ PclDestroyColormap(ColormapPtr pColor)
con = pCmap->contexts;
while( con )
{
- cPriv = con->context->devPrivates[PclContextPrivateIndex].ptr;
-
+ cPriv = dixLookupPrivate(&con->context->devPrivates,
+ PclContextPrivateKey);
pPal = cPriv->palettes;
while( pPal )
{
@@ -259,8 +259,8 @@ PclStoreColors(ColormapPtr pColor,
char t[80];
int i;
- sPriv = (PclScreenPrivPtr)pColor->pScreen
- ->devPrivates[PclScreenPrivateIndex].ptr;
+ sPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey);
p = sPriv->colormaps;
while( p )
{
@@ -278,8 +278,8 @@ PclStoreColors(ColormapPtr pColor,
* For each context, get the palette ID and update the
* appropriate palette.
*/
- cPriv = con->context
- ->devPrivates[PclContextPrivateIndex].ptr;
+ cPriv = dixLookupPrivate(&con->context->devPrivates,
+ PclContextPrivateKey);
pMap = PclFindPaletteMap( cPriv, pColor, NULL );
/*
@@ -407,7 +407,8 @@ PclUpdateColormap(DrawablePtr pDrawable,
unsigned short r, g, b, rr, gg, bb;
int i;
- cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr;
+ cPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
c = wColormap( win );
cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP );
@@ -436,8 +437,9 @@ PclUpdateColormap(DrawablePtr pDrawable,
/*
* Add the colormap to the screen-level colormap<->context mapping.
*/
- sPriv = (PclScreenPrivPtr)cmap->pScreen
- ->devPrivates[PclScreenPrivateIndex].ptr;
+ sPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&cmap->pScreen->devPrivates,
+ PclScreenPrivateKey);
pCmap = sPriv->colormaps;
while( pCmap && ( pCmap->colormapId != cmap->mid ) )
pCmap = pCmap->next;
diff --git a/hw/xprint/pcl/PclGC.c b/hw/xprint/pcl/PclGC.c
index b47f2833a..fbadf5d5d 100644
--- a/hw/xprint/pcl/PclGC.c
+++ b/hw/xprint/pcl/PclGC.c
@@ -144,7 +144,8 @@ PclGetDrawablePrivateStuff(
return FALSE;
else
{
- cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr;
+ cPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
*gc = cPriv->lastGC;
*valid = cPriv->validGC;
*file = cPriv->pPageFile;
@@ -171,7 +172,8 @@ PclSetDrawablePrivateGC(
{
case DRAWABLE_PIXMAP:
pix = (PixmapPtr)pDrawable;
- pixPriv = pix->devPrivates[PclPixmapPrivateIndex].ptr;
+ pixPriv = (PclPixmapPrivPtr)
+ dixLookupPrivate(&pix->devPrivates, PclPixmapPrivateKey);
pixPriv->lastGC = gc;
pixPriv->validGC = 1;
@@ -179,8 +181,8 @@ PclSetDrawablePrivateGC(
case DRAWABLE_WINDOW:
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
- pPriv = ((PclContextPrivPtr)
- (pCon->devPrivates[PclContextPrivateIndex].ptr));
+ pPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
pPriv->validGC = 1;
pPriv->lastGC = gc;
@@ -316,13 +318,14 @@ PclUpdateDrawableGC(
XpContextPtr pCon;
PclContextPrivPtr cPriv;
PclGCPrivPtr gcPriv = (PclGCPrivPtr)
- (pGC->devPrivates[PclGCPrivateIndex].ptr);
+ dixLookupPrivate(&pGC->devPrivates, PclGCPrivateKey);
if( !PclGetDrawablePrivateStuff( pDrawable, &dGC, &valid, outFile ) )
return FALSE;
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
- cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr;
+ cPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Here's where we update the colormap. Since there can be
diff --git a/hw/xprint/pcl/PclInit.c b/hw/xprint/pcl/PclInit.c
index 574b481d2..e738e3e54 100644
--- a/hw/xprint/pcl/PclInit.c
+++ b/hw/xprint/pcl/PclInit.c
@@ -67,11 +67,11 @@ static void AllocatePclPrivates(ScreenPtr pScreen);
static int PclInitContext(XpContextPtr pCon);
static Bool PclDestroyContext(XpContextPtr pCon);
-int PclScreenPrivateIndex;
-int PclContextPrivateIndex;
-int PclPixmapPrivateIndex;
-int PclWindowPrivateIndex;
-int PclGCPrivateIndex;
+DevPrivateKey PclScreenPrivateKey = &PclScreenPrivateKey;
+DevPrivateKey PclContextPrivateKey = &PclContextPrivateKey;
+DevPrivateKey PclPixmapPrivateKey = &PclPixmapPrivateKey;
+DevPrivateKey PclWindowPrivateKey = &PclWindowPrivateKey;
+DevPrivateKey PclGCPrivateKey = &PclGCPrivateKey;
#ifdef XP_PCL_COLOR
/*
@@ -119,7 +119,8 @@ Bool
PclCloseScreen(int index,
ScreenPtr pScreen)
{
- PclScreenPrivPtr pPriv = pScreen->devPrivates[PclScreenPrivateIndex].ptr;
+ PclScreenPrivPtr pPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
pScreen->CloseScreen = pPriv->CloseScreen;
xfree( pPriv );
@@ -157,8 +158,8 @@ InitializePclDriver(
*/
AllocatePclPrivates(pScreen);
- pPriv =
- (PclScreenPrivPtr)pScreen->devPrivates[PclScreenPrivateIndex].ptr;
+ pPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
maxDim = MAX( pScreen->height, pScreen->width );
xRes = pScreen->width / ( pScreen->mmWidth / 25.4 );
@@ -258,33 +259,13 @@ InitializePclDriver(
static void
AllocatePclPrivates(ScreenPtr pScreen)
{
- static unsigned long PclGeneration = 0;
+ dixRequestPrivate(PclWindowPrivateKey, sizeof( PclWindowPrivRec ) );
+ dixRequestPrivate(PclContextPrivateKey, sizeof( PclContextPrivRec ) );
+ dixRequestPrivate(PclGCPrivateKey, sizeof( PclGCPrivRec ) );
+ dixRequestPrivate(PclPixmapPrivateKey, sizeof( PclPixmapPrivRec ) );
- if((unsigned long) PclGeneration != serverGeneration)
- {
- PclScreenPrivateIndex = AllocateScreenPrivateIndex();
-
- PclWindowPrivateIndex = AllocateWindowPrivateIndex();
- AllocateWindowPrivate( pScreen, PclWindowPrivateIndex,
- sizeof( PclWindowPrivRec ) );
-
- PclContextPrivateIndex = XpAllocateContextPrivateIndex();
- XpAllocateContextPrivate( PclContextPrivateIndex,
- sizeof( PclContextPrivRec ) );
-
- PclGCPrivateIndex = AllocateGCPrivateIndex();
- AllocateGCPrivate( pScreen, PclGCPrivateIndex,
- sizeof( PclGCPrivRec ) );
-
- PclPixmapPrivateIndex = AllocatePixmapPrivateIndex();
- AllocatePixmapPrivate( pScreen, PclPixmapPrivateIndex,
- sizeof( PclPixmapPrivRec ) );
-
- PclGeneration = serverGeneration;
- }
-
- pScreen->devPrivates[PclScreenPrivateIndex].ptr = (pointer)xalloc(
- sizeof(PclScreenPrivRec));
+ dixSetPrivate(&pScreen->devPrivates, PclScreenPrivateKey,
+ xalloc(sizeof(PclScreenPrivRec)));
}
/*
@@ -347,8 +328,8 @@ PclInitContext(XpContextPtr pCon)
/*
* Set up the context privates
*/
- pConPriv =
- (PclContextPrivPtr)pCon->devPrivates[PclContextPrivateIndex].ptr;
+ pConPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
pConPriv->jobFileName = (char *)NULL;
pConPriv->pageFileName = (char *)NULL;
@@ -481,7 +462,7 @@ static Bool
PclDestroyContext(XpContextPtr pCon)
{
PclContextPrivPtr pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
PclPaletteMapPtr p, t;
PclCmapToContexts *pCmap;
ScreenPtr screen;
@@ -539,7 +520,8 @@ PclDestroyContext(XpContextPtr pCon)
* Remove the context from the screen-level colormap<->contexts mappings
*/
screen = screenInfo.screens[pCon->screenNum];
- sPriv = (PclScreenPrivPtr)screen->devPrivates[PclScreenPrivateIndex].ptr;
+ sPriv = (PclScreenPrivPtr)
+ dixLookupPrivate(&screen->devPrivates, PclScreenPrivateKey);
pCmap = sPriv->colormaps;
while( pCmap )
{
@@ -581,8 +563,8 @@ PclGetContextFromWindow(WindowPtr win)
while( win )
{
- pPriv =
- (PclWindowPrivPtr)win->devPrivates[PclWindowPrivateIndex].ptr;
+ pPriv = (PclWindowPrivPtr)
+ dixLookupPrivate(&win->devPrivates, PclWindowPrivateKey);
if( pPriv->validContext )
return pPriv->context;
diff --git a/hw/xprint/pcl/PclLine.c b/hw/xprint/pcl/PclLine.c
index 52a586d17..68d55a525 100644
--- a/hw/xprint/pcl/PclLine.c
+++ b/hw/xprint/pcl/PclLine.c
@@ -107,7 +107,7 @@ PclPolyLine(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Allocate the storage required to deal with the clipping
@@ -223,7 +223,7 @@ PclPolySegment(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Allocate the storage for the temporary regions.
diff --git a/hw/xprint/pcl/PclPixel.c b/hw/xprint/pcl/PclPixel.c
index f41af272f..d219838f0 100644
--- a/hw/xprint/pcl/PclPixel.c
+++ b/hw/xprint/pcl/PclPixel.c
@@ -125,13 +125,15 @@ PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints )
if( pDrawable->type == DRAWABLE_WINDOW )
{
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
- cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr;
+ cPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
cPriv->changeMask = GCLineWidth | GCLineStyle;
}
else
{
- pPriv =
- ((PixmapPtr)pDrawable)->devPrivates[PclPixmapPrivateIndex].ptr;
+ pPriv = (PclPixmapPrivPtr)
+ dixLookupPrivate(&((PixmapPtr)pDrawable)->devPrivates,
+ PclPixmapPrivateKey);
pPriv->changeMask = GCLineWidth | GCLineStyle;
}
#endif
diff --git a/hw/xprint/pcl/PclPolygon.c b/hw/xprint/pcl/PclPolygon.c
index 9867758bb..7d95d6484 100644
--- a/hw/xprint/pcl/PclPolygon.c
+++ b/hw/xprint/pcl/PclPolygon.c
@@ -76,7 +76,7 @@ PclPolyRectangle(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Allocate the storage required to deal with the clipping
@@ -170,7 +170,7 @@ PclFillPolygon(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Generate the PCL code to draw the filled polygon, by defining
@@ -283,7 +283,7 @@ PclPolyFillRect(
pCon = PclGetContextFromWindow( (WindowPtr) pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
/*
* Allocate the storage required to deal with the clipping
diff --git a/hw/xprint/pcl/PclPrint.c b/hw/xprint/pcl/PclPrint.c
index 176a0025a..ac8ea1537 100644
--- a/hw/xprint/pcl/PclPrint.c
+++ b/hw/xprint/pcl/PclPrint.c
@@ -72,8 +72,8 @@ PclStartJob(
Bool sendClientData,
ClientPtr client)
{
- PclContextPrivPtr pConPriv =
- (PclContextPrivPtr)pCon->devPrivates[PclContextPrivateIndex].ptr;
+ PclContextPrivPtr pConPriv = (PclContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
PclPaletteMap *pal;
/*
@@ -130,7 +130,7 @@ PclEndJob(
Bool cancel)
{
PclContextPrivPtr priv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
#ifdef CCP_DEBUG
FILE *xpoutput;
@@ -250,9 +250,9 @@ PclStartPage(
WindowPtr pWin)
{
PclContextPrivPtr pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
- PclWindowPrivPtr pWinPriv =
- (PclWindowPrivPtr)pWin->devPrivates[PclWindowPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
+ PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr)
+ dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
xRectangle repro;
char t[80];
XpOid orient, plex, tray, medium;
@@ -488,7 +488,7 @@ PclEndPage(
WindowPtr pWin)
{
PclContextPrivPtr pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
struct stat statBuf;
@@ -532,7 +532,7 @@ PclStartDoc(XpContextPtr pCon,
XPDocumentType type)
{
PclContextPrivPtr pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
#ifndef XP_PCL_LJ3
/*
@@ -592,7 +592,7 @@ PclDocumentData(
{
int type = 0;
PclContextPrivPtr pPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
XpOidDocFmtList *formats;
XpOidDocFmt *f;
char t[80];
@@ -700,7 +700,7 @@ PclGetDocumentData(
int maxBufferSize)
{
PclContextPrivPtr pPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
pPriv->getDocClient = client;
pPriv->getDocBufSize = maxBufferSize;
diff --git a/hw/xprint/pcl/PclText.c b/hw/xprint/pcl/PclText.c
index 246c0195b..324de3014 100644
--- a/hw/xprint/pcl/PclText.c
+++ b/hw/xprint/pcl/PclText.c
@@ -123,7 +123,7 @@ char font_type;
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
pSoftFontInfo = pConPriv->pSoftFontInfo;
font_type = isInternal(pGC->font);
if ( font_type == DOWNLOAD_FONT ) {
@@ -293,7 +293,7 @@ char font_type;
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
pConPriv = (PclContextPrivPtr)
- pCon->devPrivates[PclContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey);
pSoftFontInfo = pConPriv->pSoftFontInfo;
font_type = isInternal(pGC->font);
diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c
index f34ad7feb..a87dc0e7a 100644
--- a/hw/xprint/pcl/PclWindow.c
+++ b/hw/xprint/pcl/PclWindow.c
@@ -97,9 +97,9 @@ PclCreateWindow(
Bool status = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
PclScreenPrivPtr pScreenPriv = (PclScreenPrivPtr)
- pScreen->devPrivates[PclScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey);
PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr)
- pWin->devPrivates[PclWindowPrivateIndex].ptr;
+ dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
/*
* Initialize this window's private struct.
@@ -142,7 +142,8 @@ PclCreateWindow(
/*
* Invalidate the window's private print context.
*/
- pPriv = (PclWindowPrivPtr)pWin->devPrivates[PclWindowPrivateIndex].ptr;
+ pPriv = (PclWindowPrivPtr)
+ dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey);
pPriv->validContext = 0;
return TRUE;
diff --git a/hw/xprint/pcl/Pclmap.h b/hw/xprint/pcl/Pclmap.h
index 3990ab294..18ac31d90 100644
--- a/hw/xprint/pcl/Pclmap.h
+++ b/hw/xprint/pcl/Pclmap.h
@@ -82,11 +82,11 @@ copyright holders.
#define InitializePclDriver CATNAME(Initialize, PclDriver)
#define PclCloseScreen PCLNAME(CloseScreen)
#define PclGetContextFromWindow PCLNAME(GetContextFromWindow)
-#define PclScreenPrivateIndex PCLNAME(ScreenPrivateIndex)
-#define PclWindowPrivateIndex PCLNAME(WindowPrivateIndex)
-#define PclContextPrivateIndex PCLNAME(ContextPrivateIndex)
-#define PclPixmapPrivateIndex PCLNAME(PixmapPrivateIndex)
-#define PclGCPrivateIndex PCLNAME(GCPrivateIndex)
+#define PclScreenPrivateKey PCLNAME(ScreenPrivateKey)
+#define PclWindowPrivateKey PCLNAME(WindowPrivateKey)
+#define PclContextPrivateKey PCLNAME(ContextPrivateKey)
+#define PclPixmapPrivateKey PCLNAME(PixmapPrivateKey)
+#define PclGCPrivateKey PCLNAME(GCPrivateKey)
/* PclPrint.c */
#define PclStartJob PCLNAME(StartJob)
diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h
index 5e77d9a0a..a25e9891a 100644
--- a/hw/xprint/ps/Ps.h
+++ b/hw/xprint/ps/Ps.h
@@ -121,10 +121,10 @@ typedef char *XPointer;
* Public index variables from PsInit.c
*/
-extern int PsScreenPrivateIndex;
-extern int PsWindowPrivateIndex;
-extern int PsContextPrivateIndex;
-extern int PsPixmapPrivateIndex;
+extern DevPrivateKey PsScreenPrivateKey;
+extern DevPrivateKey PsWindowPrivateKey;
+extern DevPrivateKey PsContextPrivateKey;
+extern DevPrivateKey PsPixmapPrivateKey;
extern XpValidatePoolsRec PsValidatePoolsRec;
/*
diff --git a/hw/xprint/ps/PsGC.c b/hw/xprint/ps/PsGC.c
index 3ec07a77a..19898c90e 100644
--- a/hw/xprint/ps/PsGC.c
+++ b/hw/xprint/ps/PsGC.c
@@ -162,9 +162,11 @@ PsGetDrawablePrivateStuff(
c = wColormap((WindowPtr)pDrawable);
cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP);
- cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr;
+ cPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
sPriv = (PsScreenPrivPtr)
- pDrawable->pScreen->devPrivates[PsScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pDrawable->pScreen->devPrivates,
+ PsScreenPrivateKey);
*gc = cPriv->lastGC;
*valid = cPriv->validGC;
*psOut = cPriv->pPsOut;
@@ -189,7 +191,8 @@ PsGetPsContextPriv( DrawablePtr pDrawable )
pCon = PsGetContextFromWindow((WindowPtr)pDrawable);
if (pCon != NULL)
{
- return pCon->devPrivates[PsContextPrivateIndex].ptr;
+ return (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
}
}
return NULL;
@@ -257,8 +260,9 @@ PsUpdateDrawableGC(
PsOut_Offset(*psOut, pDrawable->x, pDrawable->y);
PsOut_Clip(*psOut, pGC->clientClipType, (PsClipPtr)pGC->clientClip);
}
- cPriv = ( PsGetContextFromWindow( (WindowPtr)pDrawable ) )
- ->devPrivates[PsContextPrivateIndex].ptr;
+ cPriv = (PsContextPrivPtr)dixLookupPrivate(
+ &PsGetContextFromWindow((WindowPtr)pDrawable)->devPrivates,
+ PsContextPrivateKey);
break;
}
return TRUE;
diff --git a/hw/xprint/ps/PsInit.c b/hw/xprint/ps/PsInit.c
index 6d4bd06f3..72bd7bd7c 100644
--- a/hw/xprint/ps/PsInit.c
+++ b/hw/xprint/ps/PsInit.c
@@ -97,10 +97,10 @@ static void AllocatePsPrivates(ScreenPtr pScreen);
static int PsInitContext(XpContextPtr pCon);
static int PsDestroyContext(XpContextPtr pCon);
-int PsScreenPrivateIndex;
-int PsContextPrivateIndex;
-int PsPixmapPrivateIndex;
-int PsWindowPrivateIndex;
+DevPrivateKey PsScreenPrivateKey = &PsScreenPrivateKey;
+DevPrivateKey PsContextPrivateKey = &PsContextPrivateKey;
+DevPrivateKey PsPixmapPrivateKey = &PsPixmapPrivateKey;
+DevPrivateKey PsWindowPrivateKey = &PsWindowPrivateKey;
#ifdef GLXEXT
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
@@ -152,7 +152,8 @@ InitializePsDriver(ndx, pScreen, argc, argv)
AllocatePsPrivates(pScreen);
#if 0
- pPriv = (PsScreenPrivPtr)pScreen->devPrivates[PsScreenPrivateIndex].ptr;
+ pPriv = (PsScreenPrivPtr)
+ dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey);
pPriv->resDB = rmdb;
#endif
@@ -474,28 +475,12 @@ InitializePsDriver(ndx, pScreen, argc, argv)
static void
AllocatePsPrivates(ScreenPtr pScreen)
{
- static unsigned long PsGeneration = 0;
+ dixRequestPrivate(PsWindowPrivateKey, sizeof(PsWindowPrivRec));
+ dixRequestPrivate(PsContextPrivateKey, sizeof(PsContextPrivRec));
+ dixRequestPrivate(PsPixmapPrivateKey, sizeof(PsPixmapPrivRec));
- if((unsigned long)PsGeneration != serverGeneration)
- {
- PsScreenPrivateIndex = AllocateScreenPrivateIndex();
-
- PsWindowPrivateIndex = AllocateWindowPrivateIndex();
- AllocateWindowPrivate(pScreen, PsWindowPrivateIndex,
- sizeof(PsWindowPrivRec));
-
- PsContextPrivateIndex = XpAllocateContextPrivateIndex();
- XpAllocateContextPrivate(PsContextPrivateIndex,
- sizeof(PsContextPrivRec));
-
- PsPixmapPrivateIndex = AllocatePixmapPrivateIndex();
- AllocatePixmapPrivate(pScreen, PsPixmapPrivateIndex,
- sizeof(PsPixmapPrivRec));
-
- PsGeneration = serverGeneration;
- }
- pScreen->devPrivates[PsScreenPrivateIndex].ptr =
- (pointer)xalloc(sizeof(PsScreenPrivRec));
+ dixSetPrivate(&pScreen->devPrivates, PsScreenPrivateKey,
+ xalloc(sizeof(PsScreenPrivRec)));
}
/*
@@ -550,8 +535,8 @@ PsInitContext(pCon)
/*
* Set up the context privates
*/
- pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
memset(pConPriv, 0, sizeof(PsContextPrivRec));
pConPriv->jobFileName = (char *)NULL;
@@ -620,8 +605,8 @@ static Bool
PsDestroyContext(pCon)
XpContextPtr pCon;
{
- PsContextPrivPtr pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ PsContextPrivPtr pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
if( pConPriv->pJobFile!=(FILE *)NULL )
{
@@ -653,7 +638,8 @@ PsGetContextFromWindow(win)
while( win )
{
- pPriv = (PsWindowPrivPtr)win->devPrivates[PsWindowPrivateIndex].ptr;
+ pPriv = (PsWindowPrivPtr)
+ dixLookupPrivate(&win->devPrivates, PsWindowPrivateKey);
if( pPriv->validContext ) return pPriv->context;
win = win->parent;
}
diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c
index d3ab198f8..a588f4276 100644
--- a/hw/xprint/ps/PsPixmap.c
+++ b/hw/xprint/ps/PsPixmap.c
@@ -79,6 +79,7 @@ in this Software without prior written authorization from The Open Group.
#include "windowstr.h"
#include "gcstruct.h"
+#include "privates.h"
#include "Ps.h"
@@ -111,6 +112,7 @@ PsCreatePixmap(
pPixmap->drawable.height = height;
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
+ pPixmap->devPrivates = NULL;
pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec));
if( !pPixmap->devPrivate.ptr )
@@ -197,6 +199,7 @@ PsDestroyPixmap(PixmapPtr pPixmap)
PsScrubPixmap(pPixmap);
xfree(priv);
+ dixFreePrivates(pPixmap->devPrivates);
xfree(pPixmap);
return TRUE;
}
diff --git a/hw/xprint/ps/PsPrint.c b/hw/xprint/ps/PsPrint.c
index 4571c07d7..386646858 100644
--- a/hw/xprint/ps/PsPrint.c
+++ b/hw/xprint/ps/PsPrint.c
@@ -165,8 +165,8 @@ PsStartJob(
Bool sendClientData,
ClientPtr client)
{
- PsContextPrivPtr pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ PsContextPrivPtr pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
/*
* Create a temporary file to store the printer output.
@@ -191,8 +191,8 @@ PsEndJob(
struct stat buffer;
int error;
- PsContextPrivPtr priv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ PsContextPrivPtr priv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
if (cancel == True) {
if (priv->getDocClient != (ClientPtr) NULL) {
@@ -291,10 +291,10 @@ PsStartPage(
{
int iorient, iplex, icount, ires;
unsigned short iwd, iht;
- PsContextPrivPtr pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
- PsWindowPrivPtr pWinPriv =
- (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr;
+ PsContextPrivPtr pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
+ PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)
+ dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
/*
* Put a pointer to the context in the window private structure
@@ -337,10 +337,10 @@ PsEndPage(
XpContextPtr pCon,
WindowPtr pWin)
{
- PsWindowPrivPtr pWinPriv =
- (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr;
- PsContextPrivPtr pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)
+ dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
+ PsContextPrivPtr pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
PsOut_EndPage(pConPriv->pPsOut);
@@ -366,8 +366,8 @@ PsStartDoc(XpContextPtr pCon, XPDocumentType type)
int iorient, iplex, icount, ires;
unsigned short iwd, iht;
char *title;
- PsContextPrivPtr pConPriv =
- (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr;
+ PsContextPrivPtr pConPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
/* get job level attributes */
title = XpGetOneAttribute(pCon, XPJobAttr, "job-name");
@@ -420,7 +420,8 @@ PsDocumentData(
len_opt)
return BadValue;
- cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr;
+ cPriv = (PsContextPrivPtr)
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
psOut = cPriv->pPsOut;
if (pDraw)
@@ -448,7 +449,7 @@ PsGetDocumentData(
int maxBufferSize)
{
PsContextPrivPtr pPriv = (PsContextPrivPtr)
- pCon->devPrivates[PsContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey);
pPriv->getDocClient = client;
pPriv->getDocBufSize = maxBufferSize;
diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c
index ded7dd638..d17cf8ce0 100644
--- a/hw/xprint/ps/PsWindow.c
+++ b/hw/xprint/ps/PsWindow.c
@@ -123,9 +123,9 @@ PsCreateWindow(WindowPtr pWin)
Bool status = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
PsScreenPrivPtr pScreenPriv = (PsScreenPrivPtr)
- pScreen->devPrivates[PsScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey);
PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)
- pWin->devPrivates[PsWindowPrivateIndex].ptr;
+ dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
/*
* Initialize this window's private struct.
@@ -165,7 +165,8 @@ PsCreateWindow(WindowPtr pWin)
return status;
#endif
- pPriv = (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr;
+ pPriv = (PsWindowPrivPtr)
+ dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey);
pPriv->validContext = 0;
return TRUE;
diff --git a/hw/xprint/raster/Raster.c b/hw/xprint/raster/Raster.c
index 0286a18fa..dccef613c 100644
--- a/hw/xprint/raster/Raster.c
+++ b/hw/xprint/raster/Raster.c
@@ -151,8 +151,8 @@ static int RasterReproducibleArea(XpContextPtr pCon,
#define DOC_PCL 1
#define DOC_RASTER 2
-static int RasterScreenPrivateIndex, RasterContextPrivateIndex;
-static int RasterGeneration = 0;
+static DevPrivateKey RasterScreenPrivateKey = &RasterScreenPrivateKey;
+static DevPrivateKey RasterContextPrivateKey = &RasterContextPrivateKey;
static char RASTER_DRIV_NAME[] = "XP-RASTER";
static int doc_type = DOC_RASTER;
@@ -205,7 +205,7 @@ InitializeRasterDriver(
AllocateRasterPrivates(pScreen);
pPriv = (RasterScreenPrivPtr)
- pScreen->devPrivates[RasterScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
maxDim = MAX( pScreen->height, pScreen->width );
numBytes = maxDim + BITMAP_SCANLINE_PAD - 1; /* pixels per row */
@@ -252,7 +252,7 @@ GetPropString(
char *propName)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
char *type;
XrmValue val;
struct stat status;
@@ -371,7 +371,7 @@ StartJob(
ClientPtr client)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
SetDocumentType( pCon );
@@ -488,7 +488,7 @@ EndJob(
Bool cancel)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
if( cancel == True )
{
@@ -549,7 +549,7 @@ StartPage(
WindowPtr pWin)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
if(pConPriv->pPageFile != (FILE *)NULL)
{
@@ -830,7 +830,7 @@ SendPage( XpContextPtr pCon )
{
struct stat statBuf;
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
if(stat(pConPriv->pageFileName, &statBuf) < 0)
return BadAlloc;
@@ -872,7 +872,7 @@ EndPage(
WindowPtr pWin)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
struct stat statBuf;
char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL;
FILE *pRasterFile = (FILE *)NULL;
@@ -1068,7 +1068,7 @@ DocumentData(
ClientPtr client)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
char *preRasterStr = PRE_RASTER, *postRasterStr = POST_RASTER,
*noRasterStr = NO_RASTER;
@@ -1135,7 +1135,7 @@ GetDocumentData(
int maxBufferSize)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pContext->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pContext->devPrivates, RasterContextPrivateKey);
pConPriv->getDocClient = client;
pConPriv->getDocBufSize = maxBufferSize;
@@ -1146,17 +1146,9 @@ static void
AllocateRasterPrivates(
ScreenPtr pScreen)
{
- if(RasterGeneration != serverGeneration)
- {
- RasterScreenPrivateIndex = AllocateScreenPrivateIndex();
- RasterContextPrivateIndex = XpAllocateContextPrivateIndex();
- XpAllocateContextPrivate( RasterContextPrivateIndex,
- sizeof( RasterContextPrivRec ) );
-
- RasterGeneration = serverGeneration;
- }
- pScreen->devPrivates[RasterScreenPrivateIndex].ptr = (pointer)Xalloc(
- sizeof(RasterScreenPrivRec));
+ dixRequestPrivate(RasterContextPrivateKey, sizeof( RasterContextPrivRec ) );
+ dixSetPrivate(&pScreen->devPrivates, RasterScreenPrivateKey,
+ Xalloc(sizeof(RasterScreenPrivRec)));
}
/*
@@ -1171,7 +1163,7 @@ RasterChangeWindowAttributes(
Bool status = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr)
- pScreen->devPrivates[RasterScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
if(pWin->backingStore == NotUseful)
{
@@ -1270,7 +1262,7 @@ RasterInitContext(
* Set up the context privates
*/
pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
pConPriv->jobFileName = (char *)NULL;
pConPriv->pageFileName = (char *)NULL;
@@ -1355,7 +1347,7 @@ RasterDestroyContext(
XpContextPtr pCon)
{
RasterContextPrivPtr pConPriv = (RasterContextPrivPtr)
- pCon->devPrivates[RasterContextPrivateIndex].ptr;
+ dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey);
/*
* Clean up the temporary files
@@ -1477,7 +1469,7 @@ RasterCloseScreen(
{
Bool status = Success;
RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr)
- pScreen->devPrivates[RasterScreenPrivateIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey);
/*
* Call any wrapped CloseScreen proc.
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
new file mode 100644
index 000000000..831ba49f4
--- /dev/null
+++ b/hw/xquartz/Makefile.am
@@ -0,0 +1,54 @@
+noinst_LTLIBRARIES = libXquartz.la
+AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CPPFLAGS = \
+ -DBUILD_DATE=\"$(BUILD_DATE)\" \
+ -DINXQUARTZ \
+ -DUSE_NEW_CLUT \
+ -DXFree86Server \
+ -I$(top_srcdir)/miext/rootless
+
+if X11APP
+X11APP_SUBDIRS = bundle
+endif
+
+SUBDIRS = . xpr $(X11APP_SUBDIRS)
+DIST_SUBDIRS = xpr bundle
+
+libXquartz_la_SOURCES = \
+ $(top_srcdir)/fb/fbcmap.c \
+ $(top_srcdir)/mi/miinitext.c \
+ X11Application.m \
+ X11Controller.m \
+ applewm.c \
+ darwin.c \
+ darwinEvents.c \
+ darwinKeyboard.c \
+ darwinXinput.c \
+ keysym2ucs.c \
+ pseudoramiX.c \
+ quartz.c \
+ quartzAudio.c \
+ quartzCocoa.m \
+ quartzForeground.c \
+ quartzKeyboard.c \
+ quartzPasteboard.c \
+ quartzStartup.c
+
+EXTRA_DIST = \
+ X11Application.h \
+ X11Controller.h \
+ applewmExt.h \
+ darwinClut8.h \
+ darwin.h \
+ darwinEvents.h \
+ darwinKeyboard.h \
+ keysym2ucs.h \
+ pseudoramiX.h \
+ quartz.h \
+ quartzAudio.h \
+ quartzCommon.h \
+ quartzCursor.c \
+ quartzCursor.h \
+ quartzForeground.h \
+ quartzKeyboard.h \
+ quartzPasteboard.h
diff --git a/hw/darwin/apple/X11Application.h b/hw/xquartz/X11Application.h
index 861565798..a1be7514a 100644
--- a/hw/darwin/apple/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -64,40 +64,38 @@ extern X11Application *X11App;
#endif /* __OBJC__ */
-extern void X11ApplicationSetWindowMenu (int nitems, const char **items,
+void X11ApplicationSetWindowMenu (int nitems, const char **items,
const char *shortcuts);
-extern void X11ApplicationSetWindowMenuCheck (int idx);
-extern void X11ApplicationSetFrontProcess (void);
-extern void X11ApplicationSetCanQuit (int state);
-extern void X11ApplicationServerReady (void);
-extern void X11ApplicationShowHideMenubar (int state);
+void X11ApplicationSetWindowMenuCheck (int idx);
+void X11ApplicationSetFrontProcess (void);
+void X11ApplicationSetCanQuit (int state);
+void X11ApplicationServerReady (void);
+void X11ApplicationShowHideMenubar (int state);
-extern void X11ApplicationMain (int argc, const char *argv[],
- void (*server_thread) (void *),
- void *server_arg);
+void X11ApplicationMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg);
extern int X11EnableKeyEquivalents;
extern int quartzHasRoot, quartzEnableRootless;
#define APP_PREFS "org.x.X11"
-#define PREFS_APPSMENU "apps_menu"
-#define PREFS_FAKEBUTTONS "enable_fake_buttons"
-#define PREFS_SYSBEEP "enable_system_beep"
-#define PREFS_KEYEQUIVS "enable_key_equivalents"
-#define PREFS_KEYMAP_FILE "keymap_file"
-#define PREFS_SYNC_KEYMAP "sync_keymap"
-#define PREFS_DEPTH "depth"
-#define PREFS_NO_AUTH "no_auth"
-#define PREFS_NO_TCP "nolisten_tcp"
-#define PREFS_DONE_XINIT_CHECK "done_xinit_check"
-#define PREFS_NO_QUIT_ALERT "no_quit_alert"
-#define PREFS_FAKE_BUTTON2 "fake_button2"
-#define PREFS_FAKE_BUTTON3 "fake_button3"
-#define PREFS_ROOTLESS "rootless"
-#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
-#define PREFS_SWAP_ALT_META "swap_alt_meta"
-#define PREFS_XP_OPTIONS "xp_options"
-#define PREFS_ENABLE_STEREO "enable_stereo"
+#define PREFS_APPSMENU "apps_menu"
+#define PREFS_FAKEBUTTONS "enable_fake_buttons"
+#define PREFS_SYSBEEP "enable_system_beep"
+#define PREFS_KEYEQUIVS "enable_key_equivalents"
+#define PREFS_KEYMAP_FILE "keymap_file"
+#define PREFS_SYNC_KEYMAP "sync_keymap"
+#define PREFS_DEPTH "depth"
+#define PREFS_NO_AUTH "no_auth"
+#define PREFS_NO_TCP "nolisten_tcp"
+#define PREFS_DONE_XINIT_CHECK "done_xinit_check"
+#define PREFS_NO_QUIT_ALERT "no_quit_alert"
+#define PREFS_FAKE_BUTTON2 "fake_button2"
+#define PREFS_FAKE_BUTTON3 "fake_button3"
+#define PREFS_ROOTLESS "rootless"
+#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
+#define PREFS_SWAP_ALT_META "swap_alt_meta"
+#define PREFS_XP_OPTIONS "xp_options"
+#define PREFS_ENABLE_STEREO "enable_stereo"
#endif /* X11APPLICATION_H */
diff --git a/hw/darwin/apple/X11Application.m b/hw/xquartz/X11Application.m
index 6b235ad0b..56db2c477 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -27,7 +27,12 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
-#include "../quartz/quartzCommon.h"
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "quartzCommon.h"
+#include "quartzForeground.h"
#import "X11Application.h"
#include <Carbon/Carbon.h>
@@ -35,7 +40,8 @@
/* ouch! */
#define BOOL X_BOOL
# include "darwin.h"
-# include "../quartz/quartz.h"
+# include "darwinEvents.h"
+# include "quartz.h"
# define _APPLEWM_SERVER_
# include "X11/extensions/applewm.h"
# include "micmap.h"
@@ -45,14 +51,17 @@
#include <unistd.h>
#include <pthread.h>
+#include "rootlessCommon.h"
+
+WindowPtr xprGetXWindowFromAppKit(int windowNumber); // xpr/xprFrame.c
+
#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
int X11EnableKeyEquivalents = TRUE;
int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
extern int darwinFakeButtons, input_check_flag;
-// extern Bool enable_stereo;
-Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed
+extern Bool enable_stereo;
extern xEvent *darwinEvents;
@@ -74,8 +83,8 @@ static mach_port_t _port;
static void send_nsevent (NSEventType type, NSEvent *e);
/* Quartz mode initialization routine. This is often dynamically loaded
- but is statically linked into this X server. */
-extern Bool QuartzModeBundleInit(void);
+ but is statically linked into this X server. */
+Bool QuartzModeBundleInit(void);
static void init_ports (void) {
kern_return_t r;
@@ -144,7 +153,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
- [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.3", tem]
+ [dict setObject:[NSString stringWithFormat:@"XQuartz %@ - (xorg-server %s)", tem, XSERVER_VERSION]
forKey:@"ApplicationVersion"];
[self orderFrontStandardAboutPanelWithOptions: dict];
@@ -183,116 +192,113 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
}
- (void) sendEvent:(NSEvent *)e {
- NSEventType type;
- BOOL for_appkit, for_x;
-
- type = [e type];
-
- /* By default pass down the responder chain and to X. */
- for_appkit = YES;
- for_x = YES;
-
- switch (type) {
- case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
- case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
- if ([e window] != nil) {
- /* Pointer event has a window. Probably something for the kit. */
-
- for_x = NO;
-
- if (_x_active) [self activateX:NO];
- } else if ([self modalWindow] == nil) {
- /* Must be an X window. Tell appkit it doesn't have focus. */
-
- for_appkit = NO;
+ NSEventType type;
+ BOOL for_appkit, for_x;
+
+ type = [e type];
+
+ /* By default pass down the responder chain and to X. */
+ for_appkit = YES;
+ for_x = YES;
+
+ switch (type) {
+ case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
+ case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
+ if ([e window] != nil) {
+ /* Pointer event has an (AppKit) window. Probably something for the kit. */
+ for_x = NO;
+ if (_x_active) [self activateX:NO];
+ } else if ([self modalWindow] == nil) {
+ /* Must be an X window. Tell appkit it doesn't have focus. */
+ WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
+ if (pWin) RootlessReorderWindow(pWin);
+ for_appkit = NO;
+
+ if ([self isActive]) {
+ [self deactivate];
- if ([self isActive]) {
- [self deactivate];
-
- if (!_x_active && quartzProcs->IsX11Window([e window], [e windowNumber]))
- [self activateX:YES];
- }
+ if (!_x_active && quartzProcs->IsX11Window([e window],
+ [e windowNumber]))
+ [self activateX:YES];
}
- break;
+ }
+ break;
- case NSKeyDown: case NSKeyUp:
- if (_x_active) {
- static int swallow_up;
-
- /* No kit window is focused, so send it to X. */
-
- for_appkit = NO;
-
- if (type == NSKeyDown) {
- /* Before that though, see if there are any global
- shortcuts bound to it. */
-
- if (X11EnableKeyEquivalents
- && [[self mainMenu] performKeyEquivalent:e]) {
- swallow_up = [e keyCode];
- for_x = NO;
- } else if (!quartzEnableRootless
+ case NSKeyDown: case NSKeyUp:
+ if (_x_active) {
+ static int swallow_up;
+
+ /* No kit window is focused, so send it to X. */
+ for_appkit = NO;
+ if (type == NSKeyDown) {
+ /* Before that though, see if there are any global
+ shortcuts bound to it. */
+
+ if (X11EnableKeyEquivalents
+ && [[self mainMenu] performKeyEquivalent:e]) {
+ swallow_up = [e keyCode];
+ for_x = NO;
+ } else if (!quartzEnableRootless
&& ([e modifierFlags] & ALL_KEY_MASKS)
== (NSCommandKeyMask | NSAlternateKeyMask)
&& ([e keyCode] == 0 /*a*/
- || [e keyCode] == 53 /*Esc*/)) {
- swallow_up = 0;
- for_x = NO;
+ || [e keyCode] == 53 /*Esc*/)) {
+ swallow_up = 0;
+ for_x = NO;
#ifdef DARWIN_DDX_MISSING
- QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
+ QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
#endif
- }
- } else {
- /* If we saw a key equivalent on the down, don't pass
- the up through to X. */
-
- if (swallow_up != 0 && [e keyCode] == swallow_up) {
- swallow_up = 0;
- for_x = NO;
- }
}
- }
- else for_x = NO;
- break;
-
- case NSFlagsChanged:
- /* For the l33t X users who remap modifier keys to normal keysyms. */
- if (!_x_active)
- for_x = NO;
- break;
-
- case NSAppKitDefined:
- switch ([e subtype]) {
- case NSApplicationActivatedEventType:
- for_x = NO;
- if ([self modalWindow] == nil) {
- for_appkit = NO;
-
- /* FIXME: hack to avoid having to pass the event to appkit,
- which would cause it to raise one of its windows. */
- _appFlags._active = YES;
-
- [self activateX:YES];
- if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
+ } else {
+ /* If we saw a key equivalent on the down, don't pass
+ the up through to X. */
+
+ if (swallow_up != 0 && [e keyCode] == swallow_up) {
+ swallow_up = 0;
+ for_x = NO;
}
- break;
-
- case 18: /* ApplicationDidReactivate */
- if (quartzHasRoot) for_appkit = NO;
- break;
-
- case NSApplicationDeactivatedEventType:
- for_x = NO;
- [self activateX:NO];
- break;
+ }
+ } else for_x = NO;
+ break;
+
+ case NSFlagsChanged:
+ /* For the l33t X users who remap modifier keys to normal keysyms. */
+ if (!_x_active) for_x = NO;
+ break;
+
+ case NSAppKitDefined:
+ switch ([e subtype]) {
+ case NSApplicationActivatedEventType:
+ for_x = NO;
+ if ([self modalWindow] == nil) {
+ for_appkit = NO;
+
+ /* FIXME: hack to avoid having to pass the event to appkit,
+ which would cause it to raise one of its windows. */
+ _appFlags._active = YES;
+
+ [self activateX:YES];
+ if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
}
break;
- default: break; /* for gcc */
+ case 18: /* ApplicationDidReactivate */
+ if (quartzHasRoot) for_appkit = NO;
+ break;
+
+ case NSApplicationDeactivatedEventType:
+ for_x = NO;
+ [self activateX:NO];
+ break;
}
-
- if (for_appkit) [super sendEvent:e];
- if (for_x) send_nsevent (type, e);
+ break;
+
+ default: break; /* for gcc */
+ }
+
+ if (for_appkit) [super sendEvent:e];
+
+ if (for_x) send_nsevent (type, e);
}
- (void) set_window_menu:(NSArray *)list {
@@ -308,9 +314,6 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
}
- (void) set_front_process:unused {
- [NSApp activateIgnoringOtherApps:YES];
-
- if ([self modalWindow] == nil) [self activateX:YES];
QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
}
@@ -517,7 +520,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
else if (CFGetTypeID (value) == CFBooleanGetTypeID ())
ret = CFBooleanGetValue (value);
else if (CFGetTypeID (value) == CFStringGetTypeID ()) {
- const char *tem = [(NSString *) value lossyCString];
+ const char *tem = [(NSString *) value UTF8String];
if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0)
ret = YES;
else
@@ -596,52 +599,48 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
}
-- (void) read_defaults {
- const char *tem;
-
- quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
- default:quartzUseSysBeep];
- quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
- default:quartzEnableRootless];
+- (void) read_defaults
+{
+ const char *tem;
+
+ quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
+ default:quartzUseSysBeep];
+ quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
+ default:quartzEnableRootless];
#ifdef DARWIN_DDX_MISSING
- quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
- @PREFS_FULLSCREEN_HOTKEYS default:
- !quartzFullscreenDisableHotkeys];
- quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS
- default:quartzXpluginOptions];
+ quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
+ @PREFS_FULLSCREEN_HOTKEYS default:
+ !quartzFullscreenDisableHotkeys];
+ quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS
+ default:quartzXpluginOptions];
#endif
-
- darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META
- default:darwinSwapAltMeta];
- darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
- default:darwinFakeButtons];
- if (darwinFakeButtons) {
- const char *fake2, *fake3;
-
- fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
- fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
-
- if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
- if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
-
- }
+ darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
+ default:darwinFakeButtons];
+ if (darwinFakeButtons) {
+ const char *fake2, *fake3;
+
+ fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
+ fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
+
+ if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
+ if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
+ }
- X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
- default:X11EnableKeyEquivalents];
+ X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
+ default:X11EnableKeyEquivalents];
- darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
- default:darwinSyncKeymap];
+ darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
+ default:darwinSyncKeymap];
- tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
-
- if (tem != NULL) darwinKeymapFile = strdup (tem);
- else darwinKeymapFile = NULL;
+ tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
+ if (tem != NULL) darwinKeymapFile = strdup (tem);
+ else darwinKeymapFile = NULL;
- darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
- default:darwinDesiredDepth];
+ darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
+ default:darwinDesiredDepth];
- enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
- default:false];
+ enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
+ default:false];
}
/* This will end up at the end of the responder chain. */
@@ -791,49 +790,44 @@ environment?", @"Startup xinitrc dialog");
[X11App prefs_synchronize];
}
-void X11ApplicationMain (int argc, const char *argv[],
- void (*server_thread) (void *), void *server_arg) {
+void X11ApplicationMain (int argc, const char **argv, void (*server_thread) (void *), void *server_arg) {
NSAutoreleasePool *pool;
-
+
#ifdef DEBUG
while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
#endif
-
+
pool = [[NSAutoreleasePool alloc] init];
-
X11App = (X11Application *) [X11Application sharedApplication];
-
init_ports ();
-
[NSApp read_defaults];
-
[NSBundle loadNibNamed:@"main" owner:NSApp];
-
[[NSNotificationCenter defaultCenter] addObserver:NSApp
- selector:@selector (became_key:)
- name:NSWindowDidBecomeKeyNotification object:nil];
-
+ selector:@selector (became_key:)
+ name:NSWindowDidBecomeKeyNotification object:nil];
check_xinitrc ();
-
+
/*
* The xpr Quartz mode is statically linked into this server.
* Initialize all the Quartz functions.
*/
QuartzModeBundleInit();
-
+
/* Calculate the height of the menubar so we can avoid it. */
aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
- NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1;
-
+ NSMaxY([[NSScreen mainScreen] visibleFrame]);
+
if (!create_thread (server_thread, server_arg)) {
- ErrorF("can't create secondary thread\n");
- exit(1);
+ ErrorF("can't create secondary thread\n");
+ exit (1);
}
-
+
+ QuartzMoveToForeground();
+
[NSApp run];
+ /* not reached */
}
-
/* event conversion */
static inline unsigned short
diff --git a/hw/darwin/apple/X11Controller.h b/hw/xquartz/X11Controller.h
index 8d17fd9c3..47f5220e4 100644
--- a/hw/darwin/apple/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -33,7 +33,7 @@
#if __OBJC__
#import <Cocoa/Cocoa.h>
-#include "../quartz/xpr/x-list.h"
+#include "xpr/x-list.h"
@interface X11Controller : NSObject
{
@@ -78,8 +78,6 @@
#endif /* __OBJC__ */
-extern void X11ControllerMain (int argc, const char *argv[],
- void (*server_thread) (void *),
- void *server_arg);
+void X11ControllerMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg);
#endif /* X11CONTROLLER_H */
diff --git a/hw/darwin/apple/X11Controller.m b/hw/xquartz/X11Controller.m
index fbc9c7402..6b7c35141 100644
--- a/hw/darwin/apple/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -27,9 +27,13 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
-#include "../quartz/quartzCommon.h"
+#include "quartzCommon.h"
#import "X11Controller.h"
#import "X11Application.h"
@@ -39,10 +43,10 @@
#define BOOL X_BOOL
#include "opaque.h"
# include "darwin.h"
-# include "../quartz/quartz.h"
+# include "quartz.h"
# define _APPLEWM_SERVER_
# include "X11/extensions/applewm.h"
-# include "../quartz/applewmExt.h"
+# include "applewmExt.h"
#undef BOOL
#include <stdio.h>
@@ -51,8 +55,6 @@
#include <sys/types.h>
#include <sys/wait.h>
-#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__)
-
@implementation X11Controller
- (void) awakeFromNib
@@ -335,7 +337,7 @@
/* Setup environment */
temp = getenv("DISPLAY");
if (temp == NULL || temp[0] == 0) {
- snprintf(buf, sizeof(buf), ":%s", display);
+ snprintf(buf, sizeof(buf), ":%s", display);
setenv("DISPLAY", buf, TRUE);
}
@@ -740,8 +742,6 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
@end
-void X11ControllerMain (int argc, const char *argv[],
- void (*server_thread) (void *), void *server_arg)
-{
- X11ApplicationMain (argc, argv, server_thread, server_arg);
+void X11ControllerMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg) {
+ X11ApplicationMain (argc, argv, server_thread, server_arg);
}
diff --git a/hw/darwin/quartz/applewm.c b/hw/xquartz/applewm.c
index 308c51074..72dca28e7 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -25,7 +25,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
@@ -47,6 +49,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _APPLEWM_SERVER_
#include "X11/extensions/applewmstr.h"
#include "applewmExt.h"
+#include "X11Application.h"
#define DEFINE_ATOM_HELPER(func,atom_name) \
static Atom func (void) { \
@@ -445,13 +448,7 @@ ProcAppleWMSetWindowMenu(
break;
}
}
-
-#ifdef INXQUARTZ
X11ApplicationSetWindowMenu (nitems, items, shortcuts);
-#else
- QuartzSetWindowMenu (nitems, items, shortcuts);
-#endif
-
free(items);
free(shortcuts);
@@ -466,12 +463,7 @@ ProcAppleWMSetWindowMenuCheck(
REQUEST(xAppleWMSetWindowMenuCheckReq);
REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq);
-#ifdef INXQUARTZ
X11ApplicationSetWindowMenuCheck(stuff->index);
-#else
- QuartzMessageMainThread(kQuartzSetWindowMenuCheck, &stuff->index,
- sizeof(stuff->index));
-#endif
return (client->noClientException);
}
@@ -481,11 +473,8 @@ ProcAppleWMSetFrontProcess(
)
{
REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq);
-#ifdef INXQUARTZ
+
X11ApplicationSetFrontProcess();
-#else
- QuartzMessageMainThread(kQuartzSetFrontProcess, NULL, 0);
-#endif
return (client->noClientException);
}
@@ -524,13 +513,8 @@ ProcAppleWMSetCanQuit(
REQUEST(xAppleWMSetCanQuitReq);
REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq);
-#ifdef INXQUARTZ
- X11ApplicationSetCanQuit(stuff->state);
-#else
- QuartzMessageMainThread(kQuartzSetCanQuit, &stuff->state,
- sizeof(stuff->state));
-#endif
+ X11ApplicationSetCanQuit(stuff->state);
return (client->noClientException);
}
diff --git a/hw/darwin/quartz/applewmExt.h b/hw/xquartz/applewmExt.h
index 60d49ef59..60d49ef59 100644
--- a/hw/darwin/quartz/applewmExt.h
+++ b/hw/xquartz/applewmExt.h
diff --git a/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings
new file mode 100644
index 000000000..8f978d63f
--- /dev/null
+++ b/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Dutch.lproj/Localizable.strings b/hw/xquartz/bundle/Dutch.lproj/Localizable.strings
new file mode 100644
index 000000000..1ff39fe67
--- /dev/null
+++ b/hw/xquartz/bundle/Dutch.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..95c26d7b3
--- /dev/null
+++ b/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/darwin/apple/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/English.lproj/InfoPlist.strings
index 88e1f04ac..88e1f04ac 100644
--- a/hw/darwin/apple/English.lproj/InfoPlist.strings
+++ b/hw/xquartz/bundle/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/English.lproj/Localizable.strings b/hw/xquartz/bundle/English.lproj/Localizable.strings
new file mode 100644
index 000000000..c83b08536
--- /dev/null
+++ b/hw/xquartz/bundle/English.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/apple/English.lproj/main.nib/classes.nib b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib
index a82159bd5..a82159bd5 100644
--- a/hw/darwin/apple/English.lproj/main.nib/classes.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib
diff --git a/hw/darwin/apple/English.lproj/main.nib/info.nib b/hw/xquartz/bundle/English.lproj/main.nib/info.nib
index 88bc6260d..88bc6260d 100644
--- a/hw/darwin/apple/English.lproj/main.nib/info.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/info.nib
diff --git a/hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
index 8b31450ff..8b31450ff 100644
--- a/hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib
+++ b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/French.lproj/InfoPlist.strings
new file mode 100644
index 000000000..88e1f04ac
--- /dev/null
+++ b/hw/xquartz/bundle/French.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/French.lproj/Localizable.strings b/hw/xquartz/bundle/French.lproj/Localizable.strings
new file mode 100644
index 000000000..2770dfb8c
--- /dev/null
+++ b/hw/xquartz/bundle/French.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..9f9a7da67
--- /dev/null
+++ b/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/German.lproj/InfoPlist.strings
new file mode 100644
index 000000000..aa37e7555
--- /dev/null
+++ b/hw/xquartz/bundle/German.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/German.lproj/Localizable.strings b/hw/xquartz/bundle/German.lproj/Localizable.strings
new file mode 100644
index 000000000..a5489ab5c
--- /dev/null
+++ b/hw/xquartz/bundle/German.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..19532a9c2
--- /dev/null
+++ b/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/darwin/apple/Info.plist b/hw/xquartz/bundle/Info.plist
index 66f1f6be1..fce8c964d 100644
--- a/hw/darwin/apple/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -3,33 +3,37 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
- <string>English</string>
+ <string>English</string>
<key>CFBundleExecutable</key>
- <string>X11</string>
+ <string>X11</string>
<key>CFBundleGetInfoString</key>
- <string>X11</string>
+ <string>X11</string>
<key>CFBundleIconFile</key>
- <string>X11.icns</string>
+ <string>X11.icns</string>
<key>CFBundleIdentifier</key>
- <string>org.x.X11</string>
+ <string>org.x.X11</string>
<key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
+ <string>6.0</string>
<key>CFBundleName</key>
- <string>X11</string>
+ <string>X11</string>
<key>CFBundlePackageType</key>
- <string>APPL</string>
+ <string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.0</string>
+ <string>2.2.0</string>
<key>CFBundleSignature</key>
- <string>x11a</string>
+ <string>x11a</string>
<key>CSResourcesFileMapped</key>
- <true/>
+ <true/>
<key>NSHumanReadableCopyright</key>
- <string>Copyright © 2003-2007, Apple Inc.
-Copyright © 2003, XFree86 Project, Inc.</string>
+ <string>Copyright © 2003-2007, Apple Inc.
+Copyright © 2003, XFree86 Project, Inc.
+Copyright © 2003-2007, X.org Project, Inc.
+</string>
<key>NSMainNibFile</key>
- <string>main</string>
+ <string>main</string>
<key>NSPrincipalClass</key>
- <string>X11Application</string>
+ <string>X11Application</string>
+ <key>LSBackgroundOnly</key>
+ <true/>
</dict>
</plist>
diff --git a/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings
new file mode 100644
index 000000000..412169880
--- /dev/null
+++ b/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Italian.lproj/Localizable.strings b/hw/xquartz/bundle/Italian.lproj/Localizable.strings
new file mode 100644
index 000000000..d05d73d44
--- /dev/null
+++ b/hw/xquartz/bundle/Italian.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..b6e2e1bb1
--- /dev/null
+++ b/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings
new file mode 100644
index 000000000..2d6330fa7
--- /dev/null
+++ b/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/Localizable.strings b/hw/xquartz/bundle/Japanese.lproj/Localizable.strings
new file mode 100644
index 000000000..99821ea1f
--- /dev/null
+++ b/hw/xquartz/bundle/Japanese.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..523fd0856
--- /dev/null
+++ b/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
new file mode 100644
index 000000000..951167002
--- /dev/null
+++ b/hw/xquartz/bundle/Makefile.am
@@ -0,0 +1,28 @@
+bin_SCRIPTS = x11app
+
+.PHONY: x11app
+
+x11app:
+ xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)"
+
+install-data-hook:
+ xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)"
+
+clean-local:
+ rm -rf build
+
+resourcedir=$(libdir)/X11/xserver
+resource_DATA = Xquartz.plist
+
+EXTRA_DIST = \
+ Info.plist \
+ X11.icns \
+ bundle-main.c \
+ launcher-main.c \
+ server-main.c \
+ English.lproj/InfoPlist.strings \
+ English.lproj/Localizable.strings \
+ English.lproj/main.nib/classes.nib \
+ English.lproj/main.nib/info.nib \
+ English.lproj/main.nib/keyedobjects.nib \
+ X11.xcodeproj/project.pbxproj
diff --git a/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings
new file mode 100644
index 000000000..0e4287d14
--- /dev/null
+++ b/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Spanish.lproj/Localizable.strings b/hw/xquartz/bundle/Spanish.lproj/Localizable.strings
new file mode 100644
index 000000000..652f432a5
--- /dev/null
+++ b/hw/xquartz/bundle/Spanish.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..029349dd0
--- /dev/null
+++ b/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/darwin/apple/X11.icns b/hw/xquartz/bundle/X11.icns
index d770e617d..d770e617d 100644
--- a/hw/darwin/apple/X11.icns
+++ b/hw/xquartz/bundle/X11.icns
Binary files differ
diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..ae8ec07e6
--- /dev/null
+++ b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj
@@ -0,0 +1,458 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
+ 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; };
+ 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; };
+ 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 50EE2AB703849F0B0ECA21EC /* bundle-main.c */; };
+ 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; };
+ 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; };
+ 527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; };
+ 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E460D1B6C05005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E470D1B6C05005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E480D1B6C05005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E490D1B6C05005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4A0D1B6C05005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4B0D1B6C05005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4C0D1B6C05005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4D0D1B6C05005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4E0D1B6C05005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E4F0D1B6C05005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E500D1B6C05005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E510D1B6C05005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E520D1B6C05005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E530D1B6C05005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E540D1B6C05005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E550D1B6C05005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E560D1B6C05005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 3FB03E570D1B6C17005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E580D1B6C17005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E590D1B6C17005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5A0D1B6C17005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5B0D1B6C17005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5C0D1B6C17005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5D0D1B6C17005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5E0D1B6C17005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E5F0D1B6C17005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E600D1B6C17005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E610D1B6C17005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E620D1B6C17005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E630D1B6C17005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E640D1B6C17005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E650D1B6C17005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E660D1B6C17005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E670D1B6C17005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 3FB03E680D1B6C34005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = da; path = da.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E690D1B6C34005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6A0D1B6C34005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fi; path = fi.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6B0D1B6C34005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = French; path = French.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6C0D1B6C34005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = German; path = German.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6D0D1B6C34005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6E0D1B6C34005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = Japanese.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E6F0D1B6C34005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ko; path = ko.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E700D1B6C34005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = no; path = no.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E710D1B6C34005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pl; path = pl.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E720D1B6C34005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt; path = pt.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E730D1B6C34005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E740D1B6C34005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ru; path = ru.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E750D1B6C34005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = Spanish.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E760D1B6C34005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E770D1B6C34005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_CN; path = zh_CN.lproj/main.nib; sourceTree = "<group>"; };
+ 3FB03E780D1B6C34005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_TW; path = zh_TW.lproj/main.nib; sourceTree = "<group>"; };
+ 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = "<group>"; };
+ 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = "<group>"; };
+ 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+ 527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
+ 527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 52D9C0EC0BCDDF6B00CD2AFC /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 527F241E0B5D938C007840A7 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */,
+ 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 195DF8CFFE9D517E11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 527F24270B5D938C007840A7 /* X11.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 20286C29FDCF999611CA2CEA /* X11 */ = {
+ isa = PBXGroup;
+ children = (
+ 20286C2AFDCF999611CA2CEA /* Sources */,
+ 20286C2CFDCF999611CA2CEA /* Resources */,
+ 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
+ 195DF8CFFE9D517E11CA2CBB /* Products */,
+ 527F24260B5D938C007840A7 /* Info.plist */,
+ );
+ name = X11;
+ sourceTree = "<group>";
+ };
+ 20286C2AFDCF999611CA2CEA /* Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 50EE2AB703849F0B0ECA21EC /* bundle-main.c */,
+ );
+ name = Sources;
+ sourceTree = "<group>";
+ };
+ 20286C2CFDCF999611CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */,
+ 50459C5F038587C60ECA21EC /* X11.icns */,
+ 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */,
+ 02345980000FD03B11CA0E72 /* main.nib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */,
+ 570C5748047186C400ACF82F /* SystemConfiguration.framework */,
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 527F24170B5D938C007840A7 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 527F24160B5D938C007840A7 /* X11 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */;
+ buildPhases = (
+ 527F24170B5D938C007840A7 /* Headers */,
+ 527F24180B5D938C007840A7 /* Resources */,
+ 527F241C0B5D938C007840A7 /* Sources */,
+ 527F241E0B5D938C007840A7 /* Frameworks */,
+ 527F24210B5D938C007840A7 /* Rez */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = X11;
+ productName = X11;
+ productReference = 527F24270B5D938C007840A7 /* X11.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 20286C28FDCF999611CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ da,
+ Dutch,
+ fi,
+ Italian,
+ ko,
+ no,
+ pl,
+ pt,
+ pt_PT,
+ ru,
+ Spanish,
+ sv,
+ zh_CN,
+ zh_TW,
+ );
+ mainGroup = 20286C29FDCF999611CA2CEA /* X11 */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 527F24160B5D938C007840A7 /* X11 */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 527F24180B5D938C007840A7 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 527F24370B5D9D89007840A7 /* Info.plist in Resources */,
+ 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */,
+ 527F241A0B5D938C007840A7 /* main.nib in Resources */,
+ 527F241B0B5D938C007840A7 /* X11.icns in Resources */,
+ 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+ 527F24210B5D938C007840A7 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 527F241C0B5D938C007840A7 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 02345980000FD03B11CA0E72 /* main.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1870340FFE93FCAF11CA0CD7 /* English */,
+ 3FB03E680D1B6C34005958A5 /* da */,
+ 3FB03E690D1B6C34005958A5 /* Dutch */,
+ 3FB03E6A0D1B6C34005958A5 /* fi */,
+ 3FB03E6B0D1B6C34005958A5 /* French */,
+ 3FB03E6C0D1B6C34005958A5 /* German */,
+ 3FB03E6D0D1B6C34005958A5 /* Italian */,
+ 3FB03E6E0D1B6C34005958A5 /* Japanese */,
+ 3FB03E6F0D1B6C34005958A5 /* ko */,
+ 3FB03E700D1B6C34005958A5 /* no */,
+ 3FB03E710D1B6C34005958A5 /* pl */,
+ 3FB03E720D1B6C34005958A5 /* pt */,
+ 3FB03E730D1B6C34005958A5 /* pt_PT */,
+ 3FB03E740D1B6C34005958A5 /* ru */,
+ 3FB03E750D1B6C34005958A5 /* Spanish */,
+ 3FB03E760D1B6C34005958A5 /* sv */,
+ 3FB03E770D1B6C34005958A5 /* zh_CN */,
+ 3FB03E780D1B6C34005958A5 /* zh_TW */,
+ );
+ name = main.nib;
+ sourceTree = "<group>";
+ };
+ 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0867D6ABFE840B52C02AAC07 /* English */,
+ 3FB03E570D1B6C17005958A5 /* da */,
+ 3FB03E580D1B6C17005958A5 /* Dutch */,
+ 3FB03E590D1B6C17005958A5 /* fi */,
+ 3FB03E5A0D1B6C17005958A5 /* French */,
+ 3FB03E5B0D1B6C17005958A5 /* German */,
+ 3FB03E5C0D1B6C17005958A5 /* Italian */,
+ 3FB03E5D0D1B6C17005958A5 /* Japanese */,
+ 3FB03E5E0D1B6C17005958A5 /* ko */,
+ 3FB03E5F0D1B6C17005958A5 /* no */,
+ 3FB03E600D1B6C17005958A5 /* pl */,
+ 3FB03E610D1B6C17005958A5 /* pt */,
+ 3FB03E620D1B6C17005958A5 /* pt_PT */,
+ 3FB03E630D1B6C17005958A5 /* ru */,
+ 3FB03E640D1B6C17005958A5 /* Spanish */,
+ 3FB03E650D1B6C17005958A5 /* sv */,
+ 3FB03E660D1B6C17005958A5 /* zh_CN */,
+ 3FB03E670D1B6C17005958A5 /* zh_TW */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 52D9C0EC0BCDDF6B00CD2AFC /* English */,
+ 3FB03E460D1B6C05005958A5 /* da */,
+ 3FB03E470D1B6C05005958A5 /* Dutch */,
+ 3FB03E480D1B6C05005958A5 /* fi */,
+ 3FB03E490D1B6C05005958A5 /* French */,
+ 3FB03E4A0D1B6C05005958A5 /* German */,
+ 3FB03E4B0D1B6C05005958A5 /* Italian */,
+ 3FB03E4C0D1B6C05005958A5 /* Japanese */,
+ 3FB03E4D0D1B6C05005958A5 /* ko */,
+ 3FB03E4E0D1B6C05005958A5 /* no */,
+ 3FB03E4F0D1B6C05005958A5 /* pl */,
+ 3FB03E500D1B6C05005958A5 /* pt */,
+ 3FB03E510D1B6C05005958A5 /* pt_PT */,
+ 3FB03E520D1B6C05005958A5 /* ru */,
+ 3FB03E530D1B6C05005958A5 /* Spanish */,
+ 3FB03E540D1B6C05005958A5 /* sv */,
+ 3FB03E550D1B6C05005958A5 /* zh_CN */,
+ 3FB03E560D1B6C05005958A5 /* zh_TW */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 527F24090B5D8FFC007840A7 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INSTALL_MODE_FLAG = "a+rX";
+ };
+ name = Development;
+ };
+ 527F240A0B5D8FFC007840A7 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INSTALL_MODE_FLAG = "a+rX";
+ };
+ name = Deployment;
+ };
+ 527F240B0B5D8FFC007840A7 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INSTALL_MODE_FLAG = "a+rX";
+ };
+ name = Default;
+ };
+ 527F24230B5D938C007840A7 /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ HEADER_SEARCH_PATHS = /usr/X11/include;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = /usr/X11;
+ LIBRARY_SEARCH_PATHS = /usr/X11/lib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-lXau",
+ "-lxcb",
+ "-lX11",
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = X11;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ };
+ name = Development;
+ };
+ 527F24240B5D938C007840A7 /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ HEADER_SEARCH_PATHS = /usr/X11/include;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = /usr/X11;
+ LIBRARY_SEARCH_PATHS = /usr/X11/lib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-lXau",
+ "-lxcb",
+ "-lX11",
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = X11;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ };
+ name = Deployment;
+ };
+ 527F24250B5D938C007840A7 /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ HEADER_SEARCH_PATHS = /usr/X11/include;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = /usr/X11;
+ LIBRARY_SEARCH_PATHS = /usr/X11/lib;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = (
+ "-lXau",
+ "-lxcb",
+ "-lX11",
+ );
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = X11;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ };
+ name = Default;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 527F24090B5D8FFC007840A7 /* Development */,
+ 527F240A0B5D8FFC007840A7 /* Deployment */,
+ 527F240B0B5D8FFC007840A7 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 527F24230B5D938C007840A7 /* Development */,
+ 527F24240B5D938C007840A7 /* Deployment */,
+ 527F24250B5D938C007840A7 /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
+}
diff --git a/hw/xquartz/bundle/Xquartz.plist b/hw/xquartz/bundle/Xquartz.plist
new file mode 100644
index 000000000..e15704516
--- /dev/null
+++ b/hw/xquartz/bundle/Xquartz.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+
+<!-- This file contains system-wide defaults for the Apple X11 server -->
+
+<plist version="1.0">
+<dict>
+ <key>apps_menu</key>
+ <array>
+ <array>
+ <string>Terminal</string>
+ <string>xterm</string>
+ <string>n</string>
+ </array>
+ <array>
+ <string>xman</string>
+ <string>xman</string>
+ <string></string>
+ </array>
+ <array>
+ <string>xlogo</string>
+ <string>xlogo</string>
+ <string></string>
+ </array>
+ </array>
+</dict>
+</plist>
diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c
new file mode 100644
index 000000000..df78d7fb8
--- /dev/null
+++ b/hw/xquartz/bundle/bundle-main.c
@@ -0,0 +1,129 @@
+/* main.c -- X application launcher
+
+ Copyright (c) 2007 Jeremy Huddleston
+ Copyright (c) 2007 Apple Inc
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization. */
+
+#include <X11/Xlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
+#define DEFAULT_STARTX "/usr/X11/bin/startx"
+
+static int execute(const char *command);
+static char *command_from_prefs(const char *key, const char *default_value);
+
+int main(int argc, char **argv) {
+ Display *display;
+
+ size_t i;
+ fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
+ for(i=0; i < argc; i++) {
+ fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
+ }
+
+ /* If we have a process serial number and it's our only arg, act as if
+ * the user double clicked the app bundle: launch app_to_run if possible
+ */
+ if(argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) {
+ /* Now, try to open a display, if so, run the launcher */
+ display = XOpenDisplay(NULL);
+ if(display) {
+ fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n");
+ /* Could open the display, start the launcher */
+ XCloseDisplay(display);
+
+ /* Give 2 seconds for the server to start...
+ * TODO: *Really* fix this race condition
+ */
+ usleep(2000);
+ return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT));
+ }
+ }
+
+ /* Start the server */
+ fprintf(stderr, "X11.app: Could not connect to server. Starting X server.");
+ return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
+}
+
+static int execute(const char *command) {
+ const char *newargv[7];
+ const char **s;
+
+ newargv[0] = "/usr/bin/login";
+ newargv[1] = "-fp";
+ newargv[2] = getlogin();
+ newargv[3] = "/bin/sh";
+ newargv[4] = "-c";
+ newargv[5] = command;
+ newargv[6] = NULL;
+
+ fprintf(stderr, "X11.app: Launching %s:\n", command);
+ for(s=newargv; *s; s++) {
+ fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s);
+ }
+
+ execvp (newargv[0], (const char **) newargv);
+ perror ("X11.app: Couldn't exec.");
+ return(1);
+}
+
+static char *command_from_prefs(const char *key, const char *default_value) {
+ char *command = NULL;
+
+ CFStringRef cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII);
+ CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication);
+
+ if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
+ CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII);
+
+ CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
+ CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
+
+ int len = strlen(default_value) + 1;
+ command = (char *)malloc(len * sizeof(char));
+ if(!command)
+ return NULL;
+ strcpy(command, default_value);
+ } else {
+ int len = CFStringGetLength((CFStringRef)PlistRef) + 1;
+ command = (char *)malloc(len * sizeof(char));
+ if(!command)
+ return NULL;
+ CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII);
+ }
+
+ if (PlistRef)
+ CFRelease(PlistRef);
+
+ return command;
+}
diff --git a/hw/xquartz/bundle/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/da.lproj/InfoPlist.strings
new file mode 100644
index 000000000..88e1f04ac
--- /dev/null
+++ b/hw/xquartz/bundle/da.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/da.lproj/Localizable.strings b/hw/xquartz/bundle/da.lproj/Localizable.strings
new file mode 100644
index 000000000..9608a2e6b
--- /dev/null
+++ b/hw/xquartz/bundle/da.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..4a2bd4bde
--- /dev/null
+++ b/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/fi.lproj/InfoPlist.strings b/hw/xquartz/bundle/fi.lproj/InfoPlist.strings
new file mode 100644
index 000000000..8e4f6474f
--- /dev/null
+++ b/hw/xquartz/bundle/fi.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/fi.lproj/Localizable.strings b/hw/xquartz/bundle/fi.lproj/Localizable.strings
new file mode 100644
index 000000000..e8420fbaa
--- /dev/null
+++ b/hw/xquartz/bundle/fi.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..b5039fd44
--- /dev/null
+++ b/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/ko.lproj/InfoPlist.strings
new file mode 100644
index 000000000..4c738f8b2
--- /dev/null
+++ b/hw/xquartz/bundle/ko.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/ko.lproj/Localizable.strings b/hw/xquartz/bundle/ko.lproj/Localizable.strings
new file mode 100644
index 000000000..56a335859
--- /dev/null
+++ b/hw/xquartz/bundle/ko.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..925945c4d
--- /dev/null
+++ b/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/no.lproj/InfoPlist.strings b/hw/xquartz/bundle/no.lproj/InfoPlist.strings
new file mode 100644
index 000000000..eb1cfb002
--- /dev/null
+++ b/hw/xquartz/bundle/no.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/no.lproj/Localizable.strings b/hw/xquartz/bundle/no.lproj/Localizable.strings
new file mode 100644
index 000000000..5157a67de
--- /dev/null
+++ b/hw/xquartz/bundle/no.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..ca25327f5
--- /dev/null
+++ b/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/pl.lproj/InfoPlist.strings
new file mode 100644
index 000000000..b9c950214
--- /dev/null
+++ b/hw/xquartz/bundle/pl.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pl.lproj/Localizable.strings b/hw/xquartz/bundle/pl.lproj/Localizable.strings
new file mode 100644
index 000000000..4ae12d77f
--- /dev/null
+++ b/hw/xquartz/bundle/pl.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..e9ca5404b
--- /dev/null
+++ b/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt.lproj/InfoPlist.strings
new file mode 100644
index 000000000..33c637448
--- /dev/null
+++ b/hw/xquartz/bundle/pt.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pt.lproj/Localizable.strings b/hw/xquartz/bundle/pt.lproj/Localizable.strings
new file mode 100644
index 000000000..23ea96847
--- /dev/null
+++ b/hw/xquartz/bundle/pt.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..e88cccdba
--- /dev/null
+++ b/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings
new file mode 100644
index 000000000..33c637448
--- /dev/null
+++ b/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings b/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings
new file mode 100644
index 000000000..71c33ad14
--- /dev/null
+++ b/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..a61933475
--- /dev/null
+++ b/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/ru.lproj/InfoPlist.strings
new file mode 100644
index 000000000..7f722e4b6
--- /dev/null
+++ b/hw/xquartz/bundle/ru.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/ru.lproj/Localizable.strings b/hw/xquartz/bundle/ru.lproj/Localizable.strings
new file mode 100644
index 000000000..3b3811234
--- /dev/null
+++ b/hw/xquartz/bundle/ru.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..9354e0264
--- /dev/null
+++ b/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/sv.lproj/InfoPlist.strings
new file mode 100644
index 000000000..655d5ff63
--- /dev/null
+++ b/hw/xquartz/bundle/sv.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/sv.lproj/Localizable.strings b/hw/xquartz/bundle/sv.lproj/Localizable.strings
new file mode 100644
index 000000000..796f06c21
--- /dev/null
+++ b/hw/xquartz/bundle/sv.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..bd01c2dac
--- /dev/null
+++ b/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings
new file mode 100644
index 000000000..b5df36885
--- /dev/null
+++ b/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings b/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings
new file mode 100644
index 000000000..f88a6da4b
--- /dev/null
+++ b/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..e36c15fb6
--- /dev/null
+++ b/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings
new file mode 100644
index 000000000..92d5473b0
--- /dev/null
+++ b/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings
Binary files differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings b/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings
new file mode 100644
index 000000000..f009302c2
--- /dev/null
+++ b/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings
Binary files differ
diff --git a/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib
new file mode 100644
index 000000000..36602c53e
--- /dev/null
+++ b/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib
Binary files differ
diff --git a/hw/darwin/darwin.c b/hw/xquartz/darwin.c
index c32cd5461..463073485 100644
--- a/hw/darwin/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -29,7 +29,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include <X11/X.h>
#include <X11/Xproto.h>
@@ -67,14 +69,26 @@
#include <IOKit/hidsystem/IOHIDLib.h>
#include <IOKit/hidsystem/ev_keymap.h>
+#ifdef MITSHM
+#define _XSHM_SERVER_
+#include <X11/extensions/XShm.h>
+#endif
+
#include "darwin.h"
+#include "darwinEvents.h"
+#include "darwinKeyboard.h"
+#include "quartz.h"
#include "darwinClut8.h"
+#ifdef ENABLE_DEBUG_LOG
+FILE *debug_log_fp = NULL;
+#endif
+
/*
* X server shared global variables
*/
int darwinScreensFound = 0;
-int darwinScreenIndex = 0;
+DevPrivateKey darwinScreenKey = &darwinScreenKey;
io_connect_t darwinParamConnect = 0;
int darwinEventReadFD = -1;
int darwinEventWriteFD = -1;
@@ -91,11 +105,10 @@ int darwinDesiredDepth = -1;
int darwinDesiredRefresh = -1;
char *darwinKeymapFile = "USA.keymapping";
int darwinSyncKeymap = FALSE;
-int darwinSwapAltMeta = FALSE;
// modifier masks for faking mouse buttons
-int darwinFakeMouse2Mask = NX_COMMANDMASK;
-int darwinFakeMouse3Mask = NX_ALTERNATEMASK;
+int darwinFakeMouse2Mask = NX_ALTERNATEMASK;
+int darwinFakeMouse3Mask = NX_COMMANDMASK;
// devices
DeviceIntPtr darwinPointer = NULL;
@@ -137,8 +150,9 @@ void
DarwinPrintBanner(void)
{
// this should change depending on which specific server we are building
- ErrorF("X11.app starting:\n");
- ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE );
+ ErrorF("XQuartz starting:\n");
+ ErrorF("X.org Release 7.2\n"); // This is here to help fink until they fix their packages.
+ ErrorF("X.Org X Server %s\nBuild Date: %s\n", XSERVER_VERSION, BUILD_DATE );
}
@@ -180,10 +194,12 @@ static Bool DarwinAddScreen(
// allocate space for private per screen storage
dfb = xalloc(sizeof(DarwinFramebufferRec));
- SCREEN_PRIV(pScreen) = dfb;
+
+ // SCREEN_PRIV(pScreen) = dfb;
+ dixSetPrivate(&pScreen->devPrivates, darwinScreenKey, dfb);
// setup hardware/mode specific details
- ret = DarwinModeAddScreen(foundIndex, pScreen);
+ ret = QuartzAddScreen(foundIndex, pScreen);
foundIndex++;
if (! ret)
return FALSE;
@@ -262,7 +278,7 @@ static Bool DarwinAddScreen(
pScreen->SaveScreen = DarwinSaveScreen;
// finish mode dependent screen setup including cursor support
- if (!DarwinModeSetupScreen(index, pScreen)) {
+ if (!QuartzSetupScreen(index, pScreen)) {
return FALSE;
}
@@ -336,7 +352,7 @@ static int DarwinMouseProc(
DeviceIntPtr pPointer,
int what )
{
- char map[6];
+ CARD8 map[6];
switch (what) {
@@ -527,7 +543,7 @@ void InitInput( int argc, char **argv )
DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
- DarwinModeInitInput(argc, argv);
+ QuartzInitInput(argc, argv);
}
@@ -598,7 +614,6 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
{
int i;
- static unsigned long generation = 0;
pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
@@ -610,14 +625,8 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
for (i = 0; i < NUMFORMATS; i++)
pScreenInfo->formats[i] = formats[i];
- // Allocate private storage for each screen's Darwin specific info
- if (generation != serverGeneration) {
- darwinScreenIndex = AllocateScreenPrivateIndex();
- generation = serverGeneration;
- }
-
// Discover screens and do mode specific initialization
- DarwinModeInitOutput(argc, argv);
+ QuartzInitOutput(argc, argv);
// Add screens
for (i = 0; i < darwinScreensFound; i++) {
@@ -645,7 +654,22 @@ void OsVendorInit(void)
{
if (serverGeneration == 1) {
DarwinPrintBanner();
+#ifdef ENABLE_DEBUG_LOG
+ {
+ char *home_dir=NULL, *log_file_path=NULL;
+ home_dir = getenv("HOME");
+ if (home_dir) asprintf(&log_file_path, "%s/%s", home_dir, DEBUG_LOG_NAME);
+ if (log_file_path) {
+ if (!access(log_file_path, F_OK)) {
+ debug_log_fp = fopen(log_file_path, "a");
+ if (debug_log_fp) ErrorF("Debug logging enabled to %s\n", log_file_path);
+ }
+ free(log_file_path);
+ }
+ }
+#endif
}
+ // DEBUG_LOG("Xquartz started at %s\n", ctime(time(NULL)));
// Find the full path to the keymapping file.
if ( darwinKeymapFile ) {
@@ -677,10 +701,20 @@ void ddxInitGlobals(void)
*/
int ddxProcessArgument( int argc, char *argv[], int i )
{
- int numDone;
-
- if ((numDone = DarwinModeProcessArgument( argc, argv, i )))
- return numDone;
+// if ( !strcmp( argv[i], "-fullscreen" ) ) {
+// ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" );
+// return 1;
+// }
+
+// if ( !strcmp( argv[i], "-rootless" ) ) {
+// ErrorF( "Running rootless inside Mac OS X window server.\n" );
+// return 1;
+// }
+
+ // This command line arg is passed when launched from the Aqua GUI.
+ if ( !strncmp( argv[i], "-psn_", 5 ) ) {
+ return 1;
+ }
if ( !strcmp( argv[i], "-fakebuttons" ) ) {
darwinFakeButtons = TRUE;
@@ -720,11 +754,6 @@ int ddxProcessArgument( int argc, char *argv[], int i )
return 2;
}
- if ( !strcmp( argv[i], "-swapAltMeta" ) ) {
- darwinSwapAltMeta = 1;
- return 1;
- }
-
if ( !strcmp( argv[i], "-keymap" ) ) {
if ( i == argc-1 ) {
FatalError( "-keymap must be followed by a filename\n" );
@@ -804,12 +833,6 @@ int ddxProcessArgument( int argc, char *argv[], int i )
exit(0);
}
- // XDarwinStartup uses this argument to indicate the IOKit X server
- // should be started. Ignore it here.
- if ( !strcmp( argv[i], "-iokit" ) ) {
- return 1;
- }
-
return 0;
}
@@ -833,14 +856,11 @@ void ddxUseMsg( void )
ErrorF("-keymap <file> : read the keymapping from a file instead of the kernel.\n");
ErrorF("-version : show the server version.\n");
ErrorF("\n");
-#ifdef DARWIN_WITH_QUARTZ
- ErrorF("Quartz modes:\n");
- ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n");
- ErrorF("-rootless : run rootless inside Mac OS X window server.\n");
- ErrorF("-quartz : use default Mac OS X window server mode\n");
+// ErrorF("Quartz modes (Experimental / In Development):\n");
+// ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n");
+// ErrorF("-rootless : run rootless inside Mac OS X window server.\n");
ErrorF("\n");
ErrorF("Options ignored in rootless mode:\n");
-#endif
ErrorF("-size <height> <width> : use a screen resolution of <height> x <width>.\n");
ErrorF("-depth <8,15,24> : use this bit depth.\n");
ErrorF("-refresh <rate> : use a monitor refresh rate of <rate> Hz.\n");
@@ -856,7 +876,8 @@ void ddxGiveUp( void )
{
ErrorF( "Quitting XQuartz...\n" );
- DarwinModeGiveUp();
+ //if (!quartzRootless)
+ // quartzProcs->ReleaseScreens();
}
@@ -917,7 +938,7 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = TRUE;
- RegionPtr pOldClip = NULL;
+ RegionPtr pOldClip = NULL, bsExposed;
#ifdef DO_SAVE_UNDERS
Bool dosave = FALSE;
#endif
@@ -973,6 +994,12 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
if (WasViewable)
{
+ if (pWin->backStorage)
+ {
+ pOldClip = REGION_CREATE(pScreen, NullBox, 1);
+ REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ }
+
if (pWin->firstChild)
{
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
@@ -996,6 +1023,28 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
}
+ if (pWin->backStorage &&
+ ((pWin->backingStore == Always) || WasViewable))
+ {
+ if (!WasViewable)
+ pOldClip = &pWin->clipList; /* a convenient empty region */
+ bsExposed = (*pScreen->TranslateBackingStore)
+ (pWin, 0, 0, pOldClip,
+ pWin->drawable.x, pWin->drawable.y);
+ if (WasViewable)
+ REGION_DESTROY(pScreen, pOldClip);
+ if (bsExposed)
+ {
+ RegionPtr valExposed = NullRegion;
+
+ if (pWin->valdata)
+ valExposed = &pWin->valdata->after.exposed;
+ (*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
+ if (valExposed)
+ REGION_EMPTY(pScreen, valExposed);
+ REGION_DESTROY(pScreen, bsExposed);
+ }
+ }
if (WasViewable)
{
if (anyMarked)
diff --git a/hw/darwin/darwin.h b/hw/xquartz/darwin.h
index 70ce57e01..c569d66df 100644
--- a/hw/darwin/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -46,59 +46,19 @@ typedef struct {
int bitsPerComponent;
} DarwinFramebufferRec, *DarwinFramebufferPtr;
-
// From darwin.c
void DarwinPrintBanner(void);
int DarwinParseModifierList(const char *constmodifiers);
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
-// From darwinEvents.c
-Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
-void DarwinEQEnqueue(const xEvent *e);
-void DarwinEQPointerPost(xEvent *e);
-void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
-void DarwinPokeEQ(void);
-void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
-void DarwinSendKeyboardEvents(int ev_type, int keycode);
-void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
-
-// From darwinKeyboard.c
-int DarwinModifierNXKeyToNXKeycode(int key, int side);
-void DarwinKeyboardInit(DeviceIntPtr pDev);
-int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
-int DarwinModifierNXKeyToNXMask(int key);
-int DarwinModifierNXMaskToNXKey(int mask);
-int DarwinModifierStringToNXKey(const char *string);
-
-// Mode specific functions
-Bool DarwinModeAddScreen(int index, ScreenPtr pScreen);
-Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen);
-void DarwinModeInitOutput(int argc,char **argv);
-void DarwinModeInitInput(int argc, char **argv);
-int DarwinModeProcessArgument(int argc, char *argv[], int i);
-void DarwinModeProcessEvent(xEvent *xe);
-void DarwinModeGiveUp(void);
-void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
-
-
-#undef assert
-#define assert(x) { if ((x) == 0) \
- FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
-#define kern_assert(x) { if ((x) != KERN_SUCCESS) \
- FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \
- __LINE__, __FILE__, x); }
-#define SCREEN_PRIV(pScreen) \
- ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
-
-
-#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
-
+#define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \
+ dixLookupPrivate(&pScreen->devPrivates, darwinScreenKey))
/*
* Global variables from darwin.c
*/
-extern int darwinScreenIndex; // index into pScreen.devPrivates
+extern DevPrivateKey darwinScreenKey; // index into pScreen.devPrivates
extern int darwinScreensFound;
extern io_connect_t darwinParamConnect;
extern int darwinEventReadFD;
@@ -111,7 +71,6 @@ extern int darwinMouseAccelChange;
extern int darwinFakeButtons;
extern int darwinFakeMouse2Mask;
extern int darwinFakeMouse3Mask;
-extern int darwinSwapAltMeta;
extern char *darwinKeymapFile;
extern int darwinSyncKeymap;
extern unsigned int darwinDesiredWidth, darwinDesiredHeight;
@@ -131,7 +90,6 @@ enum {
= LASTEvent+1, // (from X.h list of event names)
kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
kXDarwinScrollWheel, // scroll wheel event
-
/*
* Quartz-specific events -- not used in IOKit mode
*/
@@ -142,6 +100,8 @@ enum {
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
kXDarwinBringAllToFront, // bring all X windows to front
+ kXDarwinToggleFullscreen, // Enable/Disable fullscreen mode
+ kXDarwinSetRootless, // Set rootless mode
/*
* AppleWM events
*/
@@ -155,4 +115,14 @@ enum {
kXDarwinWindowMoved // window has moved on screen
};
+#define ENABLE_DEBUG_LOG 1
+
+#ifdef ENABLE_DEBUG_LOG
+extern FILE *debug_log_fp;
+#define DEBUG_LOG_NAME "x11-debug.txt"
+#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%d: " msg, __FUNCTION__, __LINE__, ##args )
+#else
+#define DEBUG_LOG(msg, args...)
+#endif
+
#endif /* _DARWIN_H */
diff --git a/hw/darwin/darwinClut8.h b/hw/xquartz/darwinClut8.h
index 8e914f3fd..8e914f3fd 100644
--- a/hw/darwin/darwinClut8.h
+++ b/hw/xquartz/darwinClut8.h
diff --git a/hw/darwin/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 3d7f268ca..1760792c6 100644
--- a/hw/darwin/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
#include "mipointer.h"
#include "darwin.h"
+#include "quartz.h"
#include "darwinKeyboard.h"
#include <sys/types.h>
@@ -147,6 +148,15 @@ static void DarwinUpdateModifiers(
}
}
+/*
+ * DarwinReleaseModifiers
+ * This hacky function releases all modifier keys. It should be called when X11.app
+ * is deactivated (kXDarwinDeactivate) to prevent modifiers from getting stuck if they
+ * are held down during a "context" switch -- otherwise, we would miss the KeyUp.
+ */
+static void DarwinReleaseModifiers(void) {
+ DarwinUpdateModifiers(KeyRelease, COMMAND_MASK(-1) | CONTROL_MASK(-1) | ALTERNATE_MASK(-1) | SHIFT_MASK(-1));
+}
/*
* DarwinSimulateMouseClick
@@ -166,6 +176,9 @@ static void DarwinSimulateMouseClick(
int modifierMask) // modifiers used for the fake click
{
// first fool X into forgetting about the keys
+ // for some reason, it's not enough to tell X we released the Command key --
+ // it has to be the *left* Command key.
+ if (modifierMask & NX_COMMANDMASK) modifierMask |=NX_DEVICELCMDKEYMASK ;
DarwinUpdateModifiers(KeyRelease, modifierMask);
// push the mouse button
@@ -276,7 +289,7 @@ void ProcessInputEvents(void) {
while (darwinEventQueue.head != darwinEventQueue.tail)
{
if (screenIsSaved == SCREEN_SAVER_ON)
- SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset);
+ dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
e = &darwinEventQueue.events[darwinEventQueue.head];
xe = e->event;
@@ -344,9 +357,12 @@ void ProcessInputEvents(void) {
ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
break;
+ case kXDarwinDeactivate:
+ DarwinReleaseModifiers();
+ // fall through
default:
// Check for mode specific event
- DarwinModeProcessEvent(&xe);
+ QuartzProcessEvent(&xe);
}
}
}
@@ -408,7 +424,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {
static unsigned int last_seed;
unsigned int this_seed;
- this_seed = DarwinModeSystemKeymapSeed();
+ this_seed = QuartzSystemKeymapSeed();
if (this_seed != last_seed) {
last_seed = this_seed;
DarwinKeyboardReload(darwinKeyboard);
diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/xquartz/darwinEvents.h
index 56a02098d..d6cab2e6c 100644
--- a/hw/darwin/quartz/quartzCursor.h
+++ b/hw/xquartz/darwinEvents.h
@@ -1,10 +1,5 @@
/*
- * quartzCursor.h
- *
- * External interface for Quartz hardware cursor
- *
- * Copyright (c) 2001 Torrey T. Lyons and Greg Parker.
- * All Rights Reserved.
+ * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -29,14 +24,16 @@
* use or other dealings in this Software without prior written authorization.
*/
-#ifndef QUARTZCURSOR_H
-#define QUARTZCURSOR_H
-
-#include "screenint.h"
+#ifndef _DARWIN_EVENTS_H
+#define _DARWIN_EVENTS_H
-Bool QuartzInitCursor(ScreenPtr pScreen);
-void QuartzReallySetCursor(void);
-void QuartzSuspendXCursor(ScreenPtr pScreen);
-void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
+Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
+void DarwinEQEnqueue(const xEvent *e);
+void DarwinEQPointerPost(xEvent *e);
+void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
+void DarwinPokeEQ(void);
+void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
+void DarwinSendKeyboardEvents(int ev_type, int keycode);
+void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
-#endif
+#endif /* _DARWIN_EVENTS_H */
diff --git a/hw/darwin/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c
index 4e7a136d6..f1b90b76a 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/xquartz/darwinKeyboard.c
@@ -56,12 +56,13 @@
===========================================================================
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
// Define this to get a diagnostic output to stderr which is helpful
// in determining how the X server is interpreting the Darwin keymap.
-#undef DUMP_DARWIN_KEYMAP
-
-/* Define this to use Alt for Mode_switch. */
-#define ALT_IS_MODE_SWITCH 1
+// #define DUMP_DARWIN_KEYMAP
#include <stdio.h>
#include <stdlib.h>
@@ -72,14 +73,21 @@
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
#include "darwinKeyboard.h"
+#include "quartzKeyboard.h"
+#include "quartzAudio.h"
+
+#ifdef NDEBUG
+#undef NDEBUG
#include <assert.h>
+#define NDEBUG 1
+#else
+#include <assert.h>
+#endif
+
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
#define FunctionMask Mod3Mask
-// FIXME: It would be nice to support some of the extra keys in XF86keysym.h,
-// at least the volume controls that now ship on every Apple keyboard.
-
#define UK(a) NoSymbol // unknown symbol
static KeySym const next_to_x[256] = {
@@ -173,7 +181,7 @@ static KeySym const next_to_x[256] = {
static KeySym const symbol_to_x[] = {
XK_Left, XK_Up, XK_Right, XK_Down
};
-int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]);
+static int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]);
#define MIN_FUNCKEY 0x20
static KeySym const funckey_to_x[] = {
@@ -184,7 +192,7 @@ static KeySym const funckey_to_x[] = {
XK_Page_Up, XK_Page_Down, XK_F13, XK_F14,
XK_F15
};
-int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]);
+static int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]);
typedef struct {
KeySym normalSym;
@@ -210,14 +218,14 @@ static darwinKeyPad_t const normal_to_keypad[] = {
{ XK_period, XK_KP_Decimal },
{ XK_slash, XK_KP_Divide }
};
-int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]);
+static int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]);
static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl )
{
// keyclick, bell volume / pitch, autorepead, LED's
}
-static darwinKeyboardInfo keyInfo;
+darwinKeyboardInfo keyInfo;
static FILE *fref = NULL;
static char *inBuffer = NULL;
@@ -226,35 +234,32 @@ static char *inBuffer = NULL;
// Can be configured to treat embedded "numbers" as being composed of
// either 1, 2, or 4 bytes, apiece.
//-----------------------------------------------------------------------------
-typedef struct _DataStream
-{
+typedef struct _DataStream {
unsigned char const *data;
unsigned char const *data_end;
short number_size; // Size in bytes of a "number" in the stream.
} DataStream;
-static DataStream* new_data_stream( unsigned char const* data, int size )
-{
+static DataStream* new_data_stream(unsigned char const* data, int size) {
DataStream* s = (DataStream*)xalloc( sizeof(DataStream) );
- s->data = data;
- s->data_end = data + size;
- s->number_size = 1; // Default to byte-sized numbers.
+ if(s) {
+ s->data = data;
+ s->data_end = data + size;
+ s->number_size = 1; // Default to byte-sized numbers.
+ }
return s;
}
-static void destroy_data_stream( DataStream* s )
-{
+static void destroy_data_stream(DataStream* s) {
xfree(s);
}
-static unsigned char get_byte( DataStream* s )
-{
+static unsigned char get_byte(DataStream* s) {
assert(s->data + 1 <= s->data_end);
return *s->data++;
}
-static short get_word( DataStream* s )
-{
+static short get_word(DataStream* s) {
short hi, lo;
assert(s->data + 2 <= s->data_end);
hi = *s->data++;
@@ -262,8 +267,7 @@ static short get_word( DataStream* s )
return ((hi << 8) | lo);
}
-static int get_dword( DataStream* s )
-{
+static int get_dword(DataStream* s) {
int b1, b2, b3, b4;
assert(s->data + 4 <= s->data_end);
b4 = *s->data++;
@@ -273,8 +277,7 @@ static int get_dword( DataStream* s )
return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
}
-static int get_number( DataStream* s )
-{
+static int get_number(DataStream* s) {
switch (s->number_size) {
case 4: return get_dword(s);
case 2: return get_word(s);
@@ -290,8 +293,7 @@ static int get_number( DataStream* s )
* bits_set
* Calculate number of bits set in the modifier mask.
*/
-static short bits_set( short mask )
-{
+static short bits_set(short mask) {
short n = 0;
for ( ; mask != 0; mask >>= 1)
@@ -305,10 +307,7 @@ static short bits_set( short mask )
* Read the next character code from the Darwin keymapping
* and write it to the X keymap.
*/
-static void parse_next_char_code(
- DataStream *s,
- KeySym *k )
-{
+static void parse_next_char_code(DataStream *s, KeySym *k) {
const short charSet = get_number(s);
const short charCode = get_number(s);
@@ -331,9 +330,7 @@ static void parse_next_char_code(
* DarwinReadKeymapFile
* Read the appropriate keymapping from a keymapping file.
*/
-Bool DarwinReadKeymapFile(
- NXKeyMapping *keyMap)
-{
+Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
struct stat st;
NXEventSystemDevice info[20];
int interface = 0, handler_id = 0;
@@ -442,9 +439,7 @@ Bool DarwinReadKeymapFile(
/*
* DarwinParseNXKeyMapping
*/
-Bool DarwinParseNXKeyMapping(
- darwinKeyboardInfo *info)
-{
+Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) {
KeySym *k;
int i;
short numMods, numKeys, numPadKeys = 0;
@@ -512,8 +507,9 @@ Bool DarwinParseNXKeyMapping(
(left ? XK_Control_L : XK_Control_R);
break;
case NX_MODIFIERKEY_ALTERNATE:
+ // info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch;
info->keyMap[keyCode * GLYPHS_PER_KEY] =
- (left ? XK_Mode_switch : XK_Alt_R);
+ (left ? XK_Alt_L : XK_Alt_R);
break;
case NX_MODIFIERKEY_COMMAND:
info->keyMap[keyCode * GLYPHS_PER_KEY] =
@@ -638,27 +634,22 @@ Bool DarwinParseNXKeyMapping(
return TRUE;
}
-
/*
* DarwinBuildModifierMaps
* Use the keyMap field of keyboard info structure to populate
* the modMap and modifierKeycodes fields.
*/
-static void
-DarwinBuildModifierMaps(
- darwinKeyboardInfo *info)
-{
+static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
int i;
KeySym *k;
memset(info->modMap, NoSymbol, sizeof(info->modMap));
memset(info->modifierKeycodes, 0, sizeof(info->modifierKeycodes));
- for (i = 0; i < NUM_KEYCODES; i++)
- {
+ for (i = 0; i < NUM_KEYCODES; i++) {
k = info->keyMap + i * GLYPHS_PER_KEY;
- switch (k[0]) {
+ switch (*k) {
case XK_Shift_L:
info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i;
info->modMap[MIN_KEYCODE + i] = ShiftMask;
@@ -695,6 +686,7 @@ DarwinBuildModifierMaps(
case XK_Alt_L:
info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
info->modMap[MIN_KEYCODE + i] = Mod1Mask;
+ *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor.
break;
case XK_Alt_R:
@@ -703,6 +695,7 @@ DarwinBuildModifierMaps(
#else
info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
#endif
+ *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor.
info->modMap[MIN_KEYCODE + i] = Mod1Mask;
break;
@@ -728,46 +721,24 @@ DarwinBuildModifierMaps(
info->modMap[MIN_KEYCODE + i] = Mod3Mask;
break;
}
-
- if (darwinSwapAltMeta)
- {
- switch (k[0])
- {
- case XK_Alt_L:
- k[0] = XK_Meta_L;
- break;
- case XK_Alt_R:
- k[0] = XK_Meta_R;
- break;
- case XK_Meta_L:
- k[0] = XK_Alt_L;
- break;
- case XK_Meta_R:
- k[0] = XK_Alt_R;
- break;
- }
- }
-
-#if ALT_IS_MODE_SWITCH
- if (k[0] == XK_Alt_L)
- k[0] = XK_Mode_switch;
-#endif
}
}
-
/*
* DarwinLoadKeyboardMapping
* Load the keyboard map from a file or system and convert
* it to an equivalent X keyboard map and modifier map.
*/
-static void
-DarwinLoadKeyboardMapping(KeySymsRec *keySyms)
-{
+static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) {
memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap));
+ /* TODO: Clean this up
+ * QuartzReadSystemKeymap is in quartz/quartzKeyboard.c
+ * DarwinParseNXKeyMapping is here
+ */
if (!DarwinParseNXKeyMapping(&keyInfo)) {
- if (!DarwinModeReadSystemKeymap(&keyInfo)) {
+ DEBUG_LOG("DarwinParseNXKeyMapping returned 0... running QuartzReadSystemKeymap().\n");
+ if (!QuartzReadSystemKeymap(&keyInfo)) {
FatalError("Could not build a valid keymap.");
}
}
@@ -775,20 +746,20 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms)
DarwinBuildModifierMaps(&keyInfo);
#ifdef DUMP_DARWIN_KEYMAP
- ErrorF("Darwin -> X converted keyboard map\n");
- for (i = 0, k = info->keyMap; i < NX_NUMKEYCODES;
+ int i;
+ KeySym *k;
+ DEBUG_LOG("Darwin -> X converted keyboard map\n");
+ for (i = 0, k = keyInfo.keyMap; i < NX_NUMKEYCODES;
i++, k += GLYPHS_PER_KEY)
{
int j;
- ErrorF("0x%02x:", i);
for (j = 0; j < GLYPHS_PER_KEY; j++) {
if (k[j] == NoSymbol) {
- ErrorF("\tNoSym");
+ DEBUG_LOG("0x%02x:\tNoSym\n", i);
} else {
- ErrorF("\t0x%x", k[j]);
+ DEBUG_LOG("0x%02x:\t0x%lx\n", i, k[j]);
}
}
- ErrorF("\n");
}
#endif
@@ -805,9 +776,7 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms)
* X keyboard map and modifier map. Set the new keyboard
* device structure.
*/
-void DarwinKeyboardInit(
- DeviceIntPtr pDev )
-{
+void DarwinKeyboardInit(DeviceIntPtr pDev) {
KeySymsRec keySyms;
// Open a shared connection to the HID System.
@@ -816,25 +785,24 @@ void DarwinKeyboardInit(
assert( darwinParamConnect = NXOpenEventStatus() );
DarwinLoadKeyboardMapping(&keySyms);
-
+ // DarwinKeyboardReload(pDev);
/* Initialize the seed, so we don't reload the keymap unnecessarily
(and possibly overwrite xinitrc changes) */
- DarwinModeSystemKeymapSeed();
+ QuartzSystemKeymapSeed();
assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms,
- keyInfo.modMap, DarwinModeBell,
+ keyInfo.modMap, QuartzBell,
DarwinChangeKeyboardControl ));
}
/* Borrowed from dix/devices.c */
-static Bool
-InitModMap(register KeyClassPtr keyc)
-{
+static Bool InitModMap(register KeyClassPtr keyc) {
int i, j;
CARD8 keysPerModifier[8];
CARD8 mask;
+ // darwinKeyc = keyc;
if (keyc->modifierKeyMap != NULL)
xfree (keyc->modifierKeyMap);
@@ -874,9 +842,7 @@ InitModMap(register KeyClassPtr keyc)
}
-void
-DarwinKeyboardReload(DeviceIntPtr pDev)
-{
+void DarwinKeyboardReload(DeviceIntPtr pDev) {
KeySymsRec keySyms;
DarwinLoadKeyboardMapping(&keySyms);
@@ -886,7 +852,7 @@ DarwinKeyboardReload(DeviceIntPtr pDev)
memmove(pDev->key->modifierMap, keyInfo.modMap, MAP_LENGTH);
InitModMap(pDev->key);
- }
+ } else DEBUG_LOG("SetKeySymsMap=0\n");
SendMappingNotify(MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0);
SendMappingNotify(MappingModifier, 0, 0, 0);
@@ -909,8 +875,7 @@ DarwinKeyboardReload(DeviceIntPtr pDev)
* side = 0 for left or 1 for right.
* Returns 0 if key+side is not a known modifier.
*/
-int DarwinModifierNXKeyToNXKeycode(int key, int side)
-{
+int DarwinModifierNXKeyToNXKeycode(int key, int side) {
return keyInfo.modifierKeycodes[key][side];
}
@@ -919,8 +884,7 @@ int DarwinModifierNXKeyToNXKeycode(int key, int side)
* Returns -1 if keycode+side is not a modifier key
* outSide may be NULL, else it gets 0 for left and 1 for right.
*/
-int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide)
-{
+int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) {
int key, side;
keycode += MIN_KEYCODE;
@@ -939,8 +903,7 @@ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide)
* DarwinModifierNXMaskToNXKey
* Returns -1 if mask is not a known modifier mask.
*/
-int DarwinModifierNXMaskToNXKey(int mask)
-{
+int DarwinModifierNXMaskToNXKey(int mask) {
switch (mask) {
case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK;
case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT;
@@ -970,12 +933,33 @@ int DarwinModifierNXMaskToNXKey(int mask)
return -1;
}
+const char *DarwinModifierNXMaskTostring(int mask) {
+ switch (mask) {
+ case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK";
+ case NX_SHIFTMASK: return "NX_SHIFTMASK";
+ case NX_DEVICELSHIFTKEYMASK: return "NX_DEVICELSHIFTKEYMASK";
+ case NX_DEVICERSHIFTKEYMASK: return "NX_DEVICERSHIFTKEYMASK";
+ case NX_CONTROLMASK: return "NX_CONTROLMASK";
+ case NX_DEVICELCTLKEYMASK: return "NX_DEVICELCTLKEYMASK";
+ case NX_DEVICERCTLKEYMASK: return "NX_DEVICERCTLKEYMASK";
+ case NX_ALTERNATEMASK: return "NX_ALTERNATEMASK";
+ case NX_DEVICELALTKEYMASK: return "NX_DEVICELALTKEYMASK";
+ case NX_DEVICERALTKEYMASK: return "NX_DEVICERALTKEYMASK";
+ case NX_COMMANDMASK: return "NX_COMMANDMASK";
+ case NX_DEVICELCMDKEYMASK: return "NX_DEVICELCMDKEYMASK";
+ case NX_DEVICERCMDKEYMASK: return "NX_DEVICERCMDKEYMASK";
+ case NX_NUMERICPADMASK: return "NX_NUMERICPADMASK";
+ case NX_HELPMASK: return "NX_HELPMASK";
+ case NX_SECONDARYFNMASK: return "NX_SECONDARYFNMASK";
+ }
+ return "unknown mask";
+}
+
/*
* DarwinModifierNXKeyToNXMask
* Returns 0 if key is not a known modifier key.
*/
-int DarwinModifierNXKeyToNXMask(int key)
-{
+int DarwinModifierNXKeyToNXMask(int key) {
switch (key) {
case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK;
case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK;
@@ -1005,8 +989,7 @@ int DarwinModifierNXKeyToNXMask(int key)
* DarwinModifierStringToNXKey
* Returns -1 if string is not a known modifier.
*/
-int DarwinModifierStringToNXKey(const char *str)
-{
+int DarwinModifierStringToNXKey(const char *str) {
if (!strcasecmp(str, "shift")) return NX_MODIFIERKEY_SHIFT;
else if (!strcasecmp(str, "control")) return NX_MODIFIERKEY_CONTROL;
else if (!strcasecmp(str, "option")) return NX_MODIFIERKEY_ALTERNATE;
diff --git a/hw/darwin/quartz/cr/XView.h b/hw/xquartz/darwinKeyboard.h
index 26f789da2..5cf64c7d1 100644
--- a/hw/darwin/quartz/cr/XView.h
+++ b/hw/xquartz/darwinKeyboard.h
@@ -1,7 +1,5 @@
/*
- * NSView subclass for Mac OS X rootless X server
- *
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
+ * Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -26,16 +24,22 @@
* use or other dealings in this Software without prior written authorization.
*/
-#import <Cocoa/Cocoa.h>
+#ifndef DARWIN_KEYBOARD_H
+#define DARWIN_KEYBOARD_H 1
-@interface XView : NSQuickDrawView
+#include "quartzKeyboard.h"
-- (BOOL)isFlipped;
-- (BOOL)isOpaque;
-- (BOOL)acceptsFirstResponder;
-- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
-- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent;
+/* Provided for darwinEvents.c */
+extern darwinKeyboardInfo keyInfo;
+void DarwinKeyboardReload(DeviceIntPtr pDev);
+void DarwinKeyboardInit(DeviceIntPtr pDev);
+int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
+int DarwinModifierNXKeyToNXKeycode(int key, int side);
+int DarwinModifierNXKeyToNXMask(int key);
+int DarwinModifierNXMaskToNXKey(int mask);
+int DarwinModifierStringToNXKey(const char *string);
-- (void)mouseDown:(NSEvent *)anEvent;
+/* Provided for darwin.c */
+void DarwinKeyboardInit(DeviceIntPtr pDev);
-@end
+#endif /* DARWIN_KEYBOARD_H */
diff --git a/hw/darwin/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 260d72af7..ee456a43a 100644
--- a/hw/darwin/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -52,6 +52,10 @@ SOFTWARE.
********************************************************/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
diff --git a/hw/darwin/quartz/keysym2ucs.c b/hw/xquartz/keysym2ucs.c
index 8626ebc4e..8626ebc4e 100644
--- a/hw/darwin/quartz/keysym2ucs.c
+++ b/hw/xquartz/keysym2ucs.c
diff --git a/hw/darwin/quartz/keysym2ucs.h b/hw/xquartz/keysym2ucs.h
index f5b7a18f2..f5b7a18f2 100644
--- a/hw/darwin/quartz/keysym2ucs.h
+++ b/hw/xquartz/keysym2ucs.h
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 787601b5d..4a9d8e1f1 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -33,17 +33,18 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-#include "pseudoramiX.h"
-
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
+#include "pseudoramiX.h"
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"
#include <X11/extensions/panoramiXproto.h>
#include "globals.h"
-extern int noPseudoramiXExtension;
+Bool noPseudoramiXExtension = FALSE;
extern int noPanoramiXExtension;
extern int ProcPanoramiXQueryVersion (ClientPtr client);
diff --git a/hw/darwin/quartz/pseudoramiX.h b/hw/xquartz/pseudoramiX.h
index df5010d1d..df5010d1d 100644
--- a/hw/darwin/quartz/pseudoramiX.h
+++ b/hw/xquartz/pseudoramiX.h
diff --git a/hw/darwin/quartz/quartz.c b/hw/xquartz/quartz.c
index 25061a8b3..6f42c538f 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -28,22 +28,30 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartz.h"
#include "darwin.h"
+#include "darwinEvents.h"
#include "quartzAudio.h"
#include "pseudoramiX.h"
#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
#include "applewmExt.h"
+#include "X11Application.h"
+
+#include <X11/extensions/applewm.h>
+#include <X11/extensions/randr.h>
+
// X headers
#include "scrnintstr.h"
#include "windowstr.h"
#include "colormapst.h"
#include "globals.h"
+#include "rootlessWindow.h"
// System headers
#include <sys/types.h>
@@ -51,21 +59,45 @@
#include <fcntl.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
+#define FAKE_RANDR 1
+
// Shared global variables for Quartz modes
int quartzEventWriteFD = -1;
-int quartzStartClients = 1;
int quartzRootless = -1;
int quartzUseSysBeep = 0;
int quartzUseAGL = 1;
int quartzEnableKeyEquivalents = 1;
int quartzServerVisible = TRUE;
int quartzServerQuitting = FALSE;
-int quartzScreenIndex = 0;
+DevPrivateKey quartzScreenKey = &quartzScreenKey;
int aquaMenuBarHeight = 0;
-int noPseudoramiXExtension = FALSE;
QuartzModeProcsPtr quartzProcs = NULL;
const char *quartzOpenGLBundle = NULL;
+#if defined(RANDR) && !defined(FAKE_RANDR)
+Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
+ return FALSE;
+}
+
+Bool QuartzRandRSetConfig (ScreenPtr pScreen,
+ Rotation randr,
+ int rate,
+ RRScreenSizePtr pSize) {
+ return FALSE;
+}
+
+Bool QuartzRandRInit (ScreenPtr pScreen) {
+ rrScrPrivPtr pScrPriv;
+
+ if (!RRScreenInit (pScreen)) return FALSE;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ pScrPriv->rrGetInfo = QuartzRandRGetInfo;
+ pScrPriv->rrSetConfig = QuartzRandRSetConfig;
+ return TRUE;
+}
+#endif
+
/*
===========================================================================
@@ -75,16 +107,18 @@ const char *quartzOpenGLBundle = NULL;
*/
/*
- * DarwinModeAddScreen
+ * QuartzAddScreen
* Do mode dependent initialization of each screen for Quartz.
*/
-Bool DarwinModeAddScreen(
+Bool QuartzAddScreen(
int index,
ScreenPtr pScreen)
{
// allocate space for private per screen Quartz specific storage
QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1);
- QUARTZ_PRIV(pScreen) = displayInfo;
+
+ // QUARTZ_PRIV(pScreen) = displayInfo;
+ dixSetPrivate(&pScreen->devPrivates, quartzScreenKey, displayInfo);
// do Quartz mode specific initialization
return quartzProcs->AddScreen(index, pScreen);
@@ -92,10 +126,10 @@ Bool DarwinModeAddScreen(
/*
- * DarwinModeSetupScreen
+ * QuartzSetupScreen
* Finalize mode specific setup of each screen.
*/
-Bool DarwinModeSetupScreen(
+Bool QuartzSetupScreen(
int index,
ScreenPtr pScreen)
{
@@ -112,21 +146,13 @@ Bool DarwinModeSetupScreen(
/*
- * DarwinModeInitOutput
+ * QuartzInitOutput
* Quartz display initialization.
*/
-void DarwinModeInitOutput(
+void QuartzInitOutput(
int argc,
char **argv )
{
- static unsigned long generation = 0;
-
- // Allocate private storage for each screen's Quartz specific info
- if (generation != serverGeneration) {
- quartzScreenIndex = AllocateScreenPrivateIndex();
- generation = serverGeneration;
- }
-
if (serverGeneration == 0) {
QuartzAudioInit();
}
@@ -140,36 +166,70 @@ void DarwinModeInitOutput(
// Do display mode specific initialization
quartzProcs->DisplayInit();
-
- // Init PseudoramiX implementation of Xinerama.
- // This should be in InitExtensions, but that causes link errors
- // for servers that don't link in pseudoramiX.c.
- if (!noPseudoramiXExtension) {
- PseudoramiXExtensionInit(argc, argv);
- }
}
/*
- * DarwinModeInitInput
+ * QuartzInitInput
* Inform the main thread the X server is ready to handle events.
*/
-void DarwinModeInitInput(
+void QuartzInitInput(
int argc,
char **argv )
{
-#ifdef INXQUARTZ
- X11ApplicationServerReady();
-#else
- QuartzMessageMainThread(kQuartzServerStarted, NULL, 0);
-#endif
-
+ X11ApplicationSetCanQuit(1);
+ X11ApplicationServerReady();
// Do final display mode specific initialization before handling events
if (quartzProcs->InitInput)
quartzProcs->InitInput(argc, argv);
}
+#ifdef FAKE_RANDR
+extern char *ConnectionInfo;
+
+static int padlength[4] = {0, 3, 2, 1};
+
+static void
+RREditConnectionInfo (ScreenPtr pScreen)
+{
+ xConnSetup *connSetup;
+ char *vendor;
+ xPixmapFormat *formats;
+ xWindowRoot *root;
+ xDepth *depth;
+ xVisualType *visual;
+ int screen = 0;
+ int d;
+
+ connSetup = (xConnSetup *) ConnectionInfo;
+ vendor = (char *) connSetup + sizeof (xConnSetup);
+ formats = (xPixmapFormat *) ((char *) vendor +
+ connSetup->nbytesVendor +
+ padlength[connSetup->nbytesVendor & 3]);
+ root = (xWindowRoot *) ((char *) formats +
+ sizeof (xPixmapFormat) * screenInfo.numPixmapFormats);
+ while (screen != pScreen->myNum)
+ {
+ depth = (xDepth *) ((char *) root +
+ sizeof (xWindowRoot));
+ for (d = 0; d < root->nDepths; d++)
+ {
+ visual = (xVisualType *) ((char *) depth +
+ sizeof (xDepth));
+ depth = (xDepth *) ((char *) visual +
+ depth->nVisuals * sizeof (xVisualType));
+ }
+ root = (xWindowRoot *) ((char *) depth);
+ screen++;
+ }
+ root->pixWidth = pScreen->width;
+ root->pixHeight = pScreen->height;
+ root->mmWidth = pScreen->mmWidth;
+ root->mmHeight = pScreen->mmHeight;
+}
+#endif
+
/*
* QuartzUpdateScreens
* Adjust for screen arrangement changes.
@@ -181,6 +241,7 @@ static void QuartzUpdateScreens(void)
int x, y, width, height, sx, sy;
xEvent e;
+ DEBUG_LOG("QuartzUpdateScreens()\n");
if (noPseudoramiXExtension || screenInfo.numScreens != 1)
{
/* FIXME: if not using Xinerama, we have multiple screens, and
@@ -202,8 +263,11 @@ static void QuartzUpdateScreens(void)
pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
pScreen->width = width;
pScreen->height = height;
-
- /* FIXME: should probably do something with RandR here. */
+
+#ifndef FAKE_RANDR
+ if(!QuartzRandRInit(pScreen))
+ FatalError("Failed to init RandR extension.\n");
+#endif
DarwinAdjustScreenOrigins(&screenInfo);
quartzProcs->UpdateScreen(pScreen);
@@ -231,7 +295,9 @@ static void QuartzUpdateScreens(void)
e.u.configureNotify.override = pRoot->overrideRedirect;
DeliverEvents(pRoot, &e, 1, NullWindow);
- /* FIXME: Should we use RREditConnectionInfo(pScreen)? */
+#ifdef FAKE_RANDR
+ RREditConnectionInfo(pScreen);
+#endif
}
@@ -276,9 +342,6 @@ static void QuartzHide(void)
}
}
quartzServerVisible = FALSE;
-#ifndef INXQUARTZ
- QuartzMessageMainThread(kQuartzServerHidden, NULL, 0);
-#endif
}
@@ -335,15 +398,29 @@ QuartzMessageServerThread(
/*
- * DarwinModeProcessEvent
+ * QuartzProcessEvent
* Process Quartz specific events.
*/
-void DarwinModeProcessEvent(
- xEvent *xe)
-{
+void QuartzProcessEvent(xEvent *xe) {
switch (xe->u.u.type) {
+ case kXDarwinControllerNotify:
+ DEBUG_LOG("kXDarwinControllerNotify\n");
+ AppleWMSendEvent(AppleWMControllerNotify,
+ AppleWMControllerNotifyMask,
+ xe->u.clientMessage.u.l.longs0,
+ xe->u.clientMessage.u.l.longs1);
+ break;
+
+ case kXDarwinPasteboardNotify:
+ DEBUG_LOG("kXDarwinPasteboardNotify\n");
+ AppleWMSendEvent(AppleWMPasteboardNotify,
+ AppleWMPasteboardNotifyMask,
+ xe->u.clientMessage.u.l.longs0,
+ xe->u.clientMessage.u.l.longs1);
+ break;
case kXDarwinActivate:
+ DEBUG_LOG("kXDarwinActivate\n");
QuartzShow(xe->u.keyButtonPointer.rootX,
xe->u.keyButtonPointer.rootY);
AppleWMSendEvent(AppleWMActivationNotify,
@@ -352,12 +429,50 @@ void DarwinModeProcessEvent(
break;
case kXDarwinDeactivate:
+ DEBUG_LOG("kXDarwinDeactivate\n");
AppleWMSendEvent(AppleWMActivationNotify,
AppleWMActivationNotifyMask,
AppleWMIsInactive, 0);
QuartzHide();
break;
+ case kXDarwinDisplayChanged:
+ DEBUG_LOG("kXDarwinDisplayChanged\n");
+ QuartzUpdateScreens();
+ break;
+
+ case kXDarwinWindowState:
+ DEBUG_LOG("kXDarwinWindowState\n");
+ RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
+ xe->u.clientMessage.u.l.longs1);
+ break;
+
+ case kXDarwinWindowMoved:
+ DEBUG_LOG("kXDarwinWindowMoved\n");
+ RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0);
+ break;
+
+ case kXDarwinToggleFullscreen:
+ DEBUG_LOG("kXDarwinToggleFullscreen\n");
+#ifdef DARWIN_DDX_MISSING
+ if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
+ else if (quartzHasRoot) QuartzHide();
+ else QuartzShow();
+#else
+ // ErrorF("kXDarwinToggleFullscreen not implemented\n");
+#endif
+ break;
+
+ case kXDarwinSetRootless:
+ DEBUG_LOG("kXDarwinSetRootless\n");
+#ifdef DARWIN_DDX_MISSING
+ QuartzSetRootless(xe->u.clientMessage.u.l.longs0);
+ if (!quartzEnableRootless && !quartzHasRoot) QuartzHide();
+#else
+ // ErrorF("kXDarwinSetRootless not implemented\n");
+#endif
+ break;
+
case kXDarwinSetRootClip:
QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0);
break;
@@ -374,68 +489,12 @@ void DarwinModeProcessEvent(
QuartzWritePasteboard();
break;
- /*
- * AppleWM events
- */
- case kXDarwinControllerNotify:
- AppleWMSendEvent(AppleWMControllerNotify,
- AppleWMControllerNotifyMask,
- xe->u.clientMessage.u.l.longs0,
- xe->u.clientMessage.u.l.longs1);
- break;
-
- case kXDarwinPasteboardNotify:
- AppleWMSendEvent(AppleWMPasteboardNotify,
- AppleWMPasteboardNotifyMask,
- xe->u.clientMessage.u.l.longs0,
- xe->u.clientMessage.u.l.longs1);
- break;
-
- case kXDarwinDisplayChanged:
- QuartzUpdateScreens();
- break;
-
case kXDarwinBringAllToFront:
- RootlessOrderAllWindows();
+ DEBUG_LOG("kXDarwinBringAllToFront\n");
+ RootlessOrderAllWindows();
break;
- case kXDarwinWindowState:
- ErrorF("kXDarwinWindowState\n");
- break;
- case kXDarwinWindowMoved: {
- WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0;
- short x = xe->u.clientMessage.u.l.longs1,
- y = xe->u.clientMessage.u.l.longs2;
- ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y);
- RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove);
- }
- break;
-
default:
- ErrorF("Unknown application defined event type %d.\n",
- xe->u.u.type);
+ ErrorF("Unknown application defined event type %d.\n", xe->u.u.type);
}
}
-
-
-/*
- * DarwinModeGiveUp
- * Cleanup before X server shutdown
- * Release the screen and restore the Aqua cursor.
- */
-void DarwinModeGiveUp(void)
-{
-#if 0
-// Trying to switch cursors when quitting causes deadlock
- int i;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- if (screenInfo.screens[i]) {
- QuartzSuspendXCursor(screenInfo.screens[i]);
- }
- }
-#endif
-
- if (!quartzRootless)
- quartzProcs->ReleaseScreens();
-}
diff --git a/hw/darwin/quartz/quartz.h b/hw/xquartz/quartz.h
index fa7499df1..fbe308a92 100644
--- a/hw/darwin/quartz/quartz.h
+++ b/hw/xquartz/quartz.h
@@ -122,7 +122,13 @@ typedef struct _QuartzModeProcs {
} QuartzModeProcsRec, *QuartzModeProcsPtr;
extern QuartzModeProcsPtr quartzProcs;
-
-Bool QuartzLoadDisplayBundle(const char *dpyBundleName);
+extern int quartzHasRoot, quartzEnableRootless;
+
+Bool QuartzAddScreen(int index, ScreenPtr pScreen);
+Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
+void QuartzInitOutput(int argc,char **argv);
+void QuartzInitInput(int argc, char **argv);
+void QuartzGiveUp(void);
+void QuartzProcessEvent(xEvent *xe);
#endif
diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index 8a337daba..86bb20015 100644
--- a/hw/darwin/quartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -36,7 +36,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartzAudio.h"
@@ -244,10 +246,10 @@ static void QuartzCoreAudioBell(
/*
- * DarwinModeBell
+ * QuartzBell
* Ring the bell
*/
-void DarwinModeBell(
+void QuartzBell(
int volume, // volume in percent of max
DeviceIntPtr pDevice,
pointer ctrl,
diff --git a/hw/darwin/quartz/quartzAudio.h b/hw/xquartz/quartzAudio.h
index c406bbc2a..c406bbc2a 100644
--- a/hw/darwin/quartz/quartzAudio.h
+++ b/hw/xquartz/quartzAudio.h
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m
index 3987cd2c2..0086c5ca4 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/xquartz/quartzCocoa.m
@@ -32,7 +32,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
@@ -42,63 +44,12 @@
#include <Cocoa/Cocoa.h>
-#ifndef INXQUARTZ
-#import "Preferences.h"
-#endif
#include "pseudoramiX.h"
extern void FatalError(const char *, ...);
extern char *display;
extern int noPanoramiXExtension;
-#ifndef INXQUARTZ
-/*
- * QuartzReadPreferences
- * Read the user preferences from the Cocoa front end.
- */
-void QuartzReadPreferences(void)
-{
- char *fileString;
-
- darwinFakeButtons = [Preferences fakeButtons];
- darwinFakeMouse2Mask = [Preferences button2Mask];
- darwinFakeMouse3Mask = [Preferences button3Mask];
- // darwinMouseAccelChange = [Preferences mouseAccelChange];
- quartzUseSysBeep = [Preferences systemBeep];
- quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents];
-
- // quartzRootless has already been set
- if (quartzRootless) {
- // Use PseudoramiX instead of Xinerama
- noPanoramiXExtension = TRUE;
- noPseudoramiXExtension = ![Preferences xinerama];
-
- quartzUseAGL = [Preferences useAGL];
- } else {
- noPanoramiXExtension = ![Preferences xinerama];
- noPseudoramiXExtension = TRUE;
-
- // Full screen can't use AGL for GLX
- quartzUseAGL = FALSE;
- }
-
- if ([Preferences useKeymapFile]) {
- fileString = (char *) [[Preferences keymapFile] lossyCString];
- darwinKeymapFile = (char *) malloc(strlen(fileString)+1);
- if (! darwinKeymapFile)
- FatalError("malloc failed in QuartzReadPreferences()!\n");
- strcpy(darwinKeymapFile, fileString);
- }
-
- display = (char *) malloc(8);
- if (! display)
- FatalError("malloc failed in QuartzReadPreferences()!\n");
- snprintf(display, 8, "%i", [Preferences display]);
-
- darwinDesiredDepth = [Preferences depth] - 1;
-}
-#endif
-
/*
* QuartzWriteCocoaPasteboard
* Write text to the Mac OS X pasteboard.
@@ -145,7 +96,7 @@ char *QuartzReadCocoaPasteboard(void)
char *buffer;
if (! string) return NULL;
- buffer = (char *) [string lossyCString];
+ buffer = (char *) [string UTF8String];
text = (char *) malloc(strlen(buffer)+1);
if (text)
strcpy(text, buffer);
@@ -162,19 +113,6 @@ char *QuartzReadCocoaPasteboard(void)
int QuartzFSUseQDCursor(
int depth) // screen depth
{
-#ifndef INXQUARTZ
- switch ([Preferences useQDCursor]) {
- case qdCursor_Always:
- return TRUE;
- case qdCursor_Never:
- return FALSE;
- case qdCursor_Not8Bit:
- if (depth > 8)
- return TRUE;
- else
- return FALSE;
- }
-#endif
return TRUE;
}
@@ -184,9 +122,9 @@ int QuartzFSUseQDCursor(
* Clean out any autoreleased objects.
*/
void QuartzBlockHandler(
- void *blockData,
- void *pTimeout,
- void *pReadmask)
+ pointer blockData,
+ OSTimePtr pTimeout,
+ pointer pReadmask)
{
static NSAutoreleasePool *aPool = nil;
@@ -199,9 +137,9 @@ void QuartzBlockHandler(
* QuartzWakeupHandler
*/
void QuartzWakeupHandler(
- void *blockData,
+ pointer blockData,
int result,
- void *pReadmask)
+ pointer pReadmask)
{
// nothing here
}
diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/xquartz/quartzCommon.h
index f5dff662c..a0d467389 100644
--- a/hw/darwin/quartz/quartzCommon.h
+++ b/hw/xquartz/quartzCommon.h
@@ -46,6 +46,8 @@
#undef Cursor
#undef WindowPtr
#undef Picture
+#include <X11/Xdefs.h>
+#include "privates.h"
// Quartz specific per screen storage structure
typedef struct {
@@ -58,11 +60,10 @@ typedef struct {
} QuartzScreenRec, *QuartzScreenPtr;
#define QUARTZ_PRIV(pScreen) \
- ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr)
+ ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey))
// Data stored at startup for Cocoa front end
extern int quartzEventWriteFD;
-extern int quartzStartClients;
// User preferences used by Quartz modes
extern int quartzRootless;
@@ -73,7 +74,7 @@ extern int quartzEnableKeyEquivalents;
// Other shared data
extern int quartzServerVisible;
extern int quartzServerQuitting;
-extern int quartzScreenIndex;
+extern DevPrivateKey quartzScreenKey;
extern int aquaMenuBarHeight;
// Name of GLX bundle for native OpenGL
@@ -87,8 +88,8 @@ void QuartzSetWindowMenu(int nitems, const char **items,
void QuartzFSCapture(void);
void QuartzFSRelease(void);
int QuartzFSUseQDCursor(int depth);
-void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask);
-void QuartzWakeupHandler(void *blockData, int result, void *pReadmask);
+void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask);
+void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask);
// Messages that can be sent to the main thread.
enum {
diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/xquartz/quartzCursor.c
index 0fa04e677..f82ccd380 100644
--- a/hw/darwin/quartz/quartzCursor.c
+++ b/hw/xquartz/quartzCursor.c
@@ -2,8 +2,6 @@
*
* Support for using the Quartz Window Manager cursor
*
- **************************************************************/
-/*
* Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
@@ -30,7 +28,9 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
@@ -56,8 +56,7 @@ typedef struct {
miPointerSpriteFuncPtr spriteFuncs;
} QuartzCursorScreenRec, *QuartzCursorScreenPtr;
-static int darwinCursorScreenIndex = -1;
-static unsigned long darwinCursorGeneration = 0;
+static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey;
static CursorPtr quartzLatentCursor = NULL;
static QD_Cursor gQDArrow; // QuickDraw arrow cursor
@@ -66,8 +65,8 @@ static CCrsrHandle currentCursor = NULL;
static pthread_mutex_t cursorMutex;
static pthread_cond_t cursorCondition;
-#define CURSOR_PRIV(pScreen) \
- ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr)
+#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \
+ dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey))
#define HIDE_QD_CURSOR(pScreen, visible) \
if (visible) { \
@@ -92,9 +91,7 @@ static pthread_cond_t cursorCondition;
/* Acquire lock and tell the main thread to change cursor */ \
pthread_mutex_lock(&cursorMutex); \
currentCursor = (CCrsrHandle) (cursorH); \
-#ifndef INXQUARTZ
QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \
-#endif
\
/* Wait for the main thread to change the cursor */ \
pthread_cond_wait(&cursorCondition, &cursorMutex); \
@@ -321,7 +318,7 @@ QuartzRealizeCursor(
if (!qdCursor) return FALSE;
// save the result
- pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor;
+ dixSetPrivate(&pCursor->devPrivates, pScreen, qdCursor);
return TRUE;
}
@@ -348,13 +345,13 @@ QuartzUnrealizeCursor(
(pScreen, pCursor);
}
} else {
- CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum];
-
+ CCrsrHandle oldCursor = dixLookupPrivate(&pCursor->devPrivates,
+ pScreen);
if (currentCursor != oldCursor) {
// This should only fail when quitting, in which case we just leak.
FreeQDCursor(oldCursor);
}
- pCursor->devPriv[pScreen->myNum] = NULL;
+ dixSetPrivate(&pCursor->devPrivates, pScreen, NULL);
return TRUE;
}
}
@@ -394,7 +391,7 @@ QuartzSetCursor(
(*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
ScreenPriv->qdCursorMode = TRUE;
- CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]);
+ CHANGE_QD_CURSOR(dixLookupPrivate(&pCursor->devPrivates, pScreen));
SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible);
}
else if (quartzRootless) {
@@ -594,13 +591,6 @@ QuartzInitCursor(
return FALSE;
}
- // allocate private storage for this screen's QuickDraw cursor info
- if (darwinCursorGeneration != serverGeneration) {
- if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- darwinCursorGeneration = serverGeneration;
- }
-
ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) );
if (!ScreenPriv) return FALSE;
@@ -613,7 +603,7 @@ QuartzInitCursor(
// initialize QuickDraw cursor handling
GetQDGlobalsArrow(&gQDArrow);
PointPriv = (miPointerScreenPtr)
- pScreen->devPrivates[miPointerScreenIndex].ptr;
+ dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
PointPriv->spriteFuncs = &quartzSpriteFuncsRec;
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/xquartz/quartzCursor.h
index 56a02098d..56a02098d 100644
--- a/hw/darwin/quartz/fullscreen/quartzCursor.h
+++ b/hw/xquartz/quartzCursor.h
diff --git a/hw/xquartz/quartzForeground.c b/hw/xquartz/quartzForeground.c
new file mode 100644
index 000000000..bfea642d1
--- /dev/null
+++ b/hw/xquartz/quartzForeground.c
@@ -0,0 +1,45 @@
+/* foreground.c - Push the current process into the foreground.
+
+ This is in a separate file because of Quartz/X type conflicts.
+
+ Copyright (c) 2007 Jeremy Huddleston
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization. */
+
+#include <ApplicationServices/ApplicationServices.h>
+#include <stdio.h>
+
+int QuartzMoveToForeground() {
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication);
+ if( returnCode == 0) {
+ fprintf(stderr, "TransformProcessType: Success\n");
+ SetFrontProcess(&psn);
+ } else {
+ fprintf(stderr, "TransformProcessType: Failure\n");
+ }
+ return (int)returnCode;
+}
diff --git a/hw/xquartz/quartzForeground.h b/hw/xquartz/quartzForeground.h
new file mode 100644
index 000000000..4fc21c72f
--- /dev/null
+++ b/hw/xquartz/quartzForeground.h
@@ -0,0 +1,37 @@
+/* foreground.h - Push the current process into the foreground.
+
+ This is in a separate file because of Quartz/X type conflicts.
+
+ Copyright (c) 2007 Jeremy Huddleston
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization. */
+
+#ifndef _QUARTZ_FOREGROUND_H_
+#define _QUARTZ_FOREGROUND_H_
+
+int QuartzMoveToForeground();
+
+#endif /* _QUARTZ_FOREGROUND_H_ */
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index b580a8e84..9b899ca67 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -1,10 +1,9 @@
/*
quartzKeyboard.c
- Code to build a keymap using the Carbon Keyboard Layout API,
- which is supported on Mac OS X 10.2 and newer.
+ Code to build a keymap using the Carbon Keyboard Layout API.
- Copyright (c) 2003, 2007 Apple Inc.
+ Copyright (c) 2003-2007 Apple Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
@@ -32,18 +31,19 @@
prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzCommon.h"
+
#include <CoreServices/CoreServices.h>
#include <Carbon/Carbon.h>
-#include "darwinKeyboard.h"
+#include "quartzKeyboard.h"
#include "X11/keysym.h"
#include "keysym2ucs.h"
-#ifdef HAS_KL_API
-
#define HACK_MISSING 1
#define HACK_KEYPAD 1
@@ -146,27 +146,19 @@ const static struct {
{UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */
};
-unsigned int
-DarwinModeSystemKeymapSeed (void)
-{
+unsigned int QuartzSystemKeymapSeed(void) {
static unsigned int seed;
-
static KeyboardLayoutRef last_key_layout;
KeyboardLayoutRef key_layout;
KLGetCurrentKeyboardLayout (&key_layout);
-
- if (key_layout != last_key_layout)
- seed++;
-
+ if (key_layout != last_key_layout) seed++;
last_key_layout = key_layout;
return seed;
}
-static inline UniChar
-macroman2ucs (unsigned char c)
-{
+static inline UniChar macroman2ucs(unsigned char c) {
/* Precalculated table mapping MacRoman-128 to Unicode. Generated
by creating single element CFStringRefs then extracting the
first character. */
@@ -190,29 +182,20 @@ macroman2ucs (unsigned char c)
0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7,
};
- if (c < 128)
- return c;
- else
- return table[c - 128];
+ if (c < 128) return c;
+ else return table[c - 128];
}
-static KeySym
-make_dead_key (KeySym in)
-{
+static KeySym make_dead_key(KeySym in) {
int i;
for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++)
- {
- if (dead_keys[i].normal == in)
- return dead_keys[i].dead;
- }
+ if (dead_keys[i].normal == in) return dead_keys[i].dead;
return in;
}
-Bool
-DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
-{
+Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
KeyboardLayoutRef key_layout;
const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES;
@@ -222,89 +205,66 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
KeySym *k;
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
- if (currentKeyLayoutRef)
- {
- CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
- if (currentKeyLayoutDataRef)
- chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
- }
-
- if(chr_data == NULL) {
- KLGetCurrentKeyboardLayout (&key_layout);
- KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
-
- if (chr_data != NULL)
- {
- is_uchr = 1;
- keyboard_type = LMGetKbdType ();
- }
- else
- {
- KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
-
- if (chr_data == NULL)
- {
- ErrorF ( "Couldn't get uchr or kchr resource\n");
- return FALSE;
- }
-
- is_uchr = 0;
- num_keycodes = 128;
- }
- }
+ keyboard_type = LMGetKbdType ();
+ if (currentKeyLayoutRef) {
+ CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
+ if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+ }
+
+ if (chr_data == NULL) {
+ KLGetCurrentKeyboardLayout (&key_layout);
+ KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+ }
+
+ if (chr_data == NULL) {
+ KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+ is_uchr = 0;
+ num_keycodes = 128;
+ }
+
+ if (chr_data == NULL) {
+ ErrorF ( "Couldn't get uchr or kchr resource\n");
+ return FALSE;
+ }
/* Scan the keycode range for the Unicode character that each
key produces in the four shift states. Then convert that to
an X11 keysym (which may just the bit that says "this is
Unicode" if it can't find the real symbol.) */
- for (i = 0; i < num_keycodes; i++)
- {
+ for (i = 0; i < num_keycodes; i++) {
static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION,
MOD_OPTION | MOD_SHIFT};
k = info->keyMap + i * GLYPHS_PER_KEY;
- for (j = 0; j < 4; j++)
- {
- if (is_uchr)
- {
+ for (j = 0; j < 4; j++) {
+ if (is_uchr) {
UniChar s[8];
UniCharCount len;
- UInt32 dead_key_state, extra_dead;
+ UInt32 dead_key_state = 0, extra_dead = 0;
- dead_key_state = 0;
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
mods[j] >> 8, keyboard_type, 0,
&dead_key_state, 8, &len, s);
- if (err != noErr)
- continue;
+ if (err != noErr) continue;
- if (len == 0 && dead_key_state != 0)
- {
+ if (len == 0 && dead_key_state != 0) {
/* Found a dead key. Work out which one it is, but
remembering that it's dead. */
-
- extra_dead = 0;
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
mods[j] >> 8, keyboard_type,
kUCKeyTranslateNoDeadKeysMask,
&extra_dead, 8, &len, s);
- if (err != noErr)
- continue;
+ if (err != noErr) continue;
}
- if (len > 0 && s[0] != 0x0010)
- {
+ if (len > 0 && s[0] != 0x0010) {
k[j] = ucs2keysym (s[0]);
-
- if (dead_key_state != 0)
- k[j] = make_dead_key (k[j]);
+ if (dead_key_state != 0) k[j] = make_dead_key (k[j]);
}
- }
- else
- {
- UInt32 c, state = 0;
+ } else { // kchr
+ UInt32 c, state = 0, state2 = 0;
UInt16 code;
code = i | mods[j];
@@ -316,82 +276,49 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
us the actual dead character. */
if (state != 0)
- {
- UInt32 state2 = 0;
c = KeyTranslate (chr_data, code | 128, &state2);
- }
/* Characters seem to be in MacRoman encoding. */
- if (c != 0 && c != 0x0010)
- {
+ if (c != 0 && c != 0x0010) {
k[j] = ucs2keysym (macroman2ucs (c & 255));
- if (state != 0)
- k[j] = make_dead_key (k[j]);
+ if (state != 0) k[j] = make_dead_key (k[j]);
}
}
}
-
- if (k[3] == k[2])
- k[3] = NoSymbol;
- if (k[2] == k[1])
- k[2] = NoSymbol;
- if (k[1] == k[0])
- k[1] = NoSymbol;
- if (k[0] == k[2] && k[1] == k[3])
- k[2] = k[3] = NoSymbol;
+
+ if (k[3] == k[2]) k[3] = NoSymbol;
+ if (k[2] == k[1]) k[2] = NoSymbol;
+ if (k[1] == k[0]) k[1] = NoSymbol;
+ if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
}
/* Fix up some things that are normally missing.. */
- if (HACK_MISSING)
- {
- for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++)
- {
+ if (HACK_MISSING) {
+ for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) {
k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY;
- if (k[0] == NoSymbol && k[1] == NoSymbol
+ if (k[0] == NoSymbol && k[1] == NoSymbol
&& k[2] == NoSymbol && k[3] == NoSymbol)
- {
- k[0] = known_keys[i].keysym;
- }
+ k[0] = known_keys[i].keysym;
}
}
/* And some more things. We find the right symbols for the numeric
keypad, but not the KP_ keysyms. So try to convert known keycodes. */
- if (HACK_KEYPAD)
- {
+ if (HACK_KEYPAD) {
for (i = 0; i < sizeof (known_numeric_keys)
- / sizeof (known_numeric_keys[0]); i++)
- {
+ / sizeof (known_numeric_keys[0]); i++) {
k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY;
if (k[0] == known_numeric_keys[i].normal)
- {
k[0] = known_numeric_keys[i].keypad;
- }
}
}
- if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
-
+ if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
+
return TRUE;
}
-
-#else /* !HAS_KL_API */
-
-unsigned int
-DarwinModeSystemKeymapSeed (void)
-{
- return 0;
-}
-
-Bool
-DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
-{
- return FALSE;
-}
-
-#endif /* HAS_KL_API */
diff --git a/hw/darwin/darwinKeyboard.h b/hw/xquartz/quartzKeyboard.h
index 368aee954..0c7e70e48 100644
--- a/hw/darwin/darwinKeyboard.h
+++ b/hw/xquartz/quartzKeyboard.h
@@ -24,8 +24,8 @@
* use or other dealings in this Software without prior written authorization.
*/
-#ifndef DARWIN_KEYBOARD_H
-#define DARWIN_KEYBOARD_H 1
+#ifndef QUARTZ_KEYBOARD_H
+#define QUARTZ_KEYBOARD_H 1
#define XK_TECHNICAL // needed to get XK_Escape
#define XK_PUBLISHING
@@ -36,6 +36,7 @@
// unshifted, shifted, modeswitch unshifted, modeswitch shifted
#define GLYPHS_PER_KEY 4
#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better
+#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1
typedef struct darwinKeyboardInfo_struct {
@@ -44,8 +45,9 @@ typedef struct darwinKeyboardInfo_struct {
unsigned char modifierKeycodes[32][2];
} darwinKeyboardInfo;
+/* These functions need to be implemented by XQuartz, XDarwin, etc. */
void DarwinKeyboardReload(DeviceIntPtr pDev);
-unsigned int DarwinModeSystemKeymapSeed(void);
-Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info);
+Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info);
+unsigned int QuartzSystemKeymapSeed(void);
-#endif /* DARWIN_KEYBOARD_H */
+#endif /* QUARTZ_KEYBOARD_H */
diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/xquartz/quartzPasteboard.c
index af25fc892..0cecff54a 100644
--- a/hw/darwin/quartz/quartzPasteboard.c
+++ b/hw/xquartz/quartzPasteboard.c
@@ -30,9 +30,12 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "quartzPasteboard.h"
+
#include <X11/Xatom.h>
#include "windowstr.h"
#include "propertyst.h"
diff --git a/hw/darwin/quartz/quartzPasteboard.h b/hw/xquartz/quartzPasteboard.h
index afcb6e587..afcb6e587 100644
--- a/hw/darwin/quartz/quartzPasteboard.h
+++ b/hw/xquartz/quartzPasteboard.h
diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c
new file mode 100644
index 000000000..1b2a22623
--- /dev/null
+++ b/hw/xquartz/quartzStartup.c
@@ -0,0 +1,111 @@
+/**************************************************************
+ *
+ * Startup code for the Quartz Darwin X Server
+ *
+ * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include "quartzCommon.h"
+#include "X11Controller.h"
+#include "darwin.h"
+#include "quartz.h"
+#include "opaque.h"
+#include "micmap.h"
+
+#ifdef NDEBUG
+#undef NDEBUG
+#include <assert.h>
+#define NDEBUG 1
+#else
+#include <assert.h>
+#endif
+
+char **envpGlobal; // argcGlobal and argvGlobal
+ // are from dix/globals.c
+
+static void server_thread (void *arg) {
+ extern int main(int argc, char **argv, char **envp);
+ exit (main (argcGlobal, argvGlobal, envpGlobal));
+}
+
+/*
+ * DarwinHandleGUI
+ * This function is called first from main(). The first time
+ * it is called we start the Mac OS X front end. The front end
+ * will call main() again from another thread to run the X
+ * server. On the second call this function loads the user
+ * preferences set by the Mac OS X front end.
+ */
+void DarwinHandleGUI(int argc, char **argv, char **envp) {
+ static Bool been_here = FALSE;
+ int i;
+ int fd[2];
+
+ if (been_here) {
+ return;
+ }
+ been_here = TRUE;
+
+ // Make a pipe to pass events
+ assert( pipe(fd) == 0 );
+ darwinEventReadFD = fd[0];
+ darwinEventWriteFD = fd[1];
+ fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK);
+
+ // Store command line arguments to pass back to main()
+ argcGlobal = argc;
+ argvGlobal = argv;
+ envpGlobal = envp;
+
+ for (i = 1; i < argc; i++) {
+ // Display version info without starting Mac OS X UI if requested
+ if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) {
+ DarwinPrintBanner();
+ exit(0);
+ }
+ }
+
+ /* Initially I ran the X server on the main thread, and received
+ events on the second thread. But now we may be using Carbon,
+ that needs to run on the main thread. (Otherwise, when it's
+ prebound, it will initialize itself on the wrong thread)
+
+ grr.. but doing that means that if the X thread gets scheduled
+ before the main thread when we're _not_ prebound, things fail,
+ so initialize by hand. */
+
+ extern void _InitHLTB(void);
+
+ _InitHLTB();
+ X11ControllerMain(argc, (const char **)argv, server_thread, NULL);
+ exit(0);
+}
diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am
new file mode 100644
index 000000000..ae1b19297
--- /dev/null
+++ b/hw/xquartz/xpr/Makefile.am
@@ -0,0 +1,78 @@
+bin_PROGRAMS = Xquartz
+
+AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
+AM_CPPFLAGS = \
+ -I$(srcdir) -I$(srcdir)/.. \
+ -I$(top_srcdir)/miext \
+ -I$(top_srcdir)/miext/rootless \
+ -I$(top_srcdir)/miext/rootless/safeAlpha
+
+Xquartz_SOURCES = \
+ appledri.c \
+ dri.c \
+ xprAppleWM.c \
+ xprCursor.c \
+ xprFrame.c \
+ xprScreen.c \
+ x-hash.c \
+ x-hook.c \
+ x-list.c
+
+Xquartz_LDADD = \
+ $(top_builddir)/hw/xquartz/libXquartz.la \
+ $(top_builddir)/dix/dixfonts.lo \
+ $(top_builddir)/config/libconfig.a \
+ $(top_builddir)/dix/libdix.la \
+ $(top_builddir)/os/libos.la \
+ $(top_builddir)/dix/libxpstubs.la \
+ $(top_builddir)/miext/shadow/libshadow.la \
+ $(top_builddir)/fb/libfb.la \
+ $(top_builddir)/mi/libmi.la \
+ $(top_builddir)/composite/libcomposite.la \
+ $(top_builddir)/damageext/libdamageext.la \
+ $(top_builddir)/miext/damage/libdamage.la \
+ $(top_builddir)/xfixes/libxfixes.la \
+ $(top_builddir)/miext/cw/libcw.la \
+ $(top_builddir)/Xext/libXext.la \
+ $(top_builddir)/xkb/libxkb.la \
+ $(top_builddir)/xkb/libxkbstubs.la \
+ $(top_builddir)/Xi/libXi.la \
+ $(top_builddir)/dbe/libdbe.la \
+ $(top_builddir)/record/librecord.la \
+ $(top_builddir)/XTrap/libxtrap.la \
+ $(top_builddir)/miext/rootless/librootless.la \
+ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
+ $(top_builddir)/miext/rootless/accel/librlAccel.la \
+ $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
+
+Xquartz_LDFLAGS = \
+ -XCClinker -Objc \
+ -Wl,-u,_miDCInitialize \
+ -Wl,-framework,Carbon \
+ -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
+ -Wl,-framework,OpenGL \
+ -Wl,-framework,Cocoa \
+ -Wl,-framework,CoreAudio \
+ -Wl,-framework,IOKit
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = Xquartz.man.pre
+appman_PROCESSED = $(appman_PRE:man.pre=man)
+appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
+
+CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
+
+include $(top_srcdir)/cpprules.in
+
+.man.$(APP_MAN_SUFFIX):
+ cp $< $@
+
+EXTRA_DIST = \
+ dri.h \
+ dristruct.h \
+ appledri.h \
+ appledristr.h \
+ x-hash.h \
+ x-hook.h \
+ x-list.h \
+ xpr.h
diff --git a/hw/darwin/apple/Xquartz.man b/hw/xquartz/xpr/Xquartz.man.pre
index edac30ee9..315db1ca4 100644
--- a/hw/darwin/apple/Xquartz.man
+++ b/hw/xquartz/xpr/Xquartz.man.pre
@@ -1,5 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.4 2002/01/09 18:01:58 torrey Exp $
-.\"
.TH XQUARTZ 1 __vendorversion__
.SH NAME
Xquartz \- X window system server for Quartz operating system
@@ -67,48 +65,48 @@ of the main display.
.SH CUSTOMIZATION
\fIXquartz\fP can also be customized using the defaults(1) command. The available options are:
.TP 8
-.B defaults write com.apple.x11 enable_fake_buttons -boolean true
+.B defaults write org.x.X11 enable_fake_buttons -boolean true
Equivalent to the \fB-fakebuttons\fP command line option.
.TP 8
-.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP
+.B defaults write org.x.X11 fake_button2 \fImodifiers\fP
Equivalent to the \fB-fakemouse2\fP option.
.TP 8
-.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP
+.B defaults write org.x.X11 fake_button3 \fImodifiers\fP
Equivalent to the \fB-fakemouse3\fP option.
.TP 8
-.B defaults write com.apple.x11 swap_alt_meta -boolean true
+.B defaults write org.x.X11 swap_alt_meta -boolean true
Equivalent to the \fB-swapAltMeta\fP option.
.TP 8
-.B defaults write com.apple.x11 keymap_file \fIfilename\fP
+.B defaults write org.x.X11 keymap_file \fIfilename\fP
Equivalent to the \fB-keymap\fP option.
.TP 8
-.B defaults write com.apple.x11 no_quit_alert -boolean true
+.B defaults write org.x.X11 no_quit_alert -boolean true
Disables the alert dialog displayed when attempting to quit X11.
.TP 8
-.B defaults write com.apple.x11 no_auth -boolean true
+.B defaults write org.x.X11 no_auth -boolean true
Stops the X server requiring that clients authenticate themselves when
connecting. See Xsecurity(__miscmansuffix__).
.TP 8
-.B defaults write com.apple.x11 nolisten_tcp -boolean true
+.B defaults write org.x.X11 nolisten_tcp -boolean true
Prevents the X server accepting remote connections.
.TP 8
-.B defaults write com.apple.x11 xinit_kills_server -boolean false
+.B defaults write org.x.X11 xinit_kills_server -boolean false
Stops the X server exiting when the xinitrc script terminates.
.TP 8
-.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false
+.B defaults write org.x.X11 fullscreen_hotkeys -boolean false
Allows system hotkeys to be handled while in X11 fullscreen mode.
.TP 8
-.B defaults write com.apple.x11 enable_system_beep -boolean false
+.B defaults write org.x.X11 enable_system_beep -boolean false
Don't use the standard system beep effect for X11 alerts.
.TP 8
-.B defaults write com.apple.x11 enable_key_equivalents -boolean false
+.B defaults write org.x.X11 enable_key_equivalents -boolean false
Disable menu keyboard equivalents while X11 windows are focused.
.TP 8
-.B defaults write com.apple.x11 depth \fIdepth\fP
+.B defaults write org.x.X11 depth \fIdepth\fP
Equivalent to the \fB-depth\fP option.
.SH "SEE ALSO"
.PP
-X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1)
+X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1)
.PP
.SH AUTHORS
XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 70b740077..95a443976 100644
--- a/hw/darwin/quartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -35,7 +35,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#define NEED_REPLIES
#define NEED_EVENTS
@@ -174,7 +176,7 @@ ProcAppleDRIAuthConnection(
rep.authenticated = 1;
if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) {
- ErrorF("Failed to authenticate %u\n", stuff->magic);
+ ErrorF("Failed to authenticate %u\n", (unsigned int)stuff->magic);
rep.authenticated = 0;
}
WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep);
diff --git a/hw/darwin/quartz/xpr/appledri.h b/hw/xquartz/xpr/appledri.h
index c4e43be12..c4e43be12 100644
--- a/hw/darwin/quartz/xpr/appledri.h
+++ b/hw/xquartz/xpr/appledri.h
diff --git a/hw/darwin/quartz/xpr/appledristr.h b/hw/xquartz/xpr/appledristr.h
index 8649fd329..8649fd329 100644
--- a/hw/darwin/quartz/xpr/appledristr.h
+++ b/hw/xquartz/xpr/appledristr.h
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index fd0bff1a9..3aacb192d 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -34,10 +34,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
+#ifdef XFree86LOADER
+#include "xf86.h"
+#include "xf86_ansic.h"
+#else
#include <sys/time.h>
#include <unistd.h>
+#endif
#define NEED_REPLIES
#define NEED_EVENTS
@@ -64,9 +71,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <AvailabilityMacros.h>
-static int DRIScreenPrivIndex = -1;
-static int DRIWindowPrivIndex = -1;
-static int DRIPixmapPrivIndex = -1;
+static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
+static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
+static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKey;
static RESTYPE DRIDrawablePrivResType;
@@ -178,11 +185,11 @@ DRIScreenInit(ScreenPtr pScreen)
pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec));
if (!pDRIPriv) {
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
return FALSE;
}
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv);
pDRIPriv->directRenderingSupport = TRUE;
pDRIPriv->nrWindows = 0;
@@ -213,13 +220,6 @@ DRIFinishScreenInit(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- /* Allocate zero sized private area for each window. Should a window
- * become a DRI window, we'll hang a DRIWindowPrivateRec off of this
- * private index.
- */
- if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0))
- return FALSE;
-
/* Wrap DRI support */
pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree;
pScreen->ValidateTree = DRIValidateTree;
@@ -248,31 +248,13 @@ DRICloseScreen(ScreenPtr pScreen)
if (pDRIPriv && pDRIPriv->directRenderingSupport) {
xfree(pDRIPriv);
- pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
+ dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL);
}
}
Bool
DRIExtensionInit(void)
{
- static unsigned long DRIGeneration = 0;
-
- if (DRIGeneration != serverGeneration) {
- if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
- DRIGeneration = serverGeneration;
- }
-
- /*
- * Allocate a window private index with a zero sized private area for
- * each window, then should a window become a DRI window, we'll hang
- * a DRIWindowPrivateRec off of this private index. Do same for pixmaps.
- */
- if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0)
- return FALSE;
- if ((DRIPixmapPrivIndex = AllocatePixmapPrivateIndex()) < 0)
- return FALSE;
-
DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete);
return TRUE;
@@ -416,7 +398,8 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
}
/* save private off of preallocated index */
- pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv;
+ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey,
+ pDRIDrawablePriv);
}
}
@@ -449,7 +432,8 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
}
/* save private off of preallocated index */
- pPix->devPrivates[DRIPixmapPrivIndex].ptr = (pointer)pDRIDrawablePriv;
+ dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey,
+ pDRIDrawablePriv);
}
}
#endif
@@ -576,9 +560,9 @@ DRIDrawablePrivDelete(pointer pResource, XID id)
xfree(pDRIDrawablePriv);
if (pDrawable->type == DRAWABLE_WINDOW) {
- pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL;
+ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL);
} else if (pDrawable->type == DRAWABLE_PIXMAP) {
- pPix->devPrivates[DRIPixmapPrivIndex].ptr = NULL;
+ dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, NULL);
}
--pDRIPriv->nrWindows;
diff --git a/hw/darwin/quartz/xpr/dri.h b/hw/xquartz/xpr/dri.h
index cf2638a9f..cf2638a9f 100644
--- a/hw/darwin/quartz/xpr/dri.h
+++ b/hw/xquartz/xpr/dri.h
diff --git a/hw/darwin/quartz/xpr/dristruct.h b/hw/xquartz/xpr/dristruct.h
index 9a3d01c9b..19d78a973 100644
--- a/hw/darwin/quartz/xpr/dristruct.h
+++ b/hw/xquartz/xpr/dristruct.h
@@ -40,15 +40,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define DRI_MAX_DRAWABLES 256
-#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \
- ((DRIWindowPrivIndex < 0) ? \
- NULL : \
- ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr)))
+#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey))
-#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \
- ((DRIPixmapPrivIndex < 0) ? \
- NULL : \
- ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIPixmapPrivIndex].ptr)))
+#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pPix)->devPrivates, DRIPixmapPrivKey))
typedef struct _DRIDrawablePrivRec
{
@@ -61,13 +57,12 @@ typedef struct _DRIDrawablePrivRec
x_list *notifiers; /* list of (FUN . DATA) */
} DRIDrawablePrivRec, *DRIDrawablePrivPtr;
-#define DRI_SCREEN_PRIV(pScreen) \
- ((DRIScreenPrivIndex < 0) ? \
- NULL : \
- ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr)))
+#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey))
#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
- (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr))
+ dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \
+ DRIScreenPrivKey))
typedef struct _DRIScreenPrivRec
diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/xquartz/xpr/x-hash.c
index d24e05c1f..55d28bacd 100644
--- a/hw/darwin/quartz/xpr/x-hash.c
+++ b/hw/xquartz/xpr/x-hash.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-hash.h"
#include "x-list.h"
diff --git a/hw/darwin/quartz/xpr/x-hash.h b/hw/xquartz/xpr/x-hash.h
index 3456dbedf..3456dbedf 100644
--- a/hw/darwin/quartz/xpr/x-hash.h
+++ b/hw/xquartz/xpr/x-hash.h
diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/xquartz/xpr/x-hook.c
index 92c174e0b..bb873bbfb 100644
--- a/hw/darwin/quartz/xpr/x-hook.c
+++ b/hw/xquartz/xpr/x-hook.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-hook.h"
#include <stdlib.h>
@@ -65,6 +67,7 @@ X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data)
}
X_PFX (list_free) (to_delete);
+ return lst;
}
X_EXTERN void
diff --git a/hw/darwin/quartz/xpr/x-hook.h b/hw/xquartz/xpr/x-hook.h
index 392352d50..392352d50 100644
--- a/hw/darwin/quartz/xpr/x-hook.h
+++ b/hw/xquartz/xpr/x-hook.h
diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/xquartz/xpr/x-list.c
index 356bb79a4..3596dd355 100644
--- a/hw/darwin/quartz/xpr/x-list.c
+++ b/hw/xquartz/xpr/x-list.c
@@ -27,7 +27,9 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "x-list.h"
#include <stdlib.h>
diff --git a/hw/darwin/quartz/xpr/x-list.h b/hw/xquartz/xpr/x-list.h
index 04af024a2..04af024a2 100644
--- a/hw/darwin/quartz/xpr/x-list.h
+++ b/hw/xquartz/xpr/x-list.h
diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/xquartz/xpr/xpr.h
index 73a88c03d..b8c69df0d 100644
--- a/hw/darwin/quartz/xpr/xpr.h
+++ b/hw/xquartz/xpr/xpr.h
@@ -1,7 +1,6 @@
/*
* Xplugin rootless implementation
- */
-/*
+ *
* Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -32,12 +31,13 @@
#include "screenint.h"
-extern Bool QuartzModeBundleInit(void);
+Bool QuartzModeBundleInit(void);
void AppleDRIExtensionInit(void);
void xprAppleWMInit(void);
Bool xprInit(ScreenPtr pScreen);
Bool xprIsX11Window(void *nsWindow, int windowNumber);
+
void xprHideWindows(Bool hide);
Bool QuartzInitCursor(ScreenPtr pScreen);
diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c
index 1573d215b..bd82df03c 100644
--- a/hw/darwin/quartz/xpr/xprAppleWM.c
+++ b/hw/xquartz/xpr/xprAppleWM.c
@@ -1,7 +1,6 @@
/*
* Xplugin rootless implementation functions for AppleWM extension
- */
-/*
+ *
* Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
* Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
*
@@ -28,10 +27,12 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "xpr.h"
-#include "quartz/applewmExt.h"
+#include "applewmExt.h"
#include "rootless.h"
#include "Xplugin.h"
#include <X11/X.h>
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 10d326444..e084ef90e 100644
--- a/hw/darwin/quartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -29,11 +29,14 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
-#include "quartz/quartzCommon.h"
+#include "quartzCommon.h"
#include "xpr.h"
#include "darwin.h"
+#include "darwinEvents.h"
#include "Xplugin.h"
#include "mi.h"
@@ -51,11 +54,10 @@ typedef struct {
miPointerSpriteFuncPtr spriteFuncs;
} QuartzCursorScreenRec, *QuartzCursorScreenPtr;
-static int darwinCursorScreenIndex = -1;
-static unsigned long darwinCursorGeneration = 0;
+static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey;
-#define CURSOR_PRIV(pScreen) \
- ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr)
+#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \
+ dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey))
static Bool
@@ -367,26 +369,18 @@ QuartzInitCursor(ScreenPtr pScreen)
if (!miDCInitialize(pScreen, &quartzScreenFuncsRec))
return FALSE;
- /* allocate private storage for this screen's QuickDraw cursor info */
- if (darwinCursorGeneration != serverGeneration)
- {
- if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
- return FALSE;
-
- darwinCursorGeneration = serverGeneration;
- }
-
ScreenPriv = xcalloc(1, sizeof(QuartzCursorScreenRec));
if (ScreenPriv == NULL)
return FALSE;
- CURSOR_PRIV(pScreen) = ScreenPriv;
+ /* CURSOR_PRIV(pScreen) = ScreenPriv; */
+ dixSetPrivate(&pScreen->devPrivates, darwinCursorScreenKey, ScreenPriv);
/* override some screen procedures */
ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
pScreen->QueryBestSize = QuartzCursorQueryBestSize;
- PointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr;
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
PointPriv->spriteFuncs = &quartzSpriteFuncsRec;
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index c395f0743..b9a33de90 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -27,14 +27,16 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
#include "xpr.h"
#include "rootlessCommon.h"
#include "Xplugin.h"
#include "x-hash.h"
#include "x-list.h"
-#include "quartz/applewmExt.h"
+#include "applewmExt.h"
#include "propertyst.h"
#include "dix.h"
@@ -67,6 +69,7 @@ static inline xp_error
xprConfigureWindow(xp_window_id id, unsigned int mask,
const xp_window_changes *values)
{
+ // ErrorF("xprConfigureWindow()\n");
if (!no_configure_window)
return xp_configure_window(id, mask, values);
else
@@ -184,7 +187,7 @@ xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
wc.x = newX;
wc.y = newY;
-
+ // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc);
}
@@ -336,7 +339,7 @@ xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
void
xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
{
- DeleteProperty(oldWin, xa_native_window_id());
+ DeleteProperty(serverClient, oldWin, xa_native_window_id());
xprSetNativeProperty(pFrame);
}
@@ -423,6 +426,37 @@ xprGetXWindow(xp_window_id wid)
return winRec != NULL ? winRec->win : NULL;
}
+/*
+ * Given the id of a physical window, try to find the top-level (or root)
+ * X window that it represents.
+ */
+WindowPtr
+xprGetXWindowFromAppKit(int windowNumber)
+{
+ RootlessWindowRec *winRec;
+ Bool ret;
+ xp_window_id wid;
+
+ if (window_hash == NULL)
+ return FALSE;
+
+ /* need to lock, since this function can be called by any thread */
+
+ pthread_mutex_lock(&window_hash_mutex);
+
+ if (xp_lookup_native_window(windowNumber, &wid))
+ ret = xprGetXWindow(wid) != NULL;
+ else
+ ret = FALSE;
+
+ pthread_mutex_unlock(&window_hash_mutex);
+
+ if (!ret) return NULL;
+ winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL);
+
+ return winRec != NULL ? winRec->win : NULL;
+}
+
/*
* The windowNumber is an AppKit window number. Returns TRUE if xpr is
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 709e6e8cc..068b7b177 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -27,19 +27,24 @@
* use or other dealings in this Software without prior written authorization.
*/
+#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#endif
-#include "quartz/quartzCommon.h"
-#include "quartz/quartz.h"
+#include "quartzCommon.h"
+#include "quartz.h"
#include "xpr.h"
-#include "quartz/pseudoramiX.h"
+#include "pseudoramiX.h"
#include "darwin.h"
#include "rootless.h"
#include "safeAlpha/safeAlpha.h"
#include "dri.h"
#include "globals.h"
#include "Xplugin.h"
-#include "quartz/applewmExt.h"
+#include "applewmExt.h"
+
+// From xprFrame.c
+WindowPtr xprGetXWindow(xp_window_id wid);
#ifdef DAMAGE
# include "damage.h"
@@ -60,60 +65,54 @@ static void
eventHandler(unsigned int type, const void *arg,
unsigned int arg_size, void *data)
{
- switch (type)
- {
+ switch (type) {
case XP_EVENT_DISPLAY_CHANGED:
- // ErrorF("XP_EVENT_DISPLAY_MOVED\n");
- QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
- break;
+ DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
+ QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
+ break;
case XP_EVENT_WINDOW_STATE_CHANGED:
- // ErrorF("XP_EVENT_WINDOW_STATE_CHANGED\n");
- if (arg_size >= sizeof(xp_window_state_event))
- {
- const xp_window_state_event *ws_arg = arg;
-
- QuartzMessageServerThread(kXDarwinWindowState, 2,
- ws_arg->id, ws_arg->state);
- }
- break;
+ DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED\n");
+ if (arg_size >= sizeof(xp_window_state_event)) {
+ const xp_window_state_event *ws_arg = arg;
+
+ QuartzMessageServerThread(kXDarwinWindowState, 2,
+ ws_arg->id, ws_arg->state);
+ }
+ break;
case XP_EVENT_WINDOW_MOVED:
- // ErrorF("XP_EVENT_WINDOW_MOVED\n");
- if (arg_size == sizeof(xp_window_id))
- {
- xp_window_id id = * (xp_window_id *) arg;
- WindowPtr pWin = xprGetXWindow(id);
- BoxRec box;
- xp_error retval = xp_get_window_bounds(id, &box);
- if (retval != Success) {
- ErrorF("Unable to find new bounds for window\n");
- break;
- }
- QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1);
- }
- break;
-
+ DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
+ if (arg_size == sizeof(xp_window_id)) {
+ xp_window_id id = * (xp_window_id *) arg;
+ WindowPtr pWin = xprGetXWindow(id);
+ QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
+ }
+ break;
+
case XP_EVENT_SURFACE_DESTROYED:
+ DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
case XP_EVENT_SURFACE_CHANGED:
- // ErrorF("XP_EVENT_SURFACE_MOVED\n");
- if (arg_size == sizeof(xp_surface_id))
- {
- int kind;
-
- if (type == XP_EVENT_SURFACE_DESTROYED)
- kind = AppleDRISurfaceNotifyDestroyed;
- else
- kind = AppleDRISurfaceNotifyChanged;
-
- DRISurfaceNotify(*(xp_surface_id *) arg, kind);
+ DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n");
+ if (arg_size == sizeof(xp_surface_id)) {
+ int kind;
+
+ if (type == XP_EVENT_SURFACE_DESTROYED)
+ kind = AppleDRISurfaceNotifyDestroyed;
+ else
+ kind = AppleDRISurfaceNotifyChanged;
+
+ DRISurfaceNotify(*(xp_surface_id *) arg, kind);
}
break;
+ default:
+ ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n",
+ type);
}
}
/*
- * displayScreenBounds
+ * displayAtIndex
* Return the display ID for a particular display index.
*/
static CGDirectDisplayID
@@ -228,7 +227,7 @@ xprDisplayInit(void)
else
darwinScreensFound = 1;
- if (xp_init(XP_IN_BACKGROUND) != Success)
+ if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success)
FatalError("Could not initialize the Xplugin library.");
xp_select_events(XP_EVENT_DISPLAY_CHANGED
@@ -319,6 +318,7 @@ static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
// Add alpha protecting replacements for fb screen functions
+
#ifdef RENDER
{
PictureScreenPtr ps = GetPictureScreen(pScreen);
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 754666090..3ab324931 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -629,11 +629,11 @@ extern DWORD g_dwEvents;
#ifdef HAS_DEVWINDOWS
extern int g_fdMessageQueue;
#endif
-extern int g_iScreenPrivateIndex;
-extern int g_iCmapPrivateIndex;
-extern int g_iGCPrivateIndex;
-extern int g_iPixmapPrivateIndex;
-extern int g_iWindowPrivateIndex;
+extern DevPrivateKey g_iScreenPrivateKey;
+extern DevPrivateKey g_iCmapPrivateKey;
+extern DevPrivateKey g_iGCPrivateKey;
+extern DevPrivateKey g_iPixmapPrivateKey;
+extern DevPrivateKey g_iWindowPrivateKey;
extern unsigned long g_ulServerGeneration;
extern CARD32 g_c32LastInputEventTime;
extern DWORD g_dwEnginesSupported;
@@ -659,11 +659,11 @@ extern FARPROC g_fpTrackMouseEvent;
* Screen privates macros
*/
-#define winGetScreenPriv(pScreen) \
- ((winPrivScreenPtr) (pScreen)->devPrivates[g_iScreenPrivateIndex].ptr)
+#define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey))
#define winSetScreenPriv(pScreen,v) \
- ((pScreen)->devPrivates[g_iScreenPrivateIndex].ptr = (pointer) v)
+ dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v)
#define winScreenPriv(pScreen) \
winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen)
@@ -673,11 +673,11 @@ extern FARPROC g_fpTrackMouseEvent;
* Colormap privates macros
*/
-#define winGetCmapPriv(pCmap) \
- ((winPrivCmapPtr) (pCmap)->devPrivates[g_iCmapPrivateIndex].ptr)
+#define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \
+ dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey))
#define winSetCmapPriv(pCmap,v) \
- ((pCmap)->devPrivates[g_iCmapPrivateIndex].ptr = (pointer) v)
+ dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v)
#define winCmapPriv(pCmap) \
winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap)
@@ -687,11 +687,11 @@ extern FARPROC g_fpTrackMouseEvent;
* GC privates macros
*/
-#define winGetGCPriv(pGC) \
- ((winPrivGCPtr) (pGC)->devPrivates[g_iGCPrivateIndex].ptr)
+#define winGetGCPriv(pGC) ((winPrivGCPtr) \
+ dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey))
#define winSetGCPriv(pGC,v) \
- ((pGC)->devPrivates[g_iGCPrivateIndex].ptr = (pointer) v)
+ dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v)
#define winGCPriv(pGC) \
winPrivGCPtr pGCPriv = winGetGCPriv(pGC)
@@ -701,11 +701,11 @@ extern FARPROC g_fpTrackMouseEvent;
* Pixmap privates macros
*/
-#define winGetPixmapPriv(pPixmap) \
- ((winPrivPixmapPtr) (pPixmap)->devPrivates[g_iPixmapPrivateIndex].ptr)
+#define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey))
#define winSetPixmapPriv(pPixmap,v) \
- ((pPixmap)->devPrivates[g_iPixmapPrivateIndex].ptr = (pointer) v)
+ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v)
#define winPixmapPriv(pPixmap) \
winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap)
@@ -715,11 +715,11 @@ extern FARPROC g_fpTrackMouseEvent;
* Window privates macros
*/
-#define winGetWindowPriv(pWin) \
- ((winPrivWinPtr) (pWin)->devPrivates[g_iWindowPrivateIndex].ptr)
+#define winGetWindowPriv(pWin) ((winPrivWinPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey))
#define winSetWindowPriv(pWin,v) \
- ((pWin)->devPrivates[g_iWindowPrivateIndex].ptr = (pointer) v)
+ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v)
#define winWindowPriv(pWin) \
winPrivWinPtr pWinPriv = winGetWindowPriv(pWin)
diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c
index f4decfb59..21ccd9b3b 100644
--- a/hw/xwin/winallpriv.c
+++ b/hw/xwin/winallpriv.c
@@ -57,12 +57,6 @@ winAllocatePrivates (ScreenPtr pScreen)
/* We need a new slot for our privates if the screen gen has changed */
if (g_ulServerGeneration != serverGeneration)
{
- /* Get an index that we can store our privates at */
- g_iScreenPrivateIndex = AllocateScreenPrivateIndex ();
- g_iGCPrivateIndex = AllocateGCPrivateIndex ();
- g_iPixmapPrivateIndex = AllocatePixmapPrivateIndex ();
- g_iWindowPrivateIndex = AllocateWindowPrivateIndex ();
-
g_ulServerGeneration = serverGeneration;
}
@@ -84,24 +78,21 @@ winAllocatePrivates (ScreenPtr pScreen)
winSetScreenPriv (pScreen, pScreenPriv);
/* Reserve GC memory for our privates */
- if (!AllocateGCPrivate (pScreen, g_iGCPrivateIndex,
- sizeof (winPrivGCRec)))
+ if (!dixRequestPrivate(g_iGCPrivateKey, sizeof (winPrivGCRec)))
{
ErrorF ("winAllocatePrivates - AllocateGCPrivate () failed\n");
return FALSE;
}
/* Reserve Pixmap memory for our privates */
- if (!AllocatePixmapPrivate (pScreen, g_iPixmapPrivateIndex,
- sizeof (winPrivPixmapRec)))
+ if (!dixRequestPrivate(g_iPixmapPrivateKey, sizeof (winPrivPixmapRec)))
{
ErrorF ("winAllocatePrivates - AllocatePixmapPrivates () failed\n");
return FALSE;
}
/* Reserve Window memory for our privates */
- if (!AllocateWindowPrivate (pScreen, g_iWindowPrivateIndex,
- sizeof (winPrivWinRec)))
+ if (!dixRequestPrivate(g_iWindowPrivateKey, sizeof (winPrivWinRec)))
{
ErrorF ("winAllocatePrivates () - AllocateWindowPrivates () failed\n");
return FALSE;
@@ -155,9 +146,6 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
/* Get a new privates index when the server generation changes */
if (s_ulPrivateGeneration != serverGeneration)
{
- /* Get an index that we can store our privates at */
- g_iCmapPrivateIndex = AllocateColormapPrivateIndex (winInitCmapPrivates);
-
/* Save the new server generation */
s_ulPrivateGeneration = serverGeneration;
}
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
index 825d3dc70..2cfe0ffce 100755
--- a/hw/xwin/winclipboardwrappers.c
+++ b/hw/xwin/winclipboardwrappers.c
@@ -431,7 +431,6 @@ winProcSetSelectionOwner (ClientPtr client)
* and we currently own the Win32 clipboard.
*/
if (None == stuff->window
- && g_iClipboardWindow != client->lastDrawableID
&& (None == s_iOwners[CLIP_OWN_PRIMARY]
|| g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY])
&& (None == s_iOwners[CLIP_OWN_CLIPBOARD]
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index a68ead266..38966bf96 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -49,7 +49,6 @@
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c
index c1e619bf8..021b8b82c 100644
--- a/hw/xwin/wincursor.c
+++ b/hw/xwin/wincursor.c
@@ -598,7 +598,8 @@ winInitCursor (ScreenPtr pScreen)
pScreenPriv->cursor.QueryBestSize = pScreen->QueryBestSize;
pScreen->QueryBestSize = winCursorQueryBestSize;
- pPointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr;
+ pPointPriv = (miPointerScreenPtr)
+ dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
pScreenPriv->cursor.spriteFuncs = pPointPriv->spriteFuncs;
pPointPriv->spriteFuncs = &winSpriteFuncsRec;
diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c
index 7e3966965..702f34f96 100644
--- a/hw/xwin/winfillsp.c
+++ b/hw/xwin/winfillsp.c
@@ -35,15 +35,6 @@
#include "win.h"
-/*
- * References to external symbols
- */
-
-extern int g_iPixmapPrivateIndex;
-extern int g_iGCPrivateIndex;
-extern int g_copyROP[];
-
-
extern void ROP16(HDC hdc, int rop);
#define TRANSLATE_COLOR(color) \
diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c
index af8190d3f..fddada39e 100644
--- a/hw/xwin/winglobals.c
+++ b/hw/xwin/winglobals.c
@@ -44,11 +44,11 @@ int g_iLastScreen = -1;
#ifdef HAS_DEVWINDOWS
int g_fdMessageQueue = WIN_FD_INVALID;
#endif
-int g_iScreenPrivateIndex = -1;
-int g_iCmapPrivateIndex = -1;
-int g_iGCPrivateIndex = -1;
-int g_iPixmapPrivateIndex = -1;
-int g_iWindowPrivateIndex = -1;
+DevPrivateKey g_iScreenPrivateKey = &g_iScreenPrivateKey;
+DevPrivateKey g_iCmapPrivateKey = &g_iCmapPrivateKey;
+DevPrivateKey g_iGCPrivateKey = &g_iGCPrivateKey;
+DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKey;
+DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKey;
unsigned long g_ulServerGeneration = 0;
Bool g_fInitializedDefaultScreens = FALSE;
DWORD g_dwEnginesSupported = 0;
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 0a7579b61..20ff9f7db 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -365,7 +365,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
ErrorF ("\thenght %08X\n", pWin->drawable.height);
ErrorF ("\tpScreen %08X\n", pWin->drawable.pScreen);
ErrorF ("\tserialNumber %08X\n", pWin->drawable.serialNumber);
- ErrorF ("g_iWindowPrivateIndex %d\n", g_iWindowPrivateIndex);
+ ErrorF ("g_iWindowPrivateKey %p\n", g_iWindowPrivateKey);
ErrorF ("pWinPriv %08X\n", pWinPriv);
ErrorF ("s_pScreenPriv %08X\n", s_pScreenPriv);
ErrorF ("s_pScreenInfo %08X\n", s_pScreenInfo);
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 994eeb89a..050c71a7f 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -36,13 +36,6 @@
/*
- * References to external symbols
- */
-
-extern int g_iPixmapPrivateIndex;
-
-
-/*
* Local prototypes
*/
@@ -98,6 +91,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = NULL;
+ pPixmap->usage_hint = usage_hint;
/* Pixmap privates are allocated by AllocatePixmap */
pPixmapPriv = winGetPixmapPriv (pPixmap);
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index a49f68f7e..9dc4c3da5 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -73,9 +73,6 @@ winMWExtWMProcs = {
* References to external symbols
*/
-extern winScreenInfo g_ScreenInfo[];
-extern miPointerScreenFuncRec g_winPointerCursorFuncs;
-extern int g_iScreenPrivateIndex;
extern Bool g_fSoftwareCursor;
diff --git a/hw/xwin/winsetsp.c b/hw/xwin/winsetsp.c
index 8a3faee93..f894d6cda 100644
--- a/hw/xwin/winsetsp.c
+++ b/hw/xwin/winsetsp.c
@@ -35,15 +35,6 @@
#include "win.h"
-/*
- * References to external symbols
- */
-
-extern int g_iPixmapPrivateIndex;
-extern int g_iGCPrivateIndex;
-extern int g_copyROP[];
-
-
/* See Porting Layer Definition - p. 55 */
void
winSetSpansNativeGDI (DrawablePtr pDrawable,
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 832e36d44..4b4cd3ded 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -971,7 +971,7 @@ winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin)
SetWindowLongPtr (pRLWinPriv->hWnd, GWL_STYLE,
WS_POPUP | WS_CLIPCHILDREN);
- DeleteProperty (oldWin, AtmWindowsWmNativeHwnd ());
+ DeleteProperty (serverClient, oldWin, AtmWindowsWmNativeHwnd ());
winMWExtWMSetNativeProperty (pFrame);
#if CYGMULTIWINDOW_DEBUG
#if 0