VirtualBox

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

最後變更 在這個檔案從25078是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

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

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