|
|
MouseALLEGRO_MOUSE_STATEPublic fields (read only):
buttons - mouse buttons al_create_mouse_cursorCreate a mouse cursor from the bitmap provided. There must be a current display in effect. Return value: Returns a pointer to the cursor on success, or NULL on failure. al_destroy_mouse_cursorFree the memory used by the given cursor. The display that was in effect when the cursor was created must still be in effect. XXX that's terrible and should be changed Has no effect if al_get_cursor_positionOn platforms where this information is available, this function returns the global location of the mouse cursor, relative to the desktop. You should not normally use this function, as the information is not useful except for special scenarios as moving a window. Return value: Returns true on success, false on failure. al_get_mouseReturn a pointer to an object representing the mouse, that can be used as an event source. al_get_mouse_num_axesReturn the number of buttons on the mouse. al_get_mouse_num_buttonsReturn the number of buttons on the mouse. al_get_mouse_stateSave the state of the mouse specified at the time the function is called into the given structure. al_get_mouse_state_axisExtract the mouse axis value from the saved state. al_hide_mouse_cursorHide the mouse cursor in the current display of the calling thread. This has no effect on what the current mouse cursor looks like; it just makes it disappear. Return value: Returns true on success (or if the cursor already was hidden), false otherwise. al_install_mouseInstall a mouse driver. Return value: Returns true if successful. If a driver was already installed, nothing happens and true is returned. al_is_mouse_installedReturns true if al_install_mouse was called successfully. al_mouse_button_downReturn true if the mouse button specified was held down in the state specified. al_set_mouse_axisSet the given mouse axis to the given value. For now: the axis number must not be 0 or 1, which are the X and Y axes. Return value: Returns true on success, false on failure. al_set_mouse_cursorSet the given mouse cursor to be the current mouse cursor for the current display. The display that was in effect when the cursor was created must still be in effect. XXX that's terrible and should be changed If the cursor is currently 'shown' (as opposed to 'hidden') the change is immediately visible. Return value: Returns true on success, false on failure. al_set_mouse_rangeSets the area of the screen within which the mouse can move. The coordinates are inclusive. (XXX: change this?) XXX: This should be relative to an ALLEGRO_DISPLAY. Return value: Returns true on success, false on failure. al_set_mouse_wSet the mouse wheel position to the given value. Return value: Returns true on success, false on failure. al_set_mouse_xyTry to position the mouse at the given coordinates. The mouse movement resulting from a successful move will generate an ALLEGRO_EVENT_MOUSE_WARPED event. Return value: Returns true on success, false on failure. XXX: This should be relative to an ALLEGRO_DISPLAY. al_set_mouse_zSet the mouse wheel position to the given value. Return value: Returns true on success, false on failure. al_set_system_mouse_cursorSet the given system mouse cursor to be the current mouse cursor for the current display. If the cursor is currently 'shown' (as opposed to 'hidden') the change is immediately visible. Return value: Returns true on success, false on failure. al_show_mouse_cursorMake a mouse cursor visible in the current display of the calling thread. Return value: Returns true if a mouse cursor is shown as a result of the call (or one already was visible), false otherwise. al_uninstall_mouseUninstalls the active mouse driver, if any. This will automatically unregister the mouse event source with any event queues. This function is automatically called when Allegro is shut down. |
Last updated: 2009-06-07 09:43:05 UTC