X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Ftpl_drv_video.h;h=f518e74a4de842d1960b9750a562f92556e9faed;hb=23711190d936735f4bd6bd5550d1c99be5358a69;hp=bf67e59865f6df4fc5ec7e96ab1502795d05dfb6;hpb=02cbaac1233be9c5228973a787431fa5e0aa178e;p=tpg%2Facess2.git diff --git a/Kernel/include/tpl_drv_video.h b/Kernel/include/tpl_drv_video.h index bf67e598..f518e74a 100644 --- a/Kernel/include/tpl_drv_video.h +++ b/Kernel/include/tpl_drv_video.h @@ -90,19 +90,15 @@ enum eTplVideo_IOCtl { VIDEO_IOCTL_SETCURSOR, /** - * ioctl(..., tVAddr MapTo) - * \brief Request access to Framebuffer - * \return Boolean Success - * - * Requests the driver to allow the user direct access to the - * framebuffer by mapping it to the supplied address. - * If the driver does not allow this boolean FALSE (0) is returned, - * else if the call succeeds (and the framebuffer ends up mapped) boolean - * TRUE (1) is returned. + * ioctl(..., tVideo_IOCtl_Bitmap *Image) + * \brief Sets the cursor image + * \return Boolean success + * + * Sets the graphics mode cursor image */ - VIDEO_IOCTL_REQLFB + VIDEO_IOCTL_SETCURSORBITMAP }; -#define DRV_VIDEO_IOCTLNAMES "getset_mode", "find+mode", "mode_info", "set_buf_format", "set_cursor", "request_framebuffer" +#define DRV_VIDEO_IOCTLNAMES "getset_mode", "find+mode", "mode_info", "set_buf_format", "set_cursor", "set_cursor_bitmap" /** * \brief Mode Structure used in IOCtl Calls @@ -212,6 +208,18 @@ typedef struct sVideo_IOCtl_Pos Sint16 y; //!< Y Coordinate } tVideo_IOCtl_Pos; +/** + * \brief Bitmap object (out of band image) + */ +typedef struct sVideo_IOCtl_Bitmap +{ + Sint16 W; //!< Width of image + Sint16 H; //!< Height of image + Sint16 XOfs; //!< X Offset of center + Sint16 YOfs; //!< Y Offset of center + Uint32 Data[]; //!< Image data (ARGB array) +} tVideo_IOCtl_Bitmap; + /** * \brief Virtual Terminal Representation of a character */ @@ -244,11 +252,11 @@ extern int giVT_CharWidth; //! \brief Defines the height of a rendered character extern int giVT_CharHeight; /** - * \fn void VT_Font_Render(Uint32 Codepoint, void *Buffer, int Pitch, Uint32 BGC, Uint32 FGC) * \brief Driver helper that renders a character to a buffer * \param Codepoint Unicode character to render - * \param Buffer Buffer to render to (32-bpp) - * \param Pitch Number of DWords per line + * \param Buffer Buffer to render to + * \param Depth Bit depth of the destination buffer + * \param Pitch Number of bytes per line * \param BGC 32-bit Background Colour * \param FGC 32-bit Foreground Colour * @@ -256,14 +264,33 @@ extern int giVT_CharHeight; * text mode by keeping the character rendering abstracted from the driver, * easing the driver development and reducing code duplication. */ -extern void VT_Font_Render(Uint32 Codepoint, void *Buffer, int Pitch, Uint32 BGC, Uint32 FGC); +extern void VT_Font_Render(Uint32 Codepoint, void *Buffer, int Depth, int Pitch, Uint32 BGC, Uint32 FGC); /** * \fn Uint32 VT_Colour12to24(Uint16 Col12) - * \brief Converts a colour from 12bpp to 32bpp + * \brief Converts a colour from 12bpp to 24bpp * \param Col12 12-bpp input colour * \return Expanded 32-bpp (24-bit colour) version of \a Col12 */ extern Uint32 VT_Colour12to24(Uint16 Col12); +/** + * \brief Converts a colour from 12bpp to 14bpp + * \param Col12 12-bpp input colour + * \return 15 bits per pixel value + */ +extern Uint16 VT_Colour12to15(Uint16 Col12); +/** + * \brief Converts a colour from 12bpp to 32bpp + * \param Col12 12-bpp input colour + * \param Depth Desired bit depth + * \return \a Depth bit number, denoting Col12 + * + * Expands the source colour into a \a Depth bits per pixel representation. + * The colours are expanded with preference to Green, Blue and Red in that order + * (so, green gets the first spare pixel, blue gets the next, and red never gets + * the spare). \n + * The final bit of each component is used to fill the lower bits of the output. + */ +extern Uint32 VT_Colour12toN(Uint16 Col12, int Depth); /** * \brief Handlers for eTplVideo_2DCommands