00001
00027 #ifndef _TPL_VIDEO_H
00028 #define _TPL_VIDEO_H
00029
00030 #include <tpl_drv_common.h>
00031
00037 enum eTplVideo_IOCtl {
00046 VIDEO_IOCTL_GETSETMODE = 4,
00047
00057 VIDEO_IOCTL_FINDMODE,
00058
00066 VIDEO_IOCTL_MODEINFO,
00067
00077 VIDEO_IOCTL_SETBUFFORMAT,
00078
00090 VIDEO_IOCTL_SETCURSOR,
00091
00103 VIDEO_IOCTL_REQLFB
00104 };
00105
00112 typedef struct sVideo_IOCtl_Mode
00113 {
00114 short id;
00115 Uint16 width;
00116 Uint16 height;
00117 Uint8 bpp;
00118 Uint8 flags;
00119 } tVideo_IOCtl_Mode;
00120
00124 enum eTplVideo_BufFormats
00125 {
00134 VIDEO_BUFFMT_TEXT,
00143 VIDEO_BUFFMT_FRAMEBUFFER,
00150 VIDEO_BUFFMT_2DSTREAM,
00157 VIDEO_BUFFMT_3DSTREAM
00158 };
00159
00165 enum eTplVideo_2DCommands
00166 {
00170 VIDEO_2DOP_NOP,
00179 VIDEO_2DOP_FILL,
00189 VIDEO_2DOP_BLIT,
00190
00191
00195 VIDEO_2DOP_BLITBUF,
00196
00200 VIDEO_2DOP_BLITSCALEBUF,
00201
00202 NUM_VIDEO_2DOPS
00203 };
00204
00208 typedef struct sVideo_IOCtl_Pos
00209 {
00210 Sint16 x;
00211 Sint16 y;
00212 } tVideo_IOCtl_Pos;
00213
00217 typedef struct sVT_Char
00218 {
00219 Uint32 Ch;
00220 union {
00221 struct {
00222 Uint16 BGCol;
00223 Uint16 FGCol;
00224 };
00225 Uint32 Colour;
00226 };
00227 } tVT_Char;
00228
00233 #define VT_COL_BLACK 0x0000
00234 #define VT_COL_GREY 0x0888
00235 #define VT_COL_LTGREY 0x0CCC
00236 #define VT_COL_WHITE 0x0FFF
00237
00241
00242 extern int giVT_CharWidth;
00244 extern int giVT_CharHeight;
00258 extern void VT_Font_Render(Uint32 Codepoint, void *Buffer, int Pitch, Uint32 BGC, Uint32 FGC);
00265 extern Uint32 VT_Colour12to24(Uint16 Col12);
00266
00270 typedef struct sDrvUtil_Video_2DHandlers
00271 {
00276 void *Nop;
00286 void (*Fill)(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colour);
00297 void (*Blit)(void *Ent, Uint16 DestX, Uint16 DestY, Uint16 SrcX, Uint16 SrcY, Uint16 W, Uint16 H);
00298 } tDrvUtil_Video_2DHandlers;
00299
00309 extern Uint64 DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length,
00310 tDrvUtil_Video_2DHandlers *Handlers, int SizeofHandlers);
00311
00312 #endif