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 #define DRV_VIDEO_IOCTLNAMES "getset_mode", "find+mode", "mode_info", "set_buf_format", "set_cursor", "request_framebuffer" 00106 00113 typedef struct sVideo_IOCtl_Mode 00114 { 00115 short id; 00116 Uint16 width; 00117 Uint16 height; 00118 Uint8 bpp; 00119 Uint8 flags; 00120 } tVideo_IOCtl_Mode; 00121 00125 enum eTplVideo_BufFormats 00126 { 00135 VIDEO_BUFFMT_TEXT, 00144 VIDEO_BUFFMT_FRAMEBUFFER, 00151 VIDEO_BUFFMT_2DSTREAM, 00158 VIDEO_BUFFMT_3DSTREAM 00159 }; 00160 00166 enum eTplVideo_2DCommands 00167 { 00171 VIDEO_2DOP_NOP, 00180 VIDEO_2DOP_FILL, 00190 VIDEO_2DOP_BLIT, 00191 00192 00196 VIDEO_2DOP_BLITBUF, 00197 00201 VIDEO_2DOP_BLITSCALEBUF, 00202 00203 NUM_VIDEO_2DOPS 00204 }; 00205 00209 typedef struct sVideo_IOCtl_Pos 00210 { 00211 Sint16 x; 00212 Sint16 y; 00213 } tVideo_IOCtl_Pos; 00214 00218 typedef struct sVT_Char 00219 { 00220 Uint32 Ch; 00221 union { 00222 struct { 00223 Uint16 BGCol; 00224 Uint16 FGCol; 00225 }; 00226 Uint32 Colour; 00227 }; 00228 } tVT_Char; 00229 00234 #define VT_COL_BLACK 0x0000 00235 #define VT_COL_GREY 0x0888 00236 #define VT_COL_LTGREY 0x0CCC 00237 #define VT_COL_WHITE 0x0FFF 00238 00242 00243 extern int giVT_CharWidth; 00245 extern int giVT_CharHeight; 00259 extern void VT_Font_Render(Uint32 Codepoint, void *Buffer, int Pitch, Uint32 BGC, Uint32 FGC); 00266 extern Uint32 VT_Colour12to24(Uint16 Col12); 00267 00271 typedef struct sDrvUtil_Video_2DHandlers 00272 { 00277 void *Nop; 00287 void (*Fill)(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colour); 00298 void (*Blit)(void *Ent, Uint16 DestX, Uint16 DestY, Uint16 SrcX, Uint16 SrcY, Uint16 W, Uint16 H); 00299 } tDrvUtil_Video_2DHandlers; 00300 00310 extern Uint64 DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length, 00311 tDrvUtil_Video_2DHandlers *Handlers, int SizeofHandlers); 00312 00313 #endif