summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-12-21 15:25:12 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-12-21 15:25:12 +0100
commit287bf3a1cb5aeb1356a154aac3b4f86e26eaf1f8 (patch)
tree215ec16e86d0c603d1ed2773c7d456f135396705
parent3e9bfe31e4194fd5d956fcbbab41d29f3fa43382 (diff)
downloadffi-efl-287bf3a1cb5aeb1356a154aac3b4f86e26eaf1f8.zip
ffi-efl-287bf3a1cb5aeb1356a154aac3b4f86e26eaf1f8.tar.gz
generate efreet_uri native binding
-rw-r--r--lib/efl/native/efreet_uri.rb42
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb1
3 files changed, 44 insertions, 0 deletions
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"])