From 287bf3a1cb5aeb1356a154aac3b4f86e26eaf1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 21 Dec 2012 15:25:12 +0100 Subject: generate efreet_uri native binding --- lib/efl/native/efreet_uri.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 1 + 3 files changed, 44 insertions(+) create mode 100644 lib/efl/native/efreet_uri.rb diff --git a/lib/efl/native/efreet_uri.rb b/lib/efl/native/efreet_uri.rb new file mode 100644 index 0000000..bc8191f --- /dev/null +++ b/lib/efl/native/efreet_uri.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +# +module Efl + # + module Efreet + # + FCT_PREFIX = 'efreet_uri_' 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_Uri Efreet_Uri; + typedef :pointer, :efreet_uri + # + # FUNCTIONS + fcts = [ + # EAPI const char *efreet_uri_encode(Efreet_Uri *uri); + [ :efreet_uri_encode, [ :efreet_uri ], :string ], + # EAPI Efreet_Uri *efreet_uri_decode(const char *val); + [ :efreet_uri_decode, [ :string ], :efreet_uri ], + # EAPI void efreet_uri_free(Efreet_Uri *uri); + [ :efreet_uri_free, [ :efreet_uri ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 7f667da..dc671a9 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -51,6 +51,7 @@ for header in \ "${INCLUDE}/efreet-1/efreet_icon.h" \ "${INCLUDE}/efreet-1/efreet_desktop.h" \ "${INCLUDE}/efreet-1/efreet_menu.h" \ + "${INCLUDE}/efreet-1/efreet_uri.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 cded3a2..ad9f865 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -298,6 +298,7 @@ libs << efl_h('efreet','efreet_base.h','Efreet',nil,nil,["#{NATIVE}/eina_list"]) libs << efl_h('efreet','efreet_icon.h','Efreet','efreet_icon',nil,["#{NATIVE}/eina_list"]) libs << efl_h('efreet','efreet_desktop.h','Efreet','efreet_desktop',nil,["#{NATIVE}/eina_list"]) libs << efl_h('efreet','efreet_menu.h','Efreet','efreet_menu',nil,["#{NATIVE}/efreet_desktop"]) +libs << efl_h('efreet','efreet_uri.h','Efreet','efreet_uri') 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