install_mouse man page

install_mouse — Installs the Allegro mouse handler.

Synopsis

#include <allegro.h>

int install_mouse();

Description

Installs the Allegro mouse handler. You must do this before using any other mouse functions.

Return Value

Returns -1 on failure, zero if the mouse handler is already installed (in which case this function does nothing) and the number of buttons on the mouse if the mouse handler has successfully been installed (ie. this is the first time a handler is installed or you have removed the previous one).

Note that the number of mouse buttons returned by this function is more an indication than a physical reality. With most devices there is no way of telling how many buttons there are, and any user can override the number of mouse buttons returned by this function with a custom configuration file and the variable num_buttons. Even if this value is overridden by the user, the global mouse variables will still report whatever the hardware is sending.

See Also

remove_mouse(3), poll_mouse(3), mouse_x(3), show_mouse(3), get_mouse_mickeys(3), position_mouse(3), set_mouse_range(3), set_mouse_speed(3)

Referenced By

disable_hardware_cursor(3), enable_hardware_cursor(3), ex3buf(3), ex3d(3), exalpha(3), excustom(3), exgui(3), exlights(3), exmouse(3), expal(3), exrgbhsv(3), exscn3d(3), exshade(3), exspline(3), exswitch(3), exsyscur(3), extrans(3), exupdate(3), exzbuf(3), get_mouse_mickeys(3), mouse_callback(3), mouse_needs_poll(3), mouse_x(3), poll_mouse(3), position_mouse(3), position_mouse_w(3), position_mouse_z(3), remove_mouse(3), select_mouse_cursor(3), set_mouse_cursor_bitmap(3), set_mouse_range(3), set_mouse_speed(3), set_mouse_sprite(3), show_mouse(3).

version 4.4.2 Allegro Allegro manual