VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/darwin.h@ 33428

Last change on this file since 33428 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 5.8 KB
Line 
1/*
2 * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
3 *
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:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
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.
21 *
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.
25 */
26
27#ifndef _DARWIN_H
28#define _DARWIN_H
29
30#include <IOKit/IOTypes.h>
31#include "inputstr.h"
32#include "scrnintstr.h"
33#include <X11/extensions/XKB.h>
34
35typedef struct {
36 void *framebuffer;
37 int x;
38 int y;
39 int width;
40 int height;
41 int pitch;
42 int colorType;
43 int bitsPerPixel;
44 int colorBitsPerPixel;
45 int bitsPerComponent;
46} DarwinFramebufferRec, *DarwinFramebufferPtr;
47
48
49// From darwin.c
50void DarwinPrintBanner();
51int DarwinParseModifierList(const char *constmodifiers);
52void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
53void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
54
55// From darwinEvents.c
56Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
57void DarwinEQEnqueue(const xEvent *e);
58void DarwinEQPointerPost(xEvent *e);
59void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
60
61// From darwinKeyboard.c
62int DarwinModifierNXKeyToNXKeycode(int key, int side);
63void DarwinKeyboardInit(DeviceIntPtr pDev);
64int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
65int DarwinModifierNXKeyToNXMask(int key);
66int DarwinModifierNXMaskToNXKey(int mask);
67int DarwinModifierStringToNXKey(const char *string);
68
69// Mode specific functions
70Bool DarwinModeAddScreen(int index, ScreenPtr pScreen);
71Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen);
72void DarwinModeInitOutput(int argc,char **argv);
73void DarwinModeInitInput(int argc, char **argv);
74int DarwinModeProcessArgument(int argc, char *argv[], int i);
75void DarwinModeProcessEvent(xEvent *xe);
76void DarwinModeGiveUp(void);
77void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
78
79
80#undef assert
81#define assert(x) { if ((x) == 0) \
82 FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
83#define kern_assert(x) { if ((x) != KERN_SUCCESS) \
84 FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \
85 __LINE__, __FILE__, x); }
86#define SCREEN_PRIV(pScreen) \
87 ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
88
89
90#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
91
92
93/*
94 * Global variables from darwin.c
95 */
96extern int darwinScreenIndex; // index into pScreen.devPrivates
97extern int darwinScreensFound;
98extern io_connect_t darwinParamConnect;
99extern int darwinEventReadFD;
100extern int darwinEventWriteFD;
101extern DeviceIntPtr darwinPointer;
102extern DeviceIntPtr darwinKeyboard;
103
104// User preferences
105extern int darwinMouseAccelChange;
106extern int darwinFakeButtons;
107extern int darwinFakeMouse2Mask;
108extern int darwinFakeMouse3Mask;
109extern int darwinSwapAltMeta;
110extern char *darwinKeymapFile;
111extern int darwinSyncKeymap;
112extern unsigned int darwinDesiredWidth, darwinDesiredHeight;
113extern int darwinDesiredDepth;
114extern int darwinDesiredRefresh;
115
116// location of X11's (0,0) point in global screen coordinates
117extern int darwinMainScreenX;
118extern int darwinMainScreenY;
119
120
121/*
122 * Special ddx events understood by the X server
123 */
124enum {
125 kXDarwinUpdateModifiers // update all modifier keys
126 = LASTEvent+1, // (from X.h list of event names)
127 kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
128 kXDarwinScrollWheel, // scroll wheel event
129
130 /*
131 * Quartz-specific events -- not used in IOKit mode
132 */
133 kXDarwinActivate, // restore X drawing and cursor
134 kXDarwinDeactivate, // clip X drawing and switch to Aqua cursor
135 kXDarwinSetRootClip, // enable or disable drawing to the X screen
136 kXDarwinQuit, // kill the X server and release the display
137 kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
138 kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
139 /*
140 * AppleWM events
141 */
142 kXDarwinControllerNotify, // send an AppleWMControllerNotify event
143 kXDarwinPasteboardNotify, // notify the WM to copy or paste
144 /*
145 * Xplugin notification events
146 */
147 kXDarwinDisplayChanged, // display configuration has changed
148 kXDarwinWindowState, // window visibility state has changed
149 kXDarwinWindowMoved // window has moved on screen
150};
151
152#endif /* _DARWIN_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette