Second time that I respond to the author, not the mailinglist ... shame on me.

efl api directly exported to ruby ? yes, it's direct access to C external 
functions through ruby module functions

thanks to efl headers quality and consistency, efl function prototypes, 
structs, ...
are automaticaly extracted using a sed scripts collections ( pretty easy 
maintenance )

about the callbacks : ruby blocks or methods can be used as callbacks
    - ecore_event specs  : 
https://github.com/jeremyz/ffi-efl/blob/master/spec/ecore_spec.rb
    - smart_callback_add : 
https://github.com/jeremyz/ffi-efl/blob/master/test/test_elm_win_class.rb

about structs : everything seems to be possible as soon as you map the struct
    - ecore_getopt structs mapping : 
https://github.com/jeremyz/ffi-efl/blob/master/lib/efl/ecore_getopt.rb
    - ecore_getopt specs           : 
https://github.com/jeremyz/ffi-efl/blob/master/spec/ecore_getopt_spec.rb

as I discover ruby-ffi while coding, I can't say more about feeding a
struct with function pointers, but it doesn't look far from callback 
registration which works.

regards

On Monday 25 April 2011  14:35, Carsten Haitzler wrote :
> On Wed, 20 Apr 2011 16:21:52 +0200 Jérémy Zurcher <jer...@asynk.ch> said:
> 
> hmm interesting. that looks pretty much like the efl api directly exported to
> ruby. callbacks work? what abotu some weird funcs that require u pass in a
> struct and fill it with content like func ptrs etc?
> 
> > Sorry I answered to Thomas but not to this list;
> > 
> > about FFI : https://github.com/ffi/ffi
> > 
> > DESRIPTION
> > Ruby-FFI is a ruby extension for programmatically loading dynamic
> > libraries, binding functions within them, and calling those functions
> > from Ruby code.
> > 
> > ffi-e17 has just been rename ffi-efl, so the links are
> > 
> > http://cgit.asynk.ch/cgi-bin/cgit/ffi-efl/
> > https://github.com/jeremyz/ffi-efl
> > https://gitorious.org/ffi-efl
> > rubyforge is not up yet
> > 
> > ------------------------------------------------------------------------------
> > Benefiting from Server Virtualization: Beyond Initial Workload 
> > Consolidation -- Increasing the use of server virtualization is a top
> > priority.Virtualization can reduce costs, simplify management, and improve 
> > application availability and disaster protection. Learn more about boosting 
> > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > 
> 
> 
> -- 
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> 

-- 
Jérémy Zurcher
av General Guisan 49
1400 Yverdon-les-bains
+41 (0) 79 599 84 27

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to