Penguin
Note: You are viewing an old revision of this page. View the current version.

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.