---
name: "select_mouse_cursor"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/select_mouse_cursor/3alleg4"
---

# select\_mouse\_cursor(3alleg4)

Tells Allegro to select software or hardware cursor drawing.

## NAME

select\_mouse\_cursor - Tells Allegro to select software or hardware cursor drawing.

## SYNOPSIS

**#include \<allegro.h\>**

**void select\_mouse\_cursor(int cursor);**

## DESCRIPTION

This function allows you to use the operating system's native mouse cursors rather than some custom cursor. You will need to enable this functionality by calling enable\_hardware\_cursor() beforehand. If the operating system does not support this functionality, or if it has not been enabled, then Allegro will substitute its own cursor images. You can change these substitute images using set\_mouse\_cursor\_bitmap().

Note that the effects of this function are not apparent until show\_mouse() is called.

To know whether the operating system's native cursor is being used, or if Allegro has made a substitution, you can check the GFX\_SYSTEM\_CURSOR flag in gfx\_capabilities after calling show\_mouse().

The cursor argument selects the type of cursor to be displayed:

**MOUSE\_CURSOR\_NONE** Selects an invisible mouse cursor. In that sense, it is similar to calling show\_mouse(NULL);

**MOUSE\_CURSOR\_ALLEGRO** Selects the custom Allegro cursor, i.e. the one that you set with set\_mouse\_sprite().

**MOUSE\_CURSOR\_ARROW** The operating system default arrow cursor.

**MOUSE\_CURSOR\_BUSY** The operating system default \`busy' cursor (hourglass).

**MOUSE\_CURSOR\_QUESTION** The operating system default \`question' cursor (arrow with question mark).

**MOUSE\_CURSOR\_EDIT** The operating system default \`edit' cursor (vertical bar).

Example:

```
   /* initialize mouse sub-system */
   install_mouse();
   enable_hardware_cursor();
   /* Set busy pointer */
   select_mouse_cursor(MOUSE_CURSOR_BUSY);
   show_mouse(screen);
   /* Initialize stuff */
   ...
   /* Set normal arrow pointer */
   select_mouse_cursor(MOUSE_CURSOR_ARROW);
```

## SEE ALSO

**install\_mouse**(3alleg4), **show\_mouse**(3alleg4), **set\_mouse\_sprite**(3alleg4), **gfx\_capabilities**(3alleg4), **enable\_hardware\_cursor**(3alleg4), **set\_mouse\_cursor\_bitmap**(3alleg4), **show\_os\_cursor**(3alleg4), **exsyscur**(3alleg4)
