Darwin: Sync-up to master and xorg-server-1.2-apple where appropriate

This commit is contained in:
Jeremy Huddleston 2007-11-23 14:18:04 -08:00
parent fa5f25482c
commit 28ae09f355
39 changed files with 156 additions and 351 deletions

View file

@ -2152,8 +2152,6 @@ hw/xnest/Makefile
hw/xwin/Makefile
hw/darwin/Makefile
hw/darwin/quartz/Makefile
hw/darwin/quartz/cr/Makefile
hw/darwin/quartz/fullscreen/Makefile
hw/darwin/quartz/xpr/Makefile
hw/darwin/utils/Makefile
hw/kdrive/Makefile

View file

@ -1,61 +1,64 @@
AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) -DUSE_NEW_CLUT -DBUILD_DATE=\"$(BUILD_DATE)\" -DHAVE_XORG_CONFIG_H -DXFree86Server -DINXQUARTZ \
-I$(top_srcdir)/fb \
-I$(top_srcdir)/mi \
-I$(top_srcdir)/miext/rootless \
-I$(top_srcdir)/render \
-I$(top_srcdir)/Xext
AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) \
-DINXQUARTZ \
-DUSE_NEW_CLUT \
-DXFree86Server \
-I$(top_srcdir)/miext/rootless
SUBDIRS = quartz utils
bin_PROGRAMS = Xquartz
man1_MANS = Xquartz.man
Xquartz_SOURCES = darwin.c \
darwinEvents.c \
darwinKeyboard.c \
darwinXinput.c \
$(top_srcdir)/fb/fbcmap_mi.c \
$(top_srcdir)/mi/miinitext.c
Xquartz_SOURCES = \
darwin.c \
darwinEvents.c \
darwinKeyboard.c \
darwinXinput.c \
$(top_srcdir)/fb/fbcmap_mi.c \
$(top_srcdir)/mi/miinitext.c
# We should probably add these once they're working, or are these obsolete and to be removed?
# ./quartz/cr/libcr.a
# ./quartz/fullscreen/libfullscreen.a
Xquartz_LDADD = ./quartz/libXquartz.a \
./quartz/xpr/libxpr.a \
$(top_builddir)/dix/dixfonts.lo \
$(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) $(PIXMAN_LIBS) -lXplugin
Xquartz_LDADD = \
./quartz/libXquartz.a \
./quartz/xpr/libxpr.a \
$(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
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
if X11APP
bin_SCRIPTS = x11app x11launcher
@ -80,6 +83,7 @@ x11launcher-clean:
install-data-hook: x11app-install x11launcher-install
clean-local: x11app-clean x11launcher-clean
endif
EXTRA_DIST = \

View file

@ -3,8 +3,6 @@
* Shared code for the Darwin X Server
* running with Quartz or IOKit display mode
*
**************************************************************/
/*
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
* Copyright (c) 2007 Apple Inc.
*
@ -362,10 +360,11 @@ static int DarwinMouseProc(
map[3] = 3;
map[4] = 4;
map[5] = 5;
InitPointerDeviceStruct((DevicePtr)pPointer, map, 5,
GetMotionHistory,
(PtrCtrlProcPtr)NoopDDA,
GetMotionHistorySize(), 2);
InitPointerDeviceStruct( (DevicePtr)pPointer, map, 5,
GetMotionHistory,
(PtrCtrlProcPtr)NoopDDA,
GetMotionHistorySize(), 2);
#ifdef XINPUT
InitValuatorAxisStruct( pPointer,
0, // X axis

View file

@ -27,6 +27,8 @@
#ifndef _DARWIN_H
#define _DARWIN_H
#include "dix-config.h"
#include <IOKit/IOTypes.h>
#include "inputstr.h"
#include "scrnintstr.h"
@ -48,7 +50,7 @@ typedef struct {
// From darwin.c
void DarwinPrintBanner();
void DarwinPrintBanner(void);
int DarwinParseModifierList(const char *constmodifiers);
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);

View file

@ -1,28 +1,26 @@
noinst_LIBRARIES = libXQuartz.a
AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS)
AM_OBJCFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H \
AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
AM_OBJCFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) \
-DHAS_KL_API \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/fb \
-I$(top_srcdir)/mi \
-I$(top_srcdir)/miext/rootless \
-I$(top_srcdir)/render
-I$(top_srcdir)/miext/rootless
SUBDIRS = cr fullscreen xpr
SUBDIRS = xpr
libXQuartz_a_SOURCES = \
X11Application.m \
X11Controller.m \
applewm.c \
keysym2ucs.c \
pseudoramiX.c \
quartz.c \
quartzAudio.c \
quartzCocoa.m \
quartzKeyboard.c \
quartzPasteboard.c \
quartzStartup.c
X11Application.m \
X11Controller.m \
applewm.c \
keysym2ucs.c \
pseudoramiX.c \
quartz.c \
quartzAudio.c \
quartzCocoa.m \
quartzKeyboard.c \
quartzPasteboard.c \
quartzStartup.c
EXTRA_DIST = \
X11Application.h \

View file

@ -1,5 +1,4 @@
/* X11Application.h -- subclass of NSApplication to multiplex events
$Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $
Copyright (c) 2002-2007 Apple Inc. All rights reserved.

View file

@ -1,5 +1,4 @@
/* X11Controller.h -- connect the IB ui
$Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $
Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
@ -34,7 +33,7 @@
#if __OBJC__
#import <Cocoa/Cocoa.h>
#include "../quartz/xpr/x-list.h"
#include "xpr/x-list.h"
@interface X11Controller : NSObject
{

View file

@ -1,5 +1,4 @@
/* X11Controller.m -- connect the IB ui, also the NSApp delegate
$Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $
Copyright (c) 2002-2007 Apple Inc. All rights reserved.
@ -30,7 +29,7 @@
#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"
@ -38,14 +37,12 @@
/* ouch! */
#define BOOL X_BOOL
//# include "Xproto.h"
#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 "X.h"
# include "applewmExt.h"
#undef BOOL
#include <stdio.h>
@ -305,7 +302,7 @@
argv[4] = "-c";
argv[5] = command;
argv[6] = NULL;
/* Do the fork-twice trick to avoid having to reap zombies */
child1 = fork();

View file

@ -24,9 +24,9 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"
#define NEED_REPLIES
@ -461,7 +461,7 @@ ProcAppleWMSetWindowMenuCheck(
REQUEST(xAppleWMSetWindowMenuCheckReq);
REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq);
X11ApplicationSetWindowMenuCheck (stuff->index);
X11ApplicationSetWindowMenuCheck(stuff->index);
return (client->noClientException);
}

