From: John Hodge Date: Thu, 4 Aug 2011 00:13:26 +0000 (+0800) Subject: Changed Video device spec to implement cursors X-Git-Tag: rel0.10~18 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=80ddda5fff1b004648f74848d94db7c81f1ce6a3;hp=5970337d36c6238d074816360ccefcec1a0ec7d4;p=tpg%2Facess2.git Changed Video device spec to implement cursors --- diff --git a/Kernel/include/tpl_drv_video.h b/Kernel/include/tpl_drv_video.h index 1be4f2b7..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 */ diff --git a/Modules/Display/BochsGA/bochsvbe.c b/Modules/Display/BochsGA/bochsvbe.c index 87c1d734..df4072b3 100644 --- a/Modules/Display/BochsGA/bochsvbe.c +++ b/Modules/Display/BochsGA/bochsvbe.c @@ -280,9 +280,9 @@ int BGA_Ioctl(tVFS_Node *Node, int ID, void *Data) break; // Request Access to LFB - case VIDEO_IOCTL_REQLFB: - ret = BGA_int_MapFB( *(void**)Data ); - break; +// case VIDEO_IOCTL_REQLFB: +// ret = BGA_int_MapFB( *(void**)Data ); +// break; default: LEAVE('i', -2); diff --git a/Modules/Display/VESA/main.c b/Modules/Display/VESA/main.c index 04e339ba..848351a0 100644 --- a/Modules/Display/VESA/main.c +++ b/Modules/Display/VESA/main.c @@ -430,8 +430,8 @@ int Vesa_Ioctl(tVFS_Node *Node, int ID, void *Data) //Log_Debug("VESA", "Cursor position (%i,%i) Timer %i", giVesaCursorX, giVesaCursorY, giVesaCursorTimer); return 0; - case VIDEO_IOCTL_REQLFB: // Request Linear Framebuffer - return 0; +// case VIDEO_IOCTL_REQLFB: // Request Linear Framebuffer +// return 0; } return 0; }