On Wed, 20 Jan 2010 08:24:13 -0300 Iván Briano (Sachiel) <sachi...@gmail.com>
said:

> On Wed, Jan 20, 2010 at 7:55 AM, Gustavo Sverzut Barbieri
> <barbi...@profusion.mobi> wrote:
> > On Wed, Jan 20, 2010 at 7:41 AM, Brian Wang <brian.wang.0...@gmail.com>
> > wrote:
> >> On Wed, Jan 20, 2010 at 2:46 PM, Carsten Haitzler <ras...@rasterman.com>
> >> wrote:
> >>> On Wed, 20 Jan 2010 13:55:36 +0800 Brian Wang <brian.wang.0...@gmail.com>
> >>> said:
> >>>
> >>>> Hello all,
> >>>>
> >>>> The attached enables the programmer to handle 'pressed' signal (mouse
> >>>> down) on elm_button.
> >>>> This allows adding a self-repeating timer to repeat a certain action,
> >>>> such as pressing and holding on a button to increase a number.
> >>>>
> >>>> Cheers,
> >>>
> >>> hmmm good point.. though wouldn't it be nicer if button had an auto-repeat
> >>> feature of its own? (that calls click repeatedly at N second intervals
> >>> after being held down for M seconds until released)
> >>
> >> You mean:
> >> void elm_button_auto_repeat_rate_set(Evas_Object *obj, double delay /*
> >> M */, double rate /* N */, Evas_Smart_Cb func, void *data);
> >
> > i guess he said just the first part with delay and rate, no func or
> > data as user would have those from standard
> > evas_object_smart_callback_add() for "clicked". So just:
> >
> >     elm_button_auto_repeat_rate_set(Evas_Object *, double delay, double
> > rate); rate <= 0.0 would disable it.
> >
> > in any way, I guess both are fine, even adding the double clicked to
> > button. But as raster, I often dislike to add too much without
> > understanding the real requirements so we can come with helpers like
> > this auto-repeat. :-)
> >
> 
> And just to say something about the patch, you also need to patch the
> theme to emit the "elm,action,pressed" signal. Then you are missing the
> "unpress" to kill the timer, or properly document that the "clicked" callback
> should handle that case, which makes it no so nice.

well the patch wasnt attached - i think it was stripped by sf.net' mail
servers.. so need the patch as an actual text attachment - or maybe try gzip it
and mail again

anyway - yes. need an unpress too (as opposed to just clicked - clicked is not
emitted if u click, drag then release).

having something like

elm_button_autorepeat_set(Evas_Object *obj, Eina_bool on);

and then
elm_button_autorepeat_initital_timeout_set(Evas_Object *obj, double t);
elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);

and "repeated" callbacks called for all repeat events (as opposed to clicked -
this is so u can detect the difference between an auto-repeat callback and a
normal clicked one).

app registers for both clicked and repeated callbacks..

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to