> -------- 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.

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

Reply via email to