Penguin

SDL_!CreateCursor?

SDL_!CreateCursor?

NAME SYNOPSIS DESCRIPTION EXAMPLE SEE ALSO


NAME

SDL_!CreateCursor?- Creates a new mouse cursor.

SYNOPSIS

#include

SDL_Cursor *SDL_!CreateCursor?(__Uint8 *data, Uint8

  • mask, int w, int h, int hot_x, int hot_y__);

DESCRIPTION

Create a cursor using the specified data and mask (in MSB format). The cursor width must be a multiple of 8 bits.

The cursor is created in black and white according to the following:

Data / Mask Resulting pixel on screen

0 / 1 White

1 / 1 Black

0 / 0 Transparent

1 / 0 Inverted color if possible, black if not.

Cursors created with this function must be freed with SDL_!FreeCursor?.

EXAMPLE

/* Stolen from the mailing list / / Creates a new mouse cursor from an XPM / / XPM / static const char *arrow[? = { / width height num_colors chars_per_pixel */

SEE ALSO

SDL_!FreeCursor?, SDL_!SetCursor?, SDL_!ShowCursor?


This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.