From: Carsten H. (T. R. <ra...@ra...> - 2006-02-18 04:15:13
|
On Wed, 15 Feb 2006 16:37:47 +0100 Simon TRENY <sim...@fr...> babbled: > Ok, thanks for the quick answer :) > > Is there a way to know the double quick delay time with ecore_x so we > can implement this whole thing "manually" in evas or in etk by > comparing the event timestamps? it's probably better to have evas to keep a mouse down event counter. always incriment it at the END of processing a mouse down. each object just makes a copy of the counter inside its own struct whenever a mouse down happens. IF the current counter - object counter > 1 AND adouble or triple click flags is set, then disable the flag as the mouse clicked on another object in the meantime :) > Simon > > On Wed, 15 Feb 2006 09:59:55 +0900 > Carsten Haitzler (The Rasterman) <ra...@ra...> wrote: > > > On Tue, 14 Feb 2006 20:09:06 +0100 Simon TRENY <sim...@fr...> > > babbled: > > > > > Hey there! > > > > > > I'd like to know when one of my Evas_Object is double or triple > > > clicked. So I use event->flags with EVAS_BUTTON_DOUBLE_CLICK or > > > EVAS_BUTTON_TRIPLE_CLICK. It works almost fine but I noticed 2 > > > bugs/features with it: > > > > > > - First, event->flags does not reflect the number of clicks on the > > > Evas_Object but on the canvas. It means that if you click on an > > > object and then quickly move the mouse over another object, and > > > click again, event->flags will be set to EVAS_BUTTON_DOUBLE_CLICK > > > while you only single clicked on the second object. A consequence > > > of this is, in efm for example, if you want to select several > > > folders with the ctrl key, if you are too fast, the last clicked > > > folder can be opened instead of being selected. You can still check > > > if the folder was already selected and open it only if it was, but > > > in the case you want to deselect the folder with the ctrl key, > > > you'll have the same problem. > > > > > > - Another bug/feature is that event->flags is set only with the > > > MOUSE_DOWN event. With the MOUSE_UP event, it's always set to 0. It > > > make things a little bit incoherent to code: to detect if an object > > > is "single-clicked", you have to add a callback on the MOUSE_UP > > > event, and to check if it is "double or triple clicked", you have > > > to add a callback on the MOUSE_DOWN event. But I can see a reason > > > why event->flags is not set for the MOUSE_UP event: it doesn't > > > always make sense: how do you estimate the time of the double > > > click? Between the first mouse down and the second mouse release? > > > Or between the first and the second mouse releases? ... > > > > ok - the REASON for this is these flags come directly from ecore_x - > > as it determines a double or triple click and simply sets flags - > > thus it knows nothing about evas objects. up events dont have this > > flag as the "click" is the mouse down event as such - well in > > ecore_x's view of the world, so a double click happens when a 2nd > > mouse down happens within a short enough time from a previous mouse > > down on the same window. triple is the same but withint another > > period from the first mouse down too. so that's why - evas doesnt > > process this > > - it simply shrugs and passes it on to the objects. now yes - you are > > right. evas shoudl be looking at the double and triple flags and if > > the objects receiving them have changed between the last 1/2 events > > - unset those flags. > > > > > So what do you guys think? > > > > > > Regards, > > > Simon TRENY <MoOm> > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through > > > log files for problems? Stop! Download the new AJAX search engine > > > that makes searching your log files as easy as surfing the web. > > > DOWNLOAD SPLUNK! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > _______________________________________________ enlightenment-devel > > > mailing list enl...@li... > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 Tokyo, Japan (東京 日本) |