View file

@ -1,23 +0,0 @@
noinst_LIBRARIES = libcr.a
AM_CFLAGS = $(XORG_CFLAGS)
AM_OBJCFLAGS = $(XORG_CFLAGS)
AM_CPPFLAGS = -DDEFER_NSWINDOW \
$(XORG_INCS) \
-I../fullscreen \
-I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \
-I$(top_srcdir)/mi \
-I$(top_srcdir)/miext/rootless \
-I$(top_srcdir)/miext/rootless/safeAlpha \
-I$(top_srcdir)/render \
$(PIXMAN_CFLAGS)
libcr_a_SOURCES = crAppleWM.m \
crFrame.m \
crScreen.m \
../fullscreen/quartzCursor.c \
XView.m
EXTRA_DIST = \
cr.h \
XView.h

View file

@ -30,11 +30,9 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#import "XView.h"
#include <dix-config.h>
#import "XView.h"
@implementation XView

View file

@ -26,11 +26,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
#undef BOOL
#define BOOL xBOOL
@ -38,7 +37,7 @@
#include "X11/X.h"
#define _APPLEWM_SERVER_
#include "X11/extensions/applewm.h"
#include "applewmExt.h"
#include "quartz/applewmExt.h"
#undef BOOL
#define StdDocumentStyleMask (NSTitledWindowMask | \

View file

@ -27,11 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
#undef BOOL
#define BOOL xBOOL

View file

@ -27,11 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"
#undef BOOL
#define BOOL xBOOL

View file

