diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:28:33 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:28:33 +0100 |
commit | 2bf52a07329e08fcbba938cc614321fa64fe6f78 (patch) | |
tree | 3f381c5d6909069cdd25b37e27c7c90f391f8f61 | |
parent | 287bf3a1cb5aeb1356a154aac3b4f86e26eaf1f8 (diff) | |
download | ffi-efl-2bf52a07329e08fcbba938cc614321fa64fe6f78.zip ffi-efl-2bf52a07329e08fcbba938cc614321fa64fe6f78.tar.gz |
generate efreet_mime native binding
-rw-r--r-- | lib/efl/native/efreet_mime.rb | 52 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 1 |
3 files changed, 54 insertions, 0 deletions
diff --git a/lib/efl/native/efreet_mime.rb b/lib/efl/native/efreet_mime.rb new file mode 100644 index 0000000..f312ac8 --- /dev/null +++ b/lib/efl/native/efreet_mime.rb @@ -0,0 +1,52 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +# +module Efl + # + module EfreetMime + # + FCT_PREFIX = 'efreet_mime_' 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_mime' + # + # FUNCTIONS + fcts = [ + # EAPI int efreet_mime_init(void); + [ :efreet_mime_init, [ ], :int ], + # EAPI int efreet_mime_shutdown(void); + [ :efreet_mime_shutdown, [ ], :int ], + # EAPI const char *efreet_mime_type_get(const char *file); + [ :efreet_mime_type_get, [ :string ], :string ], + # EAPI const char *efreet_mime_magic_type_get(const char *file); + [ :efreet_mime_magic_type_get, [ :string ], :string ], + # EAPI const char *efreet_mime_globs_type_get(const char *file); + [ :efreet_mime_globs_type_get, [ :string ], :string ], + # EAPI const char *efreet_mime_special_type_get(const char *file); + [ :efreet_mime_special_type_get, [ :string ], :string ], + # EAPI const char *efreet_mime_fallback_type_get(const char *file); + [ :efreet_mime_fallback_type_get, [ :string ], :string ], + # EAPI const char *efreet_mime_type_icon_get(const char *mime, const char *theme, unsigned int size); + [ :efreet_mime_type_icon_get, [ :string, :string, :uint ], :string ], + # EAPI void efreet_mime_type_cache_clear(void); + [ :efreet_mime_type_cache_clear, [ ], :void ], + # EAPI void efreet_mime_type_cache_flush(void); + [ :efreet_mime_type_cache_flush, [ ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index dc671a9..9e92b0d 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -52,6 +52,7 @@ for header in \ "${INCLUDE}/efreet-1/efreet_desktop.h" \ "${INCLUDE}/efreet-1/efreet_menu.h" \ "${INCLUDE}/efreet-1/efreet_uri.h" \ + "${INCLUDE}/efreet-1/Efreet_Mime.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 ad9f865..717ccd7 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -299,6 +299,7 @@ libs << efl_h('efreet','efreet_icon.h','Efreet','efreet_icon',nil,["#{NATIVE}/ei 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('efreet_mime','Efreet_Mime.h','EfreetMime') 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"]) |