On Tue, Dec 1, 2009 at 11:03 AM, Carsten Haitzler <[email protected]> wrote:
> On Tue, 1 Dec 2009 09:41:44 -0200 Gustavo Sverzut Barbieri
> <[email protected]> said:
>
>> On Tue, Dec 1, 2009 at 9:03 AM, Enlightenment SVN
>> <[email protected]> wrote:
>> > Log:
>> >  use all dem cursor api's... and module it up bro
>>
>> your choose to have all hooks provided as visible symbols such as
>> "obj_hook" and "obj_longpress" are solely base on be able to choose
>> which symbols to provide and not rely on structs that changes size?
>
> did this to 1. make modules simple, 2. allow any kind of api for the modules 
> to
> hook in anywhere to any system with api's of any format. thus a single
> unviersal shared struct isnt useful. i'd need a struct per module type/hook -
> and that would mean exposing more module headers outside of elm to share that,
> and i chose not to :)
>
>> I'm asking because I'm more more keen on evas-like modules where you
>> handle it with 2 public symbols (init/shutdown) and everything else is
>> called using that struct.
>
> did this allowing for out-of-tree modules - see above :) symbols is the only
> way to do this without creatiing per-module type headers for modules to use.
>
>> Not that we should be creating hundred thousand entries in a row
>> (maybe with genlist-like things?), but it will hurt object creation by
>> having to lookup module, even more if we have poorly done module with
>> hundreds of visible symbol, dlsym() has no cache AFAIK.
>
> look at the code - it looks up symbols once. ever. never again after that. :)
> so once to link-in the module. then forever uses the structs containing the 
> api
> call funcs.
>
>> So my proposal is something like:
>>
>>  - each type that wants to be extended provides it's own public struct
>> (maybe in Elementary_Hooks.h or Elementary_Modules.h to keep it away
>> from regular users)
>>  - each type extension struct has a magic/type number to keep it
>> "safe" and easier to debug later
>>  - each type extension struct has a version number to keep it safe
>> against ABI changes
>>
>> This way we can dlopen() all .so just once on start and register all
>> apis that are filtered (or not filtered), runtime object creation can
>> be just a hash check that would return what is in wd->api today.
>
> see above :)

static + goto screwed my mind and I overlooked it.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to