summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/darwin/darwin.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/darwin/darwin.h')
-rw-r--r--xc/programs/Xserver/hw/darwin/darwin.h47
1 files changed, 32 insertions, 15 deletions
diff --git a/xc/programs/Xserver/hw/darwin/darwin.h b/xc/programs/Xserver/hw/darwin/darwin.h
index 95a1720f9..82148138e 100644
--- a/xc/programs/Xserver/hw/darwin/darwin.h
+++ b/xc/programs/Xserver/hw/darwin/darwin.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.5 2001/04/02 05:39:36 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.7 2001/08/06 04:14:36 torrey Exp $ */
#ifndef _DARWIN_H
#define _DARWIN_H
@@ -10,11 +10,10 @@
#include "extensions/XKB.h"
typedef struct {
- pthread_t hidThread;
io_connect_t fbService;
- io_connect_t hidService;
- io_connect_t hidParam;
void *framebuffer;
+ int x;
+ int y;
int width;
int height;
int pitch;
@@ -22,28 +21,46 @@ typedef struct {
int colorBitsPerPixel;
IOPixelInformation pixelInfo;
StdFBShmem_t *cursorShmem;
-} DarwinFramebufferRec;
+} DarwinFramebufferRec, *DarwinFramebufferPtr;
+
+typedef struct {
+ pthread_t thread;
+ io_connect_t connect;
+ io_connect_t paramConnect;
+} DarwinInputRec;
+
-void DarwinKeyboardInit(DeviceIntPtr pDev);
-int DarwinModifierKeycode(int modifier, int side);
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
+// 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);
+
#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 MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
// Global variables from darwin.c
-extern DarwinFramebufferRec dfb;
-extern int darwinEventFD;
-extern Bool quartz;
-extern UInt32 darwinDesiredWidth, darwinDesiredHeight;
-extern IOIndex darwinDesiredDepth;
-extern SInt32 darwinDesiredRefresh;
-extern UInt32 darwinScreenNumber;
+extern int darwinScreenIndex; // index into pScreen.devPrivates
+extern int darwinScreensFound;
+extern DarwinInputRec hid;
+extern int darwinEventFD;
+extern Bool quartz;
+extern UInt32 darwinDesiredWidth, darwinDesiredHeight;
+extern IOIndex darwinDesiredDepth;
+extern SInt32 darwinDesiredRefresh;
+extern UInt32 darwinScreenNumber;
#endif /* _DARWIN_H */