VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/wm3.h@ 78293

Last change on this file since 78293 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.0 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/wm3.h,v 1.2 1998/07/25 16:59:46 dawes Exp $ */
2
3
4
5
6
7/* $XConsortium: wm3.h /main/4 1996/02/21 17:59:24 kaleb $ */
8
9#ifdef HAVE_XORG_CONFIG_H
10#include <xorg-config.h>
11#endif
12
13#include "vgaReg.h"
14
15#ifdef PC98_EGC
16#define VGA_ALLPLANES 0xFL
17#endif
18
19/* Do call in Write Mode 3.
20 * We take care of the possibility that two passes are needed.
21 */
22#ifndef PC98_EGC
23#define DO_WM3(pgc,call) \
24 { int _tp, _fg, _bg, _alu; \
25 _fg = pgc->fgPixel; _bg = pgc->bgPixel; \
26 _tp = wm3_set_regs(pgc); \
27 (call); \
28 if ( _tp ) { \
29 _alu = pgc->alu; \
30 pgc->alu = GXinvert; \
31 _tp = wm3_set_regs(pgc); \
32 (call); \
33 pgc->alu = _alu; \
34 } \
35 pgc->fgPixel = _fg; pgc->bgPixel = _bg; \
36 }
37#else
38#define DO_WM3(pgc,call) \
39 { int _tp, _fg, _bg; \
40 _fg = pgc->fgPixel; _bg = pgc->bgPixel; \
41 _tp = wm3_set_regs(pgc); \
42 (call); \
43 pgc->fgPixel = _fg; pgc->bgPixel = _bg; \
44 }
45#endif
46
47#ifndef PC98_EGC
48#define WM3_SET_INK(ink) \
49 SetVideoGraphics(Set_ResetIndex, ink)
50#else
51#define WM3_SET_INK(ink) \
52 outw(EGC_FGC, ink)
53#endif
54
55/* GJA -- Move a long word to screen memory.
56 * The reads into 'dummy' are here to load the VGA latches.
57 * This is a RMW operation except for trivial cases.
58 * Notice that we ignore the operation.
59 */
60#ifdef PC98_EGC
61#define UPDRW(destp,src) \
62 { volatile unsigned short *_dtmp = \
63 (volatile unsigned short *)(destp); \
64 unsigned int _stmp = (src); \
65 *_dtmp = _stmp; _dtmp++; _stmp >>= 16; \
66 *_dtmp = _stmp; }
67#else
68#define UPDRW(destp,src) \
69 { volatile char *_dtmp = (volatile char *)(destp); \
70 unsigned int _stmp = (src); \
71 volatile int dummy; /* Bit bucket. */ \
72 _stmp = ldl_u(&_stmp); \
73 dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \
74 dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \
75 dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \
76 dummy = *_dtmp; *_dtmp = _stmp; }
77#endif
78
79#define UPDRWB(destp,src) \
80 { volatile int dummy; /* Bit bucket. */ \
81 dummy = *(destp); *(destp) = (src); }
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