VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/1.6/xorg/mibank.h@ 16088

Last change on this file since 16088 was 16088, checked in by vboxsync, 16 years ago

Additions/x11: added header files for X.Org server 1.6

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.9 KB
Line 
1/*
2 * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), [email protected]
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of Marc Aurele La France not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. Marc Aurele La France makes no representations
11 * about the suitability of this software for any purpose. It is provided
12 * "as-is" without express or implied warranty.
13 *
14 * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
16 * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 */
22
23
24#ifndef __MIBANK_H__
25#define __MIBANK_H__ 1
26
27#include "scrnintstr.h"
28
29/*
30 * Banking external interface.
31 */
32
33/*
34 * This is the banking function type. The return value is normally zero.
35 * Non-zero returns can be used to implement the likes of scanline interleave,
36 * etc.
37 */
38typedef int miBankProc(
39 ScreenPtr /*pScreen*/,
40 unsigned int /*iBank*/
41);
42
43typedef miBankProc *miBankProcPtr;
44
45typedef struct _miBankInfo
46{
47 /*
48 * Banking refers to the use of one or more apertures (in the server's
49 * address space) to access various parts of a potentially larger hardware
50 * frame buffer.
51 *
52 * Three different banking schemes are supported:
53 *
54 * Single banking is indicated when pBankA and pBankB are equal and all
55 * three miBankProcPtr's point to the same function. Here, both reads and
56 * writes through the aperture access the same hardware location.
57 *
58 * Shared banking is indicated when pBankA and pBankB are equal but the
59 * source and destination functions differ. Here reads through the
60 * aperture do not necessarily access the same hardware location as writes.
61 *
62 * Double banking is indicated when pBankA and pBankB differ. Here two
63 * independent apertures are used to provide read/write access to
64 * potentially different hardware locations.
65 *
66 * Any other combination will result in no banking.
67 */
68 miBankProcPtr SetSourceBank; /* Set pBankA bank number */
69 miBankProcPtr SetDestinationBank; /* Set pBankB bank number */
70 miBankProcPtr SetSourceAndDestinationBanks; /* Set both bank numbers */
71
72 pointer pBankA; /* First aperture location */
73 pointer pBankB; /* First or second aperture location */
74
75 /*
76 * BankSize is in units of sizeof(char) and is the size of each bank.
77 */
78 unsigned long BankSize;
79
80 /*
81 * nBankDepth is the colour depth associated with the maximum number of a
82 * pixel's bits that are simultaneously accessible through the frame buffer
83 * aperture.
84 */
85 unsigned int nBankDepth;
86} miBankInfoRec, *miBankInfoPtr;
87
88Bool
89miInitializeBanking(
90 ScreenPtr /*pScreen*/,
91 unsigned int /*xsize*/,
92 unsigned int /*ysize*/,
93 unsigned int /*width*/,
94 miBankInfoPtr /*pBankInfo*/
95);
96
97/*
98 * This function determines the minimum screen width, given a initial estimate
99 * and various screen attributes. DDX needs to determine this width before
100 * initializing the screen.
101 */
102int
103miScanLineWidth(
104 unsigned int /*xsize*/,
105 unsigned int /*ysize*/,
106 unsigned int /*width*/,
107 unsigned long /*BankSize*/,
108 PixmapFormatRec * /*pBankFormat*/,
109 unsigned int /*nWidthUnit*/
110);
111
112#endif /* __MIBANK_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