1 | /* $XdotOrg: xserver/xorg/hw/darwin/quartz/quartzCommon.h,v 1.4 2005/07/01 22:43:07 daniels Exp $ */
|
---|
2 | /*
|
---|
3 | * quartzCommon.h
|
---|
4 | *
|
---|
5 | * Common definitions used internally by all Quartz modes
|
---|
6 | *
|
---|
7 | * This file should be included before any X11 or IOKit headers
|
---|
8 | * so that it can avoid symbol conflicts.
|
---|
9 | *
|
---|
10 | * Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
|
---|
11 | * All Rights Reserved.
|
---|
12 | *
|
---|
13 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
14 | * copy of this software and associated documentation files (the "Software"),
|
---|
15 | * to deal in the Software without restriction, including without limitation
|
---|
16 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
17 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
18 | * Software is furnished to do so, subject to the following conditions:
|
---|
19 | *
|
---|
20 | * The above copyright notice and this permission notice shall be included in
|
---|
21 | * all copies or substantial portions of the Software.
|
---|
22 | *
|
---|
23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
24 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
25 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
26 | * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
27 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
28 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
---|
29 | * DEALINGS IN THE SOFTWARE.
|
---|
30 | *
|
---|
31 | * Except as contained in this notice, the name(s) of the above copyright
|
---|
32 | * holders shall not be used in advertising or otherwise to promote the sale,
|
---|
33 | * use or other dealings in this Software without prior written authorization.
|
---|
34 | */
|
---|
35 | /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h,v 1.15 2004/06/08 22:58:10 torrey Exp $ */
|
---|
36 |
|
---|
37 | #ifndef _QUARTZCOMMON_H
|
---|
38 | #define _QUARTZCOMMON_H
|
---|
39 |
|
---|
40 | // QuickDraw in ApplicationServices has the following conflicts with
|
---|
41 | // the basic X server headers. Use QD_<name> to use the QuickDraw
|
---|
42 | // definition of any of these symbols, or the normal name for the
|
---|
43 | // X11 definition.
|
---|
44 | #define Cursor QD_Cursor
|
---|
45 | #define WindowPtr QD_WindowPtr
|
---|
46 | #define Picture QD_Picture
|
---|
47 | #include <ApplicationServices/ApplicationServices.h>
|
---|
48 | #undef Cursor
|
---|
49 | #undef WindowPtr
|
---|
50 | #undef Picture
|
---|
51 |
|
---|
52 | // Quartz specific per screen storage structure
|
---|
53 | typedef struct {
|
---|
54 | // List of CoreGraphics displays that this X11 screen covers.
|
---|
55 | // This is more than one CG display for video mirroring and
|
---|
56 | // rootless PseudoramiX mode.
|
---|
57 | // No CG display will be covered by more than one X11 screen.
|
---|
58 | int displayCount;
|
---|
59 | CGDirectDisplayID *displayIDs;
|
---|
60 | } QuartzScreenRec, *QuartzScreenPtr;
|
---|
61 |
|
---|
62 | #define QUARTZ_PRIV(pScreen) \
|
---|
63 | ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr)
|
---|
64 |
|
---|
65 | // Data stored at startup for Cocoa front end
|
---|
66 | extern int quartzEventWriteFD;
|
---|
67 | extern int quartzStartClients;
|
---|
68 |
|
---|
69 | // User preferences used by Quartz modes
|
---|
70 | extern int quartzRootless;
|
---|
71 | extern int quartzUseSysBeep;
|
---|
72 | extern int quartzUseAGL;
|
---|
73 | extern int quartzEnableKeyEquivalents;
|
---|
74 |
|
---|
75 | // Other shared data
|
---|
76 | extern int quartzServerVisible;
|
---|
77 | extern int quartzServerQuitting;
|
---|
78 | extern int quartzScreenIndex;
|
---|
79 | extern int aquaMenuBarHeight;
|
---|
80 |
|
---|
81 | // Name of GLX bundle for native OpenGL
|
---|
82 | extern const char *quartzOpenGLBundle;
|
---|
83 |
|
---|
84 | void QuartzReadPreferences(void);
|
---|
85 | void QuartzMessageMainThread(unsigned msg, void *data, unsigned length);
|
---|
86 | void QuartzMessageServerThread(int type, int argc, ...);
|
---|
87 | void QuartzSetWindowMenu(int nitems, const char **items,
|
---|
88 | const char *shortcuts);
|
---|
89 | void QuartzFSCapture(void);
|
---|
90 | void QuartzFSRelease(void);
|
---|
91 | int QuartzFSUseQDCursor(int depth);
|
---|
92 | void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask);
|
---|
93 | void QuartzWakeupHandler(void *blockData, int result, void *pReadmask);
|
---|
94 |
|
---|
95 | // Messages that can be sent to the main thread.
|
---|
96 | enum {
|
---|
97 | kQuartzServerHidden,
|
---|
98 | kQuartzServerStarted,
|
---|
99 | kQuartzServerDied,
|
---|
100 | kQuartzCursorUpdate,
|
---|
101 | kQuartzPostEvent,
|
---|
102 | kQuartzSetWindowMenu,
|
---|
103 | kQuartzSetWindowMenuCheck,
|
---|
104 | kQuartzSetFrontProcess,
|
---|
105 | kQuartzSetCanQuit
|
---|
106 | };
|
---|
107 |
|
---|
108 | #endif /* _QUARTZCOMMON_H */
|
---|