~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/x11include/4.3/programs/Xserver/include/windowstr.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Xorg: windowstr.h,v 1.4 2001/02/09 02:05:16 xorgcvs Exp $ */
2
 
/***********************************************************
3
 
 
4
 
Copyright 1987, 1998  The Open Group
5
 
 
6
 
Permission to use, copy, modify, distribute, and sell this software and its
7
 
documentation for any purpose is hereby granted without fee, provided that
8
 
the above copyright notice appear in all copies and that both that
9
 
copyright notice and this permission notice appear in supporting
10
 
documentation.
11
 
 
12
 
The above copyright notice and this permission notice shall be included in
13
 
all copies or substantial portions of the Software.
14
 
 
15
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18
 
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19
 
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
 
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
 
 
22
 
Except as contained in this notice, the name of The Open Group shall not be
23
 
used in advertising or otherwise to promote the sale, use or other dealings
24
 
in this Software without prior written authorization from The Open Group.
25
 
 
26
 
 
27
 
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
 
 
29
 
                        All Rights Reserved
30
 
 
31
 
Permission to use, copy, modify, and distribute this software and its 
32
 
documentation for any purpose and without fee is hereby granted, 
33
 
provided that the above copyright notice appear in all copies and that
34
 
both that copyright notice and this permission notice appear in 
35
 
supporting documentation, and that the name of Digital not be
36
 
used in advertising or publicity pertaining to distribution of the
37
 
software without specific, written prior permission.  
38
 
 
39
 
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40
 
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41
 
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42
 
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43
 
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44
 
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45
 
SOFTWARE.
46
 
 
47
 
******************************************************************/
48
 
/* $XFree86: xc/programs/Xserver/include/windowstr.h,v 1.6 2001/12/14 19:59:57 dawes Exp $ */
49
 
 
50
 
#ifndef WINDOWSTRUCT_H
51
 
#define WINDOWSTRUCT_H
52
 
 
53
 
#include "window.h"
54
 
#include "pixmapstr.h"
55
 
#include "regionstr.h"
56
 
#include "cursor.h"
57
 
#include "property.h"
58
 
#include "resource.h"   /* for ROOT_WINDOW_ID_BASE */
59
 
#include "dix.h"
60
 
#include "miscstruct.h"
61
 
#include "X11/Xprotostr.h"
62
 
#include "opaque.h"
63
 
 
64
 
#define GuaranteeNothing        0
65
 
#define GuaranteeVisBack        1
66
 
 
67
 
#define SameBackground(as, a, bs, b)                            \
68
 
    ((as) == (bs) && ((as) == None ||                           \
69
 
                      (as) == ParentRelative ||                 \
70
 
                      SamePixUnion(a,b,as == BackgroundPixel)))
71
 
 
72
 
#define SameBorder(as, a, bs, b)                                \
73
 
    EqualPixUnion(as, a, bs, b)
74
 
 
75
 
typedef struct _WindowOpt {
76
 
    VisualID            visual;            /* default: same as parent */
77
 
    CursorPtr           cursor;            /* default: window.cursorNone */
78
 
    Colormap            colormap;          /* default: same as parent */
79
 
    Mask                dontPropagateMask; /* default: window.dontPropagate */
80
 
    Mask                otherEventMasks;   /* default: 0 */
81
 
    struct _OtherClients *otherClients;    /* default: NULL */
82
 
    struct _GrabRec     *passiveGrabs;     /* default: NULL */
83
 
    PropertyPtr         userProps;         /* default: NULL */
84
 
    unsigned long       backingBitPlanes;  /* default: ~0L */
85
 
    unsigned long       backingPixel;      /* default: 0 */
86
 
#ifdef SHAPE
87
 
    RegionPtr           boundingShape;     /* default: NULL */
88
 
    RegionPtr           clipShape;         /* default: NULL */
89
 
#endif
90
 
#ifdef XINPUT
91
 
    struct _OtherInputMasks *inputMasks;   /* default: NULL */
92
 
#endif
93
 
} WindowOptRec, *WindowOptPtr;
94
 
 
95
 
#define BackgroundPixel     2L
96
 
#define BackgroundPixmap    3L
97
 
 
98
 
typedef struct _Window {
99
 
    DrawableRec         drawable;
100
 
    WindowPtr           parent;         /* ancestor chain */
101
 
    WindowPtr           nextSib;        /* next lower sibling */
102
 
    WindowPtr           prevSib;        /* next higher sibling */
103
 
    WindowPtr           firstChild;     /* top-most child */
104
 
    WindowPtr           lastChild;      /* bottom-most child */
105
 
    RegionRec           clipList;       /* clipping rectangle for output */
106
 
    RegionRec           borderClip;     /* NotClippedByChildren + border */
107
 
    union _Validate     *valdata;
108
 
    RegionRec           winSize;
109
 
    RegionRec           borderSize;
110
 
    DDXPointRec         origin;         /* position relative to parent */
111
 
    unsigned short      borderWidth;
112
 
    unsigned short      deliverableEvents;
113
 
    Mask                eventMask;
114
 
    PixUnion            background;
115
 
    PixUnion            border;
116
 
    pointer             backStorage;    /* null when BS disabled */
117
 
    WindowOptPtr        optional;
118
 
    unsigned            backgroundState:2; /* None, Relative, Pixel, Pixmap */
119
 
    unsigned            borderIsPixel:1;
120
 
    unsigned            cursorIsNone:1; /* else real cursor (might inherit) */
121
 
    unsigned            backingStore:2;
122
 
    unsigned            saveUnder:1;
123
 
    unsigned            DIXsaveUnder:1;
124
 
    unsigned            bitGravity:4;
125
 
    unsigned            winGravity:4;
126
 
    unsigned            overrideRedirect:1;
127
 
    unsigned            visibility:2;
128
 
    unsigned            mapped:1;
129
 
    unsigned            realized:1;     /* ancestors are all mapped */
130
 
    unsigned            viewable:1;     /* realized && InputOutput */
131
 
    unsigned            dontPropagate:3;/* index into DontPropagateMasks */
132
 
    unsigned            forcedBS:1;     /* system-supplied backingStore */
133
 
#ifdef NEED_DBE_BUF_BITS
134
 
#define DBE_FRONT_BUFFER 1
135
 
#define DBE_BACK_BUFFER  0
136
 
    unsigned            dstBuffer:1;    /* destination buffer for rendering */
137
 
    unsigned            srcBuffer:1;    /* source buffer for rendering */
138
 
#endif
139
 
    DevUnion            *devPrivates;
140
 
} WindowRec;
141
 
 
142
 
/*
143
 
 * Ok, a bunch of macros for accessing the optional record
144
 
 * fields (or filling the appropriate default value)
145
 
 */
146
 
 
147
 
extern Mask         DontPropagateMasks[];
148
 
 
149
 
#define wTrackParent(w,field)   ((w)->optional ? \
150
 
                                    (w)->optional->field \
151
 
                                 : FindWindowWithOptional(w)->optional->field)
152
 
#define wUseDefault(w,field,def)        ((w)->optional ? \
153
 
                                    (w)->optional->field \
154
 
                                 : def)
155
 
 
156
 
#define wVisual(w)              wTrackParent(w, visual)
157
 
#define wCursor(w)              ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
158
 
#define wColormap(w)            ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
159
 
#define wDontPropagateMask(w)   wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
160
 
#define wOtherEventMasks(w)     wUseDefault(w, otherEventMasks, 0)
161
 
#define wOtherClients(w)        wUseDefault(w, otherClients, NULL)
162
 
#ifdef XINPUT
163
 
#define wOtherInputMasks(w)     wUseDefault(w, inputMasks, NULL)
164
 
#else
165
 
#define wOtherInputMasks(w)     NULL
166
 
#endif
167
 
#define wPassiveGrabs(w)        wUseDefault(w, passiveGrabs, NULL)
168
 
#define wUserProps(w)           wUseDefault(w, userProps, NULL)
169
 
#define wBackingBitPlanes(w)    wUseDefault(w, backingBitPlanes, ~0L)
170
 
#define wBackingPixel(w)        wUseDefault(w, backingPixel, 0)
171
 
#ifdef SHAPE
172
 
#define wBoundingShape(w)       wUseDefault(w, boundingShape, NULL)
173
 
#define wClipShape(w)           wUseDefault(w, clipShape, NULL)
174
 
#endif
175
 
#define wClient(w)              (clients[CLIENT_ID((w)->drawable.id)])
176
 
#define wBorderWidth(w)         ((int) (w)->borderWidth)
177
 
 
178
 
/* true when w needs a border drawn. */
179
 
 
180
 
#ifdef SHAPE
181
 
#define HasBorder(w)    ((w)->borderWidth || wClipShape(w))
182
 
#else
183
 
#define HasBorder(w)    ((w)->borderWidth)
184
 
#endif
185
 
 
186
 
typedef struct _ScreenSaverStuff {
187
 
    WindowPtr pWindow;
188
 
    XID       wid;
189
 
    char      blanked;
190
 
    Bool      (*ExternalScreenSaver)(
191
 
#if NeedNestedPrototypes
192
 
        ScreenPtr       /*pScreen*/,
193
 
        int             /*xstate*/,
194
 
        Bool            /*force*/
195
 
#endif
196
 
    );
197
 
} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
198
 
 
199
 
#define SCREEN_IS_BLANKED   0
200
 
#define SCREEN_ISNT_SAVED   1
201
 
#define SCREEN_IS_TILED     2
202
 
#define SCREEN_IS_BLACK     3
203
 
 
204
 
#define HasSaverWindow(i)   (savedScreenInfo[i].pWindow != NullWindow)
205
 
 
206
 
extern int screenIsSaved;
207
 
extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
208
 
 
209
 
/*
210
 
 * this is the configuration parameter "NO_BACK_SAVE"
211
 
 * it means that any existant backing store should not 
212
 
 * be used to implement save unders.
213
 
 */
214
 
 
215
 
#ifndef NO_BACK_SAVE
216
 
#define DO_SAVE_UNDERS(pWin)    ((pWin)->drawable.pScreen->saveUnderSupport ==\
217
 
                                 USE_DIX_SAVE_UNDERS)
218
 
/*
219
 
 * saveUnderSupport is set to this magic value when using DIXsaveUnders
220
 
 */
221
 
 
222
 
#define USE_DIX_SAVE_UNDERS     0x40
223
 
#endif
224
 
 
225
 
extern int numSaveUndersViewable;
226
 
extern int deltaSaveUndersViewable;
227
 
 
228
 
#endif /* WINDOWSTRUCT_H */