diff options
-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"]) |