Allegro Version 4.9.2 (SVN) |
Mouse routinesSummary
al_is_mouse_installed
Returns true if al_install_mouse was called successfully. al_set_mouse_cursor
Set the given mouse cursor to be the current mouse cursor. The graphics driver that was in effect when the cursor was created must still be in effect. If the cursor is currently ‘shown’ (as opposed to ‘hidden’) the change is immediately visible. Returns true on success, false on failure. al_set_system_mouse_cursor
Set the given system mouse cursor to be the current mouse cursor. The graphics driver that was in effect when the cursor was created must still be in effect. If the cursor is currently ‘shown’ (as opposed to ‘hidden’) the change is immediately visible. Returns true on success, false on failure. |
Returns true if al_install_mouse was called successfully.
bool al_is_mouse_installed( void )
Install a mouse driver.
bool al_install_mouse( void )
Uninstalls the active mouse driver, if any.
void al_uninstall_mouse( void )
Return a pointer to an object representing the mouse, that can be used as an event source.
ALLEGRO_MOUSE *al_get_mouse( void )
Return the number of buttons on the mouse.
unsigned int al_get_mouse_num_buttons( void )
Return the number of buttons on the mouse.
unsigned int al_get_mouse_num_axes( void )
Try to position the mouse at the given coordinates.
bool al_set_mouse_xy( int x, int y )
Set the mouse wheel position to the given value.
bool al_set_mouse_z( int z )
Set the mouse wheel position to the given value.
bool al_set_mouse_w( int w )
Set the given mouse axis to the given value.
bool al_set_mouse_axis( int which, int value )
Sets the area of the screen within which the mouse can move.
bool al_set_mouse_range( int x1, int y1, int x2, int y2 )
Save the state of the mouse specified at the time the function is called into the structure pointed to by RET_STATE.
void al_get_mouse_state( ALLEGRO_MSESTATE * ret_state )
Return true if the mouse button specified was held down in the state specified.
bool al_mouse_button_down( ALLEGRO_MSESTATE * state, int button )
Create a mouse cursor from the bitmap provided.
ALLEGRO_MOUSE_CURSOR *al_create_mouse_cursor( ALLEGRO_BITMAP * bmp, int x_focus, int y_focus )
Free the memory used by the given cursor.
void al_destroy_mouse_cursor( ALLEGRO_MOUSE_CURSOR * cursor )
Set the given mouse cursor to be the current mouse cursor.
bool al_set_mouse_cursor( ALLEGRO_MOUSE_CURSOR * cursor )
Set the given system mouse cursor to be the current mouse cursor.
bool al_set_system_mouse_cursor( ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id )
Make a mouse cursor visible in the current display of the calling thread.
bool al_show_mouse_cursor( void )
Hide the mouse cursor in the current display of the calling thread.
bool al_hide_mouse_cursor( void )