Go to the source code of this file.
Status sys_cursor_create |
( |
int |
w, |
|
|
int |
h, |
|
|
void * |
bgra_img, |
|
|
int |
hx, |
|
|
int |
hy, |
|
|
sys_cursor * |
cursor |
|
) |
| |
Create a cursor from the given color image.
- Parameters
-
w,h | Image dimensions [pixels]. the maximum value is implementation-defined; 32x32 is typical and safe. |
bgra_img | cursor image (BGRA format, bottom-up). It is copied and can be freed after this call returns. |
hx,hy | 'hotspot', i.e. offset from the upper-left corner to the position where mouse clicks are registered. |
cursor | Is 0 if the return code indicates failure, otherwise a valid cursor that must be sys_cursor_free-ed when no longer needed. |
Create a transparent cursor (used to hide the system cursor).
- Parameters
-
cursor | is 0 if the return code indicates failure, otherwise a valid cursor that must be sys_cursor_free-ed when no longer needed. |
destroy the indicated cursor and frees its resources.
- Parameters
-
cursor | if currently in use, the default cursor is restored first. |
reset any cached cursor data.
on some systems, this is needed when resetting the SDL video subsystem.
override the current system cursor.
- Parameters
-
cursor | can be 0 to restore the default. |