Granted that the signals could be sent seperately, but (and please,
correct me if I’m wrong here) wouldn’t you still have to wait
within the application to find out if a double click followed the
single click in order to behave correctly?
If you have to, it’s usually because of a user interface design mistake.
(Or rather another design mistake, besides using double clicks in the
first place, IMHO.)
See Bob Pendleton’s description of how the Windows recycle bin behaves.
I simply don’t see how the addition of a double click signal of any
kind would be sufficiently useful considering the end application needs
to be aware of the double click delay anyway in order to wait long
enough after a single click to know whether to ignore it or not.
Simple: Expect one of two things; a single click, or a single click
followed by a double click - never a double click alone. In fact, I don’t
know of any toolkits or environments that will hide the first single
click of a “double click sequence” from you, so you have to do it this
way, or your applications won’t work.
The only think I could see being useful is if the library was able to
report what the system default double click interval is, and that’s not
SDL’s job.
That’s still a good point, though.
Even if it were useful, adding double click events would open the can
of worms of how many new events to add. After all, I’ve seen triple
clicks in applications before.
Older X apps (and some others - usually ported X apps) frequently detect
quadruple clicks as well. (Single: place cursor; double: select word;
triple: select line; quadruple: select all.)
Far fetched perhaps.
Not really.
But it seems to
me that if you include a special case like this, you’re taking on the
responsibility of all special cases in the same realm.
Exactly. That’s why I think it would be much better to include something
useful, like event timestamps, if anything at all.
After saying all that, I can see how a timestamp would be useful in
some cases. BUT the vast majority of times I don’t think it would
be, and it would just waste memory needlessly, especially since a
timestamp measurement can be taken just as easily by the application.
The problem is that if you’re doing heavy rendering, and your frame rate
drops too much, it’s not that easy to do any useful timestamping inside
the application. You need the timestamps generated by the driver/system,
or at least a separate thread.
Sure, you can use an extra thread, but I don’t think it’s very nice
dragging that in - with synchronization and portability issues, just to
get timestamps.
Note that many event/input APIs provide timestamps generated either by
the driver or the OS, so having SDL “doing” the timestamping would
completely eliminate the need for an extra thread in many cases.
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
-------------------------------------> http://olofson.net -'On Wednesday 16 January 2002 20:48, Jimmy wrote: