2
* Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
* copy of this software and associated documentation files (the "Software"),
6
* to deal in the Software without restriction, including without limitation
7
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
* and/or sell copies of the Software, and to permit persons to whom the
9
* Software is furnished to do so, subject to the following conditions:
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
* THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
* DEALINGS IN THE SOFTWARE.
22
* Except as contained in this notice, the name(s) of the above copyright
23
* holders shall not be used in advertising or otherwise to promote the sale,
24
* use or other dealings in this Software without prior written authorization.
26
/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.15 2002/12/10 00:00:38 torrey Exp $ */
31
#include <IOKit/IOTypes.h>
33
#include "screenint.h"
34
#include "extensions/XKB.h"
35
#include "quartz/quartzShared.h"
46
int colorBitsPerPixel;
48
} DarwinFramebufferRec, *DarwinFramebufferPtr;
51
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
53
// From darwinEvents.c
54
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
55
void DarwinEQEnqueue(const xEvent *e);
56
void DarwinEQPointerPost(xEvent *e);
57
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
59
// From darwinKeyboard.c
60
int DarwinModifierNXKeyToNXKeycode(int key, int side);
61
void DarwinKeyboardInit(DeviceIntPtr pDev);
62
int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
63
int DarwinModifierNXKeyToNXMask(int key);
64
int DarwinModifierNXMaskToNXKey(int mask);
65
int DarwinModifierStringToNXKey(const char *string);
68
#define assert(x) { if ((x) == 0) \
69
FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
70
#define kern_assert(x) { if ((x) != KERN_SUCCESS) \
71
FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \
72
__LINE__, __FILE__, x); }
73
#define SCREEN_PRIV(pScreen) \
74
((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
77
#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
80
* Global variables from darwin.c
82
extern int darwinScreenIndex; // index into pScreen.devPrivates
83
extern int darwinScreensFound;
84
extern io_connect_t darwinParamConnect;
85
extern int darwinEventFD;
89
* Special ddx events understood by the X server
92
kXDarwinUpdateModifiers // update all modifier keys
93
= LASTEvent+1, // (from X.h list of event names)
94
kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
95
kXDarwinScrollWheel, // scroll wheel event
96
kXDarwinShow, // vt switch to X server;
97
// recapture screen and restore X drawing
98
kXDarwinHide, // vt switch away from X server;
99
// release screen and clip X drawing
100
kXDarwinSetRootClip, // enable or disable drawing to the X screen
101
kXDarwinQuit, // kill the X server and release the display
102
kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
103
kXDarwinWritePasteboard // copy X cut buffer onto Mac OS X pasteboard
106
#endif /* _DARWIN_H */