X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Fapi_drv_video.h;h=f2d1a2d1f9b220d9d08e7ba2ffd452bd4e66e873;hb=dd2491a82880ed9b01b5d66b1814d271921797a4;hp=b1abe594cdbe5dd24cb7dcc21fd1c189fcba61e9;hpb=a173ab5b104f596bfe2f4df85de541c2c4583ba7;p=tpg%2Facess2.git diff --git a/Kernel/include/api_drv_video.h b/Kernel/include/api_drv_video.h index b1abe594..f2d1a2d1 100644 --- a/Kernel/include/api_drv_video.h +++ b/Kernel/include/api_drv_video.h @@ -4,8 +4,9 @@ * \note For AcessOS Version 1 * * Video drivers extend the common driver interface api_drv_common.h - * and must support _at least_ the IOCtl numbers defined in this file - * to be compatable with Acess. + * and must support the IOCtl numbers defined in this file to be + * compatable with Acess (drivers may implement more IOCtls above + * DRV_IOCTL_USERMIN). * * \section IOCtls * As said, a compatable driver must implement these calls correctly, @@ -19,10 +20,9 @@ * framebuffer. * * \section Mode Support - * All video drivers must support at least one text mode (Mode #0) - * For each graphics mode the driver exposes, there must be a corresponding - * text mode with the same resolution, this mode will be used when the - * user switches to a text Virtual Terminal while in graphics mode. + * All video drivers must support text output for every resolution (hardware + * accelerated or software), and at least the _BLIT and _FILL 2D operations + * (these may be implemented specifically for text mode). */ #ifndef _API_DRV_VIDEO_H #define _API_DRV_VIDEO_H @@ -317,6 +317,10 @@ extern Uint32 VT_Colour12toN(Uint16 Col12, int Depth); */ typedef struct sDrvUtil_Video_BufInfo { + /** + * \name Framebuffer state + * \{ + */ /** * \brief Framebuffer virtual address */ @@ -336,7 +340,15 @@ typedef struct sDrvUtil_Video_BufInfo /** * \brief Bit depth of the framebuffer */ - int Depth; + short Depth; + /* + * \} + */ + + /** + * \brief Buffer write format + */ + short BufferFormat; /** * \name Software cursor controls @@ -355,11 +367,27 @@ typedef struct sDrvUtil_Video_BufInfo * \brief Cursor bitmap */ tVideo_IOCtl_Bitmap *CursorBitmap; + /* + * \} + */ + + /* + * \name Internal fields + * \{ + */ /** * \brief Buffer to store the area under the cursor */ void *CursorSaveBuf; + + int CursorReadX; //!< X offset in cursor bitmap corresponding to \a CursorDestX + int CursorReadY; //!< Same as \a CursorReadX but for Y + int CursorRenderW; //!< Width of rendered cursor + int CursorRenderH; //!< Height of rendered cursor + int CursorDestX; //!< X coordinate Destination for rendered cursor + int CursorDestY; //!< Y coordinate destination for rendered cursor + /* * \} */ @@ -412,7 +440,6 @@ extern int DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length, /** * \brief Perform write operations to a LFB - * \param Mode Buffer mode (see eTplVideo_BufFormats) * \param FBInfo Framebuffer descriptor, see type for details * \param Offset Offset provided by VFS call * \param Length Length provided by VFS call @@ -422,7 +449,7 @@ extern int DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length, * Handles all write modes in software, using the VT font calls for rendering. * \note Calls the cursor clear and redraw if the cursor area is touched */ -extern int DrvUtil_Video_WriteLFB(int Mode, tDrvUtil_Video_BufInfo *FBInfo, size_t Offset, size_t Length, void *Src); +extern int DrvUtil_Video_WriteLFB(tDrvUtil_Video_BufInfo *FBInfo, size_t Offset, size_t Length, void *Src); /** * \name Software cursor rendering @@ -433,7 +460,7 @@ extern int DrvUtil_Video_WriteLFB(int Mode, tDrvUtil_Video_BufInfo *FBInfo, size * \param Buf Framebuffer descriptor * \param Bitmap New cursor bitmap */ -extern void DrvUtil_Video_SetCursor(tDrvUtil_Video_BufInfo *Buf, tVideo_IOCtl_Bitmap *Bitmap); +extern int DrvUtil_Video_SetCursor(tDrvUtil_Video_BufInfo *Buf, tVideo_IOCtl_Bitmap *Bitmap); /** * \brief Render the cursor at (\a X, \a Y) * \param Buf Framebuffer descriptor, see type for details @@ -446,6 +473,11 @@ extern void DrvUtil_Video_DrawCursor(tDrvUtil_Video_BufInfo *Buf, int X, int Y); * \param Buf Framebuffer descriptor, see type for details */ extern void DrvUtil_Video_RemoveCursor(tDrvUtil_Video_BufInfo *Buf); + +/** + * \brief Text mode cursor image + */ +extern tVideo_IOCtl_Bitmap gDrvUtil_TextModeCursor; /** * \} */