On Thu, Dec 21, 2017 at 01:20:48PM -0500, Cedric Bail wrote:
> > -------- Original Message --------
> > Subject: Re: [E-devel] Focus,Changed
> > Local Time: December 21, 2017 10:11 AM
> > UTC Time: December 21, 2017 6:11 PM
> > From: marcel-hollerb...@t-online.de
> > To: Enlightenment developer list <enlightenment-devel@lists.sourceforge.net>
> >
> > Hi,
> >
> > On Thu, Dec 21, 2017 at 12:19:41PM +0000, Andrew Williams wrote:
> >
> >> Hi,
> >> Stumbling upon the efl_ui_focus_object.eo defintion:
> >>
> >> focus,changed : bool; [[Emitted if the focus state has changed]]
> >
> > The now active property.
> >
> >> I am unsure what the purpose of the bool is. My guess is that it's what the
> >> focussed value used to be or has become.
> >> Following the docs it implies a relation to whether or not focus has
> >> changed.
> >> None of our code seems to use this - they all call
> >> efl_ui_focus_object_focus_get within the callback.
> >>
> >> the old code always used elm_widget_focus_get and that was replaced with
> >> efl_ui_object_focus_get, instead of sometimes using the flag ...
> >>
> >> For that matter is it common to pass a primitive value in the place of void
> >> *? All the other callbacks I have used pass structs which are far easier to
> >> understand.
> >>
> >> Well, common or not is nothing that counts here IMO.
> >>
> >> if (event->info) { ... } else { ... }
> >>
> >> Is handy and does not need any casting or something, a struct would
> >> require at least a cast to that struct, which is not that nice.
> 
> This is a bad pattern as it make it impossible to extend the information 
> being send in the future. We have so far tried to always send structure or 
> object as it allow for later extention why direct value will be a futur 
> ABI/API problem. I would prefer an alternate solution to this.

Well, what i want here is just to emit the property change to the user.
Which mean, if the event needs to change the property would also needs
to be changed, so we have a api/abi probeblem anyway.

Also, just a side question, isnt it also a ABI problem to change a
struct ? If we make it bigger, a old compiled file still may have a too
small mem segment where the struct is on the heap or stack ... so we
would end up only having objects as event_info.

bu5hm4n

> 
> Cedric
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to