From 0bfdb220d9c00401ed5e7799f4a36dc18ccdccba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 21 Dec 2012 15:06:24 +0100 Subject: take care of Efreet.h --- lib/efl/native/efreet.rb | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 1 + 3 files changed, 48 insertions(+) create mode 100644 lib/efl/native/efreet.rb diff --git a/lib/efl/native/efreet.rb b/lib/efl/native/efreet.rb new file mode 100644 index 0000000..0484c35 --- /dev/null +++ b/lib/efl/native/efreet.rb @@ -0,0 +1,46 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +# +module Efl + # + module Efreet + # + FCT_PREFIX = 'efreet_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'efreet' + # + # TYPEDEFS + # typedef struct _Efreet_Version Efreet_Version; + typedef :pointer, :efreet_version + # + # VARIABLES + # EAPI extern Efreet_Version *efreet_version; + attach_variable :efreet_version, :efreet_version + # + # FUNCTIONS + fcts = [ + # EAPI int efreet_init(void); + [ :efreet_init, [ ], :int ], + # EAPI int efreet_shutdown(void); + [ :efreet_shutdown, [ ], :int ], + # EAPI void efreet_lang_reset(void); + [ :efreet_lang_reset, [ ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index afa9017..b222a64 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -46,6 +46,7 @@ for header in \ "${INCLUDE}/eio-1/Eio.h" \ "${INCLUDE}/embryo-1/Embryo.h" \ "${INCLUDE}/edje-1/Edje.h" \ + "${INCLUDE}/efreet-1/Efreet.h" \ "${INCLUDE}/ethumb-1/Ethumb.h" \ "${INCLUDE}/ethumb-1/Ethumb_Client.h" \ "${INCLUDE}/ethumb-1/Ethumb_Plugin.h" \ diff --git a/tools/genruby.rb b/tools/genruby.rb index f978fac..3fcafa6 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -293,6 +293,7 @@ libs << efl_h('ecore_evas','Ecore_Evas.h','EcoreEvas',nil,nil,["#{NATIVE}/ecore_ libs << efl_h('eio','Eio.h','Eio',nil,nil,["#{NATIVE}/eina_file","#{NATIVE}/eet"]) libs << efl_h('embryo','Embryo.h','Embryo') libs << efl_h('edje','Edje.h','Edje',nil,nil,["#{NATIVE}/evas"]) +libs << efl_h('efreet','Efreet.h','Efreet') libs << efl_h('ethumb','Ethumb.h','Ethumb') libs << efl_h('ethumb_client','Ethumb_Client.h','EthumbClient',nil,nil,["#{NATIVE}/ethumb"]) libs << efl_h('ethumb','Ethumb_Plugin.h','EthumbPlugin',nil,nil,["#{NATIVE}/evas","#{NATIVE}/ecore_evas","#{NATIVE}/ethumb"]) -- cgit v1.1-2-g2b99