Beginnings of an update Darwin driver

This commit is contained in:
Ben Byer 2007-02-15 05:22:21 -08:00
parent 136bb4874a
commit 9ecf79ca01
5 changed files with 254 additions and 112 deletions

View File

@ -1,52 +1,249 @@
noinst_LIBRARIES = libdarwinShared.a
libdarwin_XINPUT_SRCS = darwinXinput.c
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = @XORG_INCS@
DEFS = @DEFS@ -DUSE_NEW_CLUT
if XQUARTZ
XQUARTZ_SUBDIRS = bundle quartz
endif
SUBDIRS = \
iokit \
$(XQUARTZ_SUBDIRS) \
utils \
.
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
libdarwinShared_a_SOURCES = darwin.c \
darwinEvents.c \
darwinKeyboard.c \
$(darwin_XINPUT_SRCS)
bin_PROGRAMS = XDarwin
XDarwin_SOURCES = \
$(top_srcdir)/fb/fbcmap.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xi/stubs.c
XDarwin_LDADD = \
$(top_builddir)/dix/dixfonts.lo \
$(top_builddir)/dix/libdix.la \
$(top_builddir)/config/libconfig.a \
$(top_builddir)/os/libos.la \
./libdarwinShared.a \
./iokit/libiokit.a \
$(top_builddir)/dix/libxpstubs.la \
$(top_builddir)/miext/shadow/libshadow.la \
$(top_builddir)/fb/libfb.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 \
$(XGLX_LIBS) \
$(top_builddir)/miext/rootless/librootless.la \
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
$(top_builddir)/miext/rootless/accel/librlAccel.la \
@XORG_LIBS@ \
-lXau -lXdmcp -lXfont -lfreetype
XDarwin_LDFLAGS = \
-XCClinker -Objc \
-Wl,-u,_miDCInitialize \
-Wl,-framework,IOKit
XDarwin_CFLAGS = -DINXDARWIN
if XQUARTZ
macosdir = $(darwinappdir)/Contents/MacOS
DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
macos_PROGRAMS = XDarwinApp
XDarwinApp_SOURCES = \
$(top_srcdir)/fb/fbcmap.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xi/stubs.c
XDarwinApp_LDADD = \
$(top_builddir)/dix/dixfonts.lo \
$(top_builddir)/dix/libdix.la \
$(top_builddir)/config/libconfig.a \
$(top_builddir)/os/libos.la \
./quartz/XApplication.o \
./libdarwinShared.a \
./quartz/libXQuartz.a \
$(top_builddir)/dix/libxpstubs.la \
$(top_builddir)/miext/shadow/libshadow.la \
$(top_builddir)/fb/libfb.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 \
$(XGLX_LIBS) \
$(top_builddir)/miext/rootless/librootless.la \
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
$(top_builddir)/miext/rootless/accel/librlAccel.la \
@XORG_LIBS@ \
-lXau -lXdmcp -lXfont -lfreetype \
$(top_builddir)/fb/libfb.la
XDarwinApp_LDFLAGS = \
-XCClinker -Objc \
-Wl,-u,_miDCInitialize \
-Wl,-framework,Carbon \
-Wl,-framework,ApplicationServices \
-Wl,-framework,Cocoa \
-Wl,-framework,CoreAudio \
-Wl,-framework,IOKit
HOOK_TARGETS = xquartz-install-hook
crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
crplugin_LTLIBRARIES = cr.la
cr_la_SOURCES =
cr_la_LIBADD = \
quartz/cr/crAppleWM.o \
quartz/cr/crFrame.o \
quartz/cr/crScreen.o \
quartz/fullscreen/quartzCursor.o \
quartz/cr/XView.o \
$(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 \
-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 =
fullscreen_la_LIBADD = \
quartz/fullscreen/fullscreen.o \
quartz/fullscreen/quartzCursor.o \
$(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
endif
if HAVE_X_PLUGIN
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
xprplugin_LTLIBRARIES = xpr.la
xpr_la_SOURCES =
xpr_la_LIBADD = \
quartz/xpr/appledri.o \
quartz/xpr/dri.o \
quartz/xpr/xprAppleWM.o \
quartz/xpr/xprCursor.o \
quartz/xpr/xprFrame.o \
quartz/xpr/xprScreen.o \
quartz/xpr/x-hash.o \
quartz/xpr/x-hook.o \
quartz/xpr/x-list.o \
$(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 \
-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
man1_MANS = XDarwin.man
uninstall-hook:
rm -rf $(DESTDIR)$(macosdir)/XDarwin
install-data-hook: $(HOOK_TARGETS)
xquartz-install-hook:
mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
EXTRA_DIST = \
bundle/Dutch.lproj/Credits.rtf \
bundle/Dutch.lproj/Localizable.strings \
bundle/Dutch.lproj/MainMenu.nib/classes.nib \
bundle/Dutch.lproj/MainMenu.nib/objects.nib \
bundle/Dutch.lproj/XDarwinHelp.html.cpp \
bundle/English.lproj/Credits.rtf \
bundle/English.lproj/InfoPlist.strings.cpp \
bundle/English.lproj/Localizable.strings \
bundle/English.lproj/MainMenu.nib/classes.nib \
bundle/English.lproj/MainMenu.nib/objects.nib \
bundle/English.lproj/XDarwinHelp.html.cpp \
bundle/French.lproj/Credits.rtf \
bundle/French.lproj/Localizable.strings \
bundle/French.lproj/MainMenu.nib/classes.nib \
bundle/French.lproj/MainMenu.nib/objects.nib \
bundle/French.lproj/XDarwinHelp.html.cpp \
bundle/German.lproj/Credits.rtf \
bundle/German.lproj/Localizable.strings \
bundle/German.lproj/MainMenu.nib/classes.nib \
bundle/German.lproj/MainMenu.nib/objects.nib \
bundle/German.lproj/XDarwinHelp.html.cpp \
bundle/Japanese.lproj/Credits.rtf \
bundle/Japanese.lproj/Localizable.strings \
bundle/Japanese.lproj/MainMenu.nib/classes.nib \
bundle/Japanese.lproj/MainMenu.nib/objects.nib \
bundle/Japanese.lproj/XDarwinHelp.html.cpp \
bundle/ko.lproj/Credits.rtf \
bundle/ko.lproj/Localizable.strings \
bundle/ko.lproj/MainMenu.nib/classes.nib \
bundle/ko.lproj/MainMenu.nib/objects.nib \
bundle/ko.lproj/XDarwinHelp.html.cpp \
bundle/Portuguese.lproj/Credits.rtf \
bundle/Portuguese.lproj/Localizable.strings \
bundle/Portuguese.lproj/MainMenu.nib/classes.nib \
bundle/Portuguese.lproj/MainMenu.nib/objects.nib \
bundle/Portuguese.lproj/XDarwinHelp.html.cpp \
bundle/Spanish.lproj/Credits.rtf \
bundle/Spanish.lproj/Localizable.strings \
bundle/Spanish.lproj/MainMenu.nib/classes.nib \
bundle/Spanish.lproj/MainMenu.nib/objects.nib \
bundle/Spanish.lproj/XDarwinHelp.html.cpp \
bundle/startXClients.cpp \
bundle/Swedish.lproj/Credits.rtf \
bundle/Swedish.lproj/Localizable.strings \
bundle/Swedish.lproj/MainMenu.nib/classes.nib \
bundle/Swedish.lproj/MainMenu.nib/objects.nib \
bundle/Swedish.lproj/XDarwinHelp.html.cpp \
bundle/XDarwin.icns \
darwin.c \
darwinClut8.h \
darwinEvents.c \
@ -54,64 +251,4 @@ EXTRA_DIST = \
darwinKeyboard.c \
darwinKeyboard.h \
darwinXinput.c \
iokit/xfIOKit.c \
iokit/xfIOKitCursor.c \
iokit/xfIOKit.h \
iokit/xfIOKitStartup.c \
Makefile.am \
quartz/applewm.c \
quartz/applewmExt.h \
quartz/cr/crAppleWM.m \
quartz/cr/crFrame.m \
quartz/cr/cr.h \
quartz/cr/crScreen.m \
quartz/cr/XView.h \
quartz/cr/XView.m \
quartz/fullscreen/fullscreen.c \
quartz/fullscreen/quartzCursor.c \
quartz/fullscreen/quartzCursor.h \
quartz/keysym2ucs.c \
quartz/keysym2ucs.h \
quartz/Preferences.h \
quartz/Preferences.m \
quartz/pseudoramiX.c \
quartz/pseudoramiX.h \
quartz/quartzAudio.c \
quartz/quartzAudio.h \
quartz/quartz.c \
quartz/quartzCocoa.m \
quartz/quartzCommon.h \
quartz/quartzCursor.c \
quartz/quartzCursor.h \
quartz/quartz.h \
quartz/quartzKeyboard.c \
quartz/quartzPasteboard.c \
quartz/quartzPasteboard.h \
quartz/quartzStartup.c \
quartz/XApplication.h \
quartz/XApplication.m \
quartz/XDarwin.pbproj/project.pbxproj \
quartz/XDarwinStartup.c \
quartz/XDarwinStartup.man \
quartz/xpr/appledri.c \
quartz/xpr/dri.c \
quartz/xpr/dri.h \
quartz/xpr/dristruct.h \
quartz/xpr/x-hash.c \
quartz/xpr/x-hash.h \
quartz/xpr/x-hook.c \
quartz/xpr/x-hook.h \
quartz/xpr/x-list.c \
quartz/xpr/x-list.h \
quartz/xpr/Xplugin.h \
quartz/xpr/xprAppleWM.c \
quartz/xpr/xprCursor.c \
quartz/xpr/xprFrame.c \
quartz/xpr/xpr.h \
quartz/xpr/xprScreen.c \
quartz/XServer.h \
quartz/XServer.m \
utils/dumpkeymap.c \
utils/dumpkeymap.man \
utils/README.txt \
XDarwin.man

View File

@ -30,6 +30,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
#include "os.h"
@ -409,9 +413,9 @@ static int DarwinMouseProc(
InitPointerDeviceStruct( (DevicePtr)pPointer,
map,
5, // numbuttons (4 & 5 are scroll wheel)
miPointerGetMotionEvents,
GetMotionHistory,
DarwinChangePointerControl,
0 );
GetMotionHistorySize(), 2 );
#ifdef XINPUT
InitValuatorAxisStruct( pPointer,
0, // X axis

View File

@ -31,6 +31,7 @@
#include "inputstr.h"
#include "scrnintstr.h"
#include <X11/extensions/XKB.h>
#include <assert.h>
typedef struct {
void *framebuffer;

View File

@ -72,7 +72,7 @@
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
#include "darwinKeyboard.h"
#include <assert.h>
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
#define FunctionMask Mod3Mask

View File

@ -29,7 +29,7 @@
#define XK_TECHNICAL // needed to get XK_Escape
#define XK_PUBLISHING
#include "keysym.h"
#include "X11/keysym.h"
#include "inputstr.h"
// Each key can generate 4 glyphs. They are, in order: