VirtualBox

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

最後變更 在這個檔案從46019是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

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

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