DOKK / manpages / debian 12 / allegro5-doc / al_set_mouse_xy.3alleg5.en
al_set_mouse_xy(3alleg5) al_set_mouse_xy(3alleg5)

al_set_mouse_xy - Allegro 5 API

#include <allegro5/allegro.h>
bool al_set_mouse_xy(ALLEGRO_DISPLAY *display, int x, int y)
    

Try to position the mouse at the given coordinates on the given display. The mouse movement resulting from a successful move will generate an ALLEGRO_EVENT_MOUSE_WARPED(3alleg5) event.

Returns true on success, false on failure.

al_set_mouse_z(3alleg5), al_set_mouse_w(3alleg5)

Allegro reference manual