push d1f5df181c120dbe494f7c89b454752c2e0dcc04
[wine/hacks.git] / dlls / winedos / vga.h
blobf3169f8a689d02f2743e3e8fbf8ee25e3b476400
1 /*
2 * VGA emulation
4 * Copyright 1998 Ove Kåven
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_VGA_H
22 #define __WINE_VGA_H
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wingdi.h"
31 * VGA VESA definitions
33 /* mode descriptor */
34 enum modetype {TEXT=0, GRAPHIC=1};
35 /* Wine internal information about video modes */
36 typedef struct {
37 WORD Mode;
38 BOOL ModeType;
39 WORD TextCols; /* columns of text in display */
40 WORD TextRows; /* rows of text in display */
41 WORD CharWidth;
42 WORD CharHeight;
43 WORD Width; /* width of display in pixels */
44 WORD Height; /* height of display in pixels */
45 WORD Depth; /* bits per pixel */
46 WORD Colors; /* total available colors */
47 WORD ScreenPages;
48 BOOL Supported;
49 } VGA_MODE;
51 extern const VGA_MODE VGA_modelist[];
53 /* all vga modes */
54 const VGA_MODE *VGA_GetModeInfo(WORD mode);
55 int VGA_SetMode(WORD mode);
57 /* graphics mode */
58 int VGA_SetGraphicMode(WORD mode);
59 int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth);
60 void VGA_SetPalette(PALETTEENTRY*pal,int start,int len);
61 void VGA_SetColor16(int reg,int color);
62 char VGA_GetColor16(int reg);
63 void VGA_Set16Palette(char *Table);
64 void VGA_Get16Palette(char *Table);
65 void VGA_SetWindowStart(int start);
66 int VGA_GetWindowStart(void);
67 void VGA_ShowMouse(BOOL show);
68 void VGA_UpdatePalette(void);
69 void VGA_SetPaletteIndex(unsigned index);
70 void VGA_SetBright(BOOL bright);
71 void VGA_WritePixel(unsigned color, unsigned page, unsigned col, unsigned row);
73 /* text mode */
74 void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
75 void VGA_SetAlphaMode(unsigned Xres,unsigned Yres);
76 BOOL VGA_GetAlphaMode(unsigned*Xres,unsigned*Yres);
77 void VGA_SetCursorShape(unsigned char start_options,unsigned char end);
78 void VGA_SetCursorPos(unsigned X,unsigned Y);
79 void VGA_GetCursorPos(unsigned*X,unsigned*Y);
80 void VGA_WriteChars(unsigned X,unsigned Y,unsigned ch,int attr,int count);
81 void VGA_PutChar(BYTE ascii);
82 void VGA_ClearText(unsigned row1, unsigned col1,
83 unsigned row2, unsigned col2,
84 BYTE attr);
85 void VGA_ScrollUpText(unsigned row1, unsigned col1,
86 unsigned row2, unsigned col2,
87 unsigned lines, BYTE attr);
88 void VGA_ScrollDownText(unsigned row1, unsigned col1,
89 unsigned row2, unsigned col2,
90 unsigned lines, BYTE attr);
91 void VGA_GetCharacterAtCursor(BYTE *ascii, BYTE *attr);
93 /* control */
94 void VGA_ioport_out(WORD port, BYTE val);
95 BYTE VGA_ioport_in(WORD port);
96 void VGA_Clean(void);
98 #endif /* __WINE_VGA_H */