Re: [AD] Windows Addition for Message Parsing

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2008-10-08, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> 
> Well, apparently there's already one person who wants it. ;)
> As a minimal change, could we have the following:
>   * al_install_mouse() initialises the mouse subsystem and does an  
> enumeration of the number of mice on the system (defaulting to 1 in  
> case we don't implement that on some platforms for now).
>   * We need al_get_number_of_mice() or something to that effect to  
> return this information.

Keep in mind that an older design actually provided for multiple mice,
but it was removed because for the vast majority of users it was a
useless distraction.

Back then we didn't have (or think of) thread-local state though.
I think it's definitely the way to keep the common case simple.

>   * al_get_mouse() acquires a parameter to indicate events from which  
> mouse it should be sending. Alternatively (making the common case  
> easier), al_get_mouse() returns the first mouse and there is  
> al_get_multiple_mice(int mouse_number) that registers a particular  
> mouse for the event system. The mouse events then need an extra field  
> to indicate what mouse generated the event.

The event source field would contain the information, although not as
easy to interpret as an integer.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/