@ -1,12 +0,0 @@
noinst_LIBRARIES = libfullscreen.a
AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \
-I$(top_srcdir)/miext/damage \
-I$(top_srcdir)/miext/shadow \
-I$(top_srcdir)/mi
libfullscreen_a_SOURCES = fullscreen.c \
quartzCursor.c
EXTRA_DIST = \
quartzCursor.h

View file

@ -26,10 +26,9 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "darwin.h"
#include "quartz/quartz.h"
#include "quartz/quartzCursor.h"

View file

@ -28,11 +28,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "quartz/quartzCursor.h"
#include "darwin.h"
#include <pthread.h>

View file

@ -1,4 +1,4 @@
/*
/*
* This module converts keysym values into the corresponding ISO 10646
* (UCS, Unicode) values.
*

View file

@ -34,9 +34,9 @@ Equipment Corporation.
******************************************************************/
#include "pseudoramiX.h"
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"

View file

@ -28,9 +28,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"
#include "quartz.h"
#include "darwin.h"
@ -292,7 +291,7 @@ static void QuartzUpdateScreens(void)
pRoot = WindowTable[pScreen->myNum];
AppleWMSetScreenOrigin(pRoot);
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
pScreen->PaintWindowBackground(pRoot, &pRoot->borderClip, PW_BACKGROUND);
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
// QuartzIgnoreNextWarpCursor();
DefineInitialRootWindow(pRoot);

View file

@ -36,9 +36,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"
#include "quartzAudio.h"

View file

@ -6,7 +6,6 @@
* This file is separate from the parts of Quartz support
* that use X include files to avoid symbol collisions.
*
*
* Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
@ -33,9 +32,7 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"

View file

@ -28,9 +28,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"
#include "quartzCursor.h"
#include "darwin.h"

View file

@ -3,7 +3,7 @@
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
@ -31,9 +31,8 @@
prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzCommon.h"
#include <CoreServices/CoreServices.h>

View file

@ -30,9 +30,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartzPasteboard.h"
#include <X11/Xatom.h>

View file

