[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gemlib: change some AES constant names



Perhaps someone could explain the logic behind this API.  I have three issues with it:

1 - if you can tell the AES if you want slider, arrow, or wheel events, then the application programmer has enough logic to know that the wheel event exists, and could easily handle a wheel event as arrow or slider events themselves.

2 - The mouse wheel itself shouldn't require that the application have specific support for it, so I'm assuming that slider events are a default?  or is the default something else?

3 - The AES already supports more than 3 buttons, and a mouse wheel isn't an analog device.  Its actually clicking button 4 or 5 when you turn the wheel.  In my opinion, the API already supports these buttons!  Likewise, the horizontal wheel is buttons 6 and 7 usually.

Wouldn't it be easier to have the AES send slider messages (and maybe send arrows if there are no sliders on the window) if the application doesn't have mouse buttons 4 and 5 in the button mask, and just send the button events if they are?   This wouldn't require any changes in the user API.  If the application wants to do something special with mouse wheels - and then they just wait on the button events, again with no special API changes to learn or detect if the AES supports.

What was the reasoning behind the API extension?

To answer the question, WHL_REALWHEEL does seem redundant.  I'm fine with the label change.

-- Evan

On Mon, 2005-03-21 at 21:15 +0100, Arnaud BERCEGEAY wrote:
Hello,

I'd like to change the name of some constants before making them official  
(i mean, before a release of gemlib provides these constants).

For wind_set(WF_WHEEL) modes, at the moment we have:
#define WHL_REALWHEEL   0   /**< AES will send #WM_WHEEL messages */
#define WHL_ARROWWHEEL  1   /**< AES will send #WM_ARROWED messages */
#define WHL_SLDRWHEEL   2   /**< AES will convert mouse wheel events to  
slider events */

I think we don't have to put 'WHEEL' at the end of the name... so i  
propose to change them to the following:
#define WHEEL_MESAG     0   /**< AES will send #WM_WHEEL messages */
#define WHEEL_ARROWED   1   /**< AES will send #WM_ARROWED messages */
#define WHEEL_SLIDER    2   /**< AES will convert mouse wheel events to  
slider events */

(or with WHL_ in place of WHEEL_ as prefix if you prefer)

Any objection ?


best regards,
Arnaud.