This is the lower level implementation as provided by the backends. The engines should use the Graphics::CursorManager class instead of using this directly.
Functions | |
virtual bool | OSystem::showMouse (bool visible)=0 |
virtual bool | OSystem::lockMouse (bool lock) |
virtual void | OSystem::warpMouse (int x, int y)=0 |
virtual void | OSystem::setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=nullptr, const byte *mask=nullptr)=0 |
virtual void | OSystem::setCursorPalette (const byte *colors, uint start, uint num) |
virtual uint32 | OSystem::getDoubleClickTime () const |
|
pure virtual |
Show or hide the mouse cursor.
Currently, the backend is not required to immediately draw the mouse cursor on showMouse(true).
Implemented in OSystem_Wii, N3DS::OSystem_3DS, OSystem_N64, OSystem_DS, OSystem_Dreamcast, ModularGraphicsBackend, and OSystem_PSP.
|
inlinevirtual |
Lock or unlock the mouse cursor within the window.
Reimplemented in ModularGraphicsBackend.
|
pure virtual |
Move ("warp") the mouse cursor to the specified position in virtual screen coordinates.
x | New x position of the mouse. |
y | New y position of the mouse. |
Implemented in OSystem_Wii, OSystem_N64, N3DS::OSystem_3DS, OSystem_DS, OSystem_Dreamcast, ModularGraphicsBackend, and OSystem_PSP.
|
pure virtual |
Set the bitmap used for drawing the cursor.
buf | Pixmap data to be used. |
w | Width of the mouse cursor. |
h | Height of the mouse cursor. |
hotspotX | Horizontal offset from the left side to the hotspot. |
hotspotY | Vertical offset from the top side to the hotspot. |
keycolor | Transparency color value. This should not exceed the maximum color value of the specified format. In case it does, the behavior is undefined. The backend might just error out or simply ignore the value. (The SDL backend will just assert to prevent abuse of this). This parameter does nothing if a mask is provided. |
dontScale | Whether the cursor should never be scaled. An exception is high ppi displays, where the cursor might be too small to notice otherwise, these are allowed to scale the cursor anyway. |
format | Pointer to the pixel format that the cursor graphic uses (0 means CLUT8). |
mask | A mask containing values from the CursorMaskValue enum for each cursor pixel. |
Implemented in OSystem_Wii, OSystem_N64, N3DS::OSystem_3DS, OSystem_Dreamcast, OSystem_DS, ModularGraphicsBackend, and OSystem_PSP.
|
inlinevirtual |
Replace the specified range of cursor palette with new colors.
The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.
Backends which implement this should have the kFeatureCursorPalette flag set.
Reimplemented in N3DS::OSystem_3DS, OSystem_N64, OSystem_Wii, OSystem_DS, OSystem_Dreamcast, ModularGraphicsBackend, and OSystem_PSP.
|
inlinevirtual |
Get the system-configured double-click time interval. If the system doesn't support configuring double-click time, returns 0.
Reimplemented in OSystem_SDL.