@ -36,6 +36,7 @@
#include "opaque.h"
#include "micmap.h"
#include <assert.h>
char **envpGlobal; // argcGlobal and argvGlobal
// are from dix/globals.c
@ -99,9 +100,19 @@ void DarwinHandleGUI(
}
}
/* 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();
_InitHLTB();
X11ControllerMain(argc, argv, server_thread, NULL);
exit(0);
}

View file

@ -1,15 +1,11 @@
noinst_LIBRARIES = libxpr.a
AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS)
AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = $(XORG_INCS) \
-DHAVE_XORG_CONFIG_H \
-I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \
-I$(top_srcdir)/fb \
-I$(top_srcdir)/mi \
-I$(top_srcdir)/miext \
-I$(top_srcdir)/miext/damage \
-I$(top_srcdir)/miext/rootless \
-I$(top_srcdir)/miext/rootless/safeAlpha \
-I$(top_srcdir)/render
-I$(top_srcdir)/miext/rootless/safeAlpha
libxpr_a_SOURCES = \
appledri.c \
@ -32,4 +28,3 @@ EXTRA_DIST = \
x-list.h \
Xplugin.h \
xpr.h

View file

@ -35,9 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/X.h>

View file

@ -34,9 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
@ -44,7 +43,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/time.h>
#include <unistd.h>
#endif
#include <dix-config.h>
#define NEED_REPLIES
#define NEED_EVENTS

View file

@ -27,9 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "x-hash.h"
#include "x-list.h"
#include <stdlib.h>

View file

@ -27,9 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "x-hook.h"
#include <stdlib.h>
#include <assert.h>

View file

@ -27,9 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "x-list.h"
#include <stdlib.h>
#include <assert.h>

View file

@ -27,9 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "xpr.h"
#include "quartz/applewmExt.h"
#include "rootless.h"

View file

@ -29,9 +29,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "xpr.h"
#include "darwin.h"

View file

@ -27,9 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "xpr.h"
#include "rootlessCommon.h"
#include "Xplugin.h"

View file

@ -27,9 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <dix-config.h>
#include "quartz/quartzCommon.h"
#include "quartz/quartz.h"
#include "xpr.h"
@ -317,8 +316,6 @@ static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
// Add alpha protecting replacements for fb screen functions
pScreen->PaintWindowBackground = SafeAlphaPaintWindow;
pScreen->PaintWindowBorder = SafeAlphaPaintWindow;
#ifdef RENDER
{

View file

@ -8,6 +8,4 @@ man1_MANS = dumpkeymap.man
EXTRA_DIST = \
README.txt \
event_status_driver.h \
dumpkeymap.man

View file

@ -143,7 +143,7 @@
#include <string.h>
#include <sys/stat.h>
#if !defined(DUMPKEYMAP_FILE_ONLY)
#include "event_status_driver.h"
#include <IOKit/hidsystem/event_status_driver.h>
#endif
#define PROG_NAME "dumpkeymap"

View file

@ -1,133 +0,0 @@
/*
* Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with the
* License. Please obtain a copy of the License at
* http://www.apple.com/publicsource and read it before using this file.
*
* This Original Code and all software distributed under the License are
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/******************************************************************************
event_status_driver.h
API for the events status driver.
This file contains public API.
mpaque 11Oct91
Copyright 1991 NeXT Computer, Inc.
Modified:
******************************************************************************/
#ifndef _DRIVERS_EVENT_STATUS_DRIVER_
#define _DRIVERS_EVENT_STATUS_DRIVER_
__BEGIN_DECLS
#include <mach/port.h>
#include <IOKit/hidsystem/IOLLEvent.h>
#include <IOKit/hidsystem/IOHIDTypes.h>
#include <AvailabilityMacros.h>
/*
* Event System Handle:
*
* Information used by the system between calls to NXOpenEventSystem and
* NXCloseEventSystem. The application should not
* access any of the elements of this structure.
*/
typedef mach_port_t NXEventHandle;
/* Open and Close */
NXEventHandle NXOpenEventStatus(void);
void NXCloseEventStatus(NXEventHandle handle);
/* Status */
extern NXEventSystemInfoType NXEventSystemInfo(NXEventHandle handle,
char *flavor,
int *evs_info,
unsigned int *evs_info_cnt);
/* Keyboard */
extern void NXSetKeyRepeatInterval(NXEventHandle handle, double seconds);
extern double NXKeyRepeatInterval(NXEventHandle handle);
extern void NXSetKeyRepeatThreshold(NXEventHandle handle, double threshold);
extern double NXKeyRepeatThreshold(NXEventHandle handle);
extern void NXResetKeyboard(NXEventHandle handle);
/* Mouse */
extern void NXSetClickTime(NXEventHandle handle, double seconds);
extern double NXClickTime(NXEventHandle handle);
extern void NXSetClickSpace(NXEventHandle handle, _NXSize_ *area);
extern void NXGetClickSpace(NXEventHandle handle, _NXSize_ *area);
extern void NXResetMouse(NXEventHandle handle);
/* DEPRECATED API */
/* NXIdleTime has been deprecated as this API does not take into account
events posted through the CG API set. Instead, we strongly encourage
developers to make use of the CGSSecondsSinceLastInputEvent API. */
extern double NXIdleTime(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
/* These methods are NOT supported. */
extern NXKeyMapping *NXSetKeyMapping(NXEventHandle h, NXKeyMapping *keymap)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern int NXKeyMappingLength(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern NXKeyMapping *NXGetKeyMapping(NXEventHandle h, NXKeyMapping *keymap)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
/* These methods are NOT supported and will return NULL values. */
extern void NXSetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern void NXGetMouseScaling(NXEventHandle handle, NXMouseScaling *scaling)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern void NXSetAutoDimThreshold(NXEventHandle handle, double seconds)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern double NXAutoDimThreshold(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern double NXAutoDimTime(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern void NXSetAutoDimState(NXEventHandle handle, boolean_t dimmed)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern boolean_t NXAutoDimState(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern void NXSetAutoDimBrightness(NXEventHandle handle, double level)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern double NXAutoDimBrightness(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern void NXSetScreenBrightness(NXEventHandle handle, double level)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
extern double NXScreenBrightness(NXEventHandle handle)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
/* END DEPRECATED API */
__END_DECLS
#endif /*_DRIVERS_EVENT_STATUS_DRIVER_ */