VirtualBox

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

Last change on this file since 68495 was 51223, checked in by vboxsync, 11 years ago

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

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaVideo.h,v 1.1.2.1 1998/06/27 14:48:54 dawes Exp $ */
2/*
3 * Copyright IBM Corporation 1987,1988,1989
4 *
5 * All Rights Reserved
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appear in all copies and that
10 * both that copyright notice and this permission notice appear in
11 * supporting documentation, and that the name of IBM not be
12 * used in advertising or publicity pertaining to distribution of the
13 * software without specific, written prior permission.
14 *
15 * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17 * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21 * SOFTWARE.
22 *
23*/
24
25/* $XConsortium: vgaVideo.h /main/4 1996/02/21 17:59:14 kaleb $ */
26
27#ifdef HAVE_XORG_CONFIG_H
28#include <xorg-config.h>
29#endif
30
31#include "misc.h" /* GJA -- for pointer data type */
32#ifdef lint
33#if defined(volatile)
34#undef volatile
35#endif
36#define volatile /**/
37#if defined(const)
38#undef const
39#endif
40#define const /**/
41#if defined(signed)
42#undef signed
43#endif
44#define signed /**/
45#endif
46
47/*
48 * References to all pc ( i.e. '286 ) memory in the
49 * regions used by the [ev]ga server ( the 128K windows )
50 * MUST be long-word ( i.e. 32-bit ) reads or writes.
51 * This definition will change for other memory architectures
52 * ( e.g. AIX-Rt )
53 */
54typedef unsigned char VideoAdapterObject ;
55typedef volatile VideoAdapterObject *VideoMemoryPtr ;
56typedef volatile VideoAdapterObject *VgaMemoryPtr ;
57#if !defined(BITMAP_BIT_ORDER)
58#define BITMAP_BIT_ORDER MSBFirst
59#endif
60
61#if !defined(IMAGE_BYTE_ORDER)
62#define IMAGE_BYTE_ORDER LSBFirst
63#endif
64
65/* Bit Ordering Macros */
66#if !defined(SCRLEFT8)
67#define SCRLEFT8(lw, n) ( (unsigned char) (((unsigned char) lw) << (n)) )
68#endif
69#if !defined(SCRRIGHT8)
70#define SCRRIGHT8(lw, n) ( (unsigned char) (((unsigned char)lw) >> (n)) )
71#endif
72/* These work ONLY on 8-bit wide Quantities !! */
73#define LeftmostBit ( SCRLEFT8( 0xFF, 7 ) & 0xFF )
74#define RightmostBit ( SCRRIGHT8( 0xFF, 7 ) & 0xFF )
75
76/*
77 * [ev]ga video screen defines & macros
78 */
79#define VGA_BLACK_PIXEL 0
80#define VGA_WHITE_PIXEL 1
81
82#define VGA_MAXPLANES 4
83#define VGA_ALLPLANES 0xFL
84
85#define VIDBASE(pDraw) ((volatile unsigned char *) \
86 (((PixmapPtr)(((DrawablePtr)(pDraw))->pScreen->devPrivate))-> \
87 devPrivate.ptr))
88#define BYTES_PER_LINE(pDraw) \
89 ((int)((PixmapPtr)(((DrawablePtr)(pDraw))->pScreen->devPrivate))->devKind)
90
91#define ROW_OFFSET( x ) ( ( x ) >> 3 )
92#define BIT_OFFSET( x ) ( ( x ) & 0x7 )
93#define SCREENADDRESS( pWin, x, y ) \
94 ( VIDBASE(pWin) + (y) * BYTES_PER_LINE(pWin) + ROW_OFFSET(x) )
95
96
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