VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.18.0/pixmapstr.h@ 77138

Last change on this file since 77138 was 58634, checked in by vboxsync, 9 years ago

Additions/x11: added header files for building X.Org video driver against X.Org Server 1.18.

  • Property svn:eol-style set to native
File size: 4.1 KB
Line 
1/***********************************************************
2
3Copyright 1987, 1998 The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24
25Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
26
27 All Rights Reserved
28
29Permission to use, copy, modify, and distribute this software and its
30documentation for any purpose and without fee is hereby granted,
31provided that the above copyright notice appear in all copies and that
32both that copyright notice and this permission notice appear in
33supporting documentation, and that the name of Digital not be
34used in advertising or publicity pertaining to distribution of the
35software without specific, written prior permission.
36
37DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
38ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
39DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
40ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
41WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
42ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
43SOFTWARE.
44
45******************************************************************/
46
47#ifndef PIXMAPSTRUCT_H
48#define PIXMAPSTRUCT_H
49#include "pixmap.h"
50#include "screenint.h"
51#include "regionstr.h"
52#include "privates.h"
53#include "damage.h"
54#include <X11/extensions/randr.h>
55#include "picturestr.h"
56
57typedef struct _Drawable {
58 unsigned char type; /* DRAWABLE_<type> */
59 unsigned char class; /* specific to type */
60 unsigned char depth;
61 unsigned char bitsPerPixel;
62 XID id; /* resource id */
63 short x; /* window: screen absolute, pixmap: 0 */
64 short y; /* window: screen absolute, pixmap: 0 */
65 unsigned short width;
66 unsigned short height;
67 ScreenPtr pScreen;
68 unsigned long serialNumber;
69} DrawableRec;
70
71/*
72 * PIXMAP -- device dependent
73 */
74
75typedef struct _Pixmap {
76 DrawableRec drawable;
77 PrivateRec *devPrivates;
78 int refcnt;
79 int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
80 DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
81#ifdef COMPOSITE
82 short screen_x;
83 short screen_y;
84#endif
85 unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
86
87 PixmapPtr master_pixmap; /* pointer to master copy of pixmap for pixmap sharing */
88} PixmapRec;
89
90typedef struct _PixmapDirtyUpdate {
91 PixmapPtr src, slave_dst;
92 int x, y;
93 DamagePtr damage;
94 struct xorg_list ent;
95 int dst_x, dst_y;
96 Rotation rotation;
97 PictTransform transform;
98 struct pixman_f_transform f_transform, f_inverse;
99} PixmapDirtyUpdateRec;
100
101static inline void
102PixmapBox(BoxPtr box, PixmapPtr pixmap)
103{
104 box->x1 = 0;
105 box->x2 = pixmap->drawable.width;
106
107 box->y1 = 0;
108 box->y2 = pixmap->drawable.height;
109}
110
111
112static inline void
113PixmapRegionInit(RegionPtr region, PixmapPtr pixmap)
114{
115 BoxRec box;
116
117 PixmapBox(&box, pixmap);
118 RegionInit(region, &box, 1);
119}
120
121#endif /* PIXMAPSTRUCT_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