VirtualBox

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

最後變更 在這個檔案從67129是 51223,由 vboxsync 提交於 11 年 前

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.9 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/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.20 2003/11/15 00:07:09 torrey Exp $ */
27
28#ifndef _DARWIN_H
29#define _DARWIN_H
30
31#include <IOKit/IOTypes.h>
32#include "inputstr.h"
33#include "scrnintstr.h"
34#include <X11/extensions/XKB.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);
61
62// From darwinKeyboard.c
63int DarwinModifierNXKeyToNXKeycode(int key, int side);
64void DarwinKeyboardInit(DeviceIntPtr pDev);
65int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
66int DarwinModifierNXKeyToNXMask(int key);
67int DarwinModifierNXMaskToNXKey(int mask);
68int DarwinModifierStringToNXKey(const char *string);
69
70// Mode specific functions
71Bool DarwinModeAddScreen(int index, ScreenPtr pScreen);
72Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen);
73void DarwinModeInitOutput(int argc,char **argv);
74void DarwinModeInitInput(int argc, char **argv);
75int DarwinModeProcessArgument(int argc, char *argv[], int i);
76void DarwinModeProcessEvent(xEvent *xe);
77void DarwinModeGiveUp(void);
78void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
79
80
81#undef assert
82#define assert(x) { if ((x) == 0) \
83 FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
84#define kern_assert(x) { if ((x) != KERN_SUCCESS) \
85 FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \
86 __LINE__, __FILE__, x); }
87#define SCREEN_PRIV(pScreen) \
88 ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
89
90
91#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
92
93
94/*
95 * Global variables from darwin.c
96 */
97extern int darwinScreenIndex; // index into pScreen.devPrivates
98extern int darwinScreensFound;
99extern io_connect_t darwinParamConnect;
100extern int darwinEventReadFD;
101extern int darwinEventWriteFD;
102extern DeviceIntPtr darwinPointer;
103extern DeviceIntPtr darwinKeyboard;
104
105// User preferences
106extern int darwinMouseAccelChange;
107extern int darwinFakeButtons;
108extern int darwinFakeMouse2Mask;
109extern int darwinFakeMouse3Mask;
110extern int darwinSwapAltMeta;
111extern char *darwinKeymapFile;
112extern int darwinSyncKeymap;
113extern unsigned int darwinDesiredWidth, darwinDesiredHeight;
114extern int darwinDesiredDepth;
115extern int darwinDesiredRefresh;
116
117// location of X11's (0,0) point in global screen coordinates
118extern int darwinMainScreenX;
119extern int darwinMainScreenY;
120
121
122/*
123 * Special ddx events understood by the X server
124 */
125enum {
126 kXDarwinUpdateModifiers // update all modifier keys
127 = LASTEvent+1, // (from X.h list of event names)
128 kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
129 kXDarwinScrollWheel, // scroll wheel event
130
131 /*
132 * Quartz-specific events -- not used in IOKit mode
133 */
134 kXDarwinActivate, // restore X drawing and cursor
135 kXDarwinDeactivate, // clip X drawing and switch to Aqua cursor
136 kXDarwinSetRootClip, // enable or disable drawing to the X screen
137 kXDarwinQuit, // kill the X server and release the display
138 kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
139 kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
140 /*
141 * AppleWM events
142 */
143 kXDarwinControllerNotify, // send an AppleWMControllerNotify event
144 kXDarwinPasteboardNotify, // notify the WM to copy or paste
145 /*
146 * Xplugin notification events
147 */
148 kXDarwinDisplayChanged, // display configuration has changed
149 kXDarwinWindowState, // window visibility state has changed
150 kXDarwinWindowMoved // window has moved on screen
151};
152
153#endif /* _DARWIN_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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