Index:
[thread]
[date]
[subject]
[author]
From: Christoph Egger <Christoph_Egger@t-online.de>
To : ggi-develop@eskimo.com
Date: Sat, 17 Jul 1999 18:42:26 +0200 (MEST)
Re: Mouse pointer extension: request for API :)
Hi all!
Here are my suggestions for an API:
Please give comments!!
/* show_mouse:
* Tells GGI to display a mouse pointer on the visual. The mouse
* pointer will be drawn onto the specified visual. To hide the mouse
* pointer, call show_mouse(NULL).
*/
void show_mouse(ggi_visual_t vis);
/* position_mouse:
* Moves the mouse to the specified screen position. It is safe to call
* even when a mouse pointer is being displayed.
*/
void position_mouse(int x, int y);
/* set_mouse_range:
* Sets the area of the screen within which the mouse can move. Pass the
* top left corner and the bottom right corner (inclusive). If you don't
* call this function the range defaults to the whole screen.
*/
void set_mouse_range(int x1, int y1, int x2, int y2);
/* set_mouse_speed:
* Sets the mouse speed. Larger values of xspeed and yspeed represent
* slower mouse movement: the default for both is 2.
*/
void set_mouse_speed(int xspeed, int yspeed);
/* set_mouse_sprite:
* You don't like GGI's default mouse pointer? No problem. Use this
* function to supply an alternative of your own. If you change the
* pointer and then want to get GGI's default lovely arrow back
* again, call set_mouse_sprite(NULL).
*/
void set_mouse_sprite(ggi_visual_t sprite);
/* set_mouse_sprite_focus:
* The mouse focus is the bit of the pointer that represents the actual
* mouse position, ie. the (mouse_x, mouse_y) position. By default this is
* the top left corner of the arrow, but if you are using a different
* mouse pointer you might need to alter it.
*/
void set_mouse_sprite_focus(int x, int y);
/* get_mouse_mickeys:
* Measures how far the mouse has moved since the last call to this
* function. The mouse will continue to generate movement mickeys even
* when it reaches the edge of the screen, so this form of input can
* be useful for games that require an infinite range of mouse
* movement.
*/
void get_mouse_mickeys(int *mickeyx, int *mickeyy);
Cheers,
Christoph Egger
E-Mail: Christoph_Egger@t-online.de
Index:
[thread]
[date]
[subject]
[author]