diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:47:31 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:47:31 +0100 |
commit | b67eaecaa869eca00fe8416f756ae7467b09709b (patch) | |
tree | aa1ccb7d8fa81018370a2feb94c0eaec4defe0fe | |
parent | 7571a2e2097e0ad0d4411144786329db507a2325 (diff) | |
download | ffi-efl-b67eaecaa869eca00fe8416f756ae7467b09709b.zip ffi-efl-b67eaecaa869eca00fe8416f756ae7467b09709b.tar.gz |
generate efreet_utils native binding
-rw-r--r-- | lib/efl/native/efreet_utils.rb | 61 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 1 |
3 files changed, 63 insertions, 0 deletions
diff --git a/lib/efl/native/efreet_utils.rb b/lib/efl/native/efreet_utils.rb new file mode 100644 index 0000000..b9b3f23 --- /dev/null +++ b/lib/efl/native/efreet_utils.rb @@ -0,0 +1,61 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/efreet_desktop' +# +module Efl + # + module EfreetUtils + # + FCT_PREFIX = 'efreet_utils_' 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' + # + # FUNCTIONS + fcts = [ + # EAPI const char *efreet_util_path_to_file_id(const char *path); + [ :efreet_util_path_to_file_id, [ :string ], :string ], + # EAPI Eina_List *efreet_util_desktop_mime_list(const char *mime); + [ :efreet_util_desktop_mime_list, [ :string ], :eina_list ], + # EAPI Efreet_Desktop *efreet_util_desktop_wm_class_find(const char *wmname, const char *wmclass); + [ :efreet_util_desktop_wm_class_find, [ :string, :string ], :efreet_desktop ], + # EAPI Efreet_Desktop *efreet_util_desktop_file_id_find(const char *file_id); + [ :efreet_util_desktop_file_id_find, [ :string ], :efreet_desktop ], + # EAPI Efreet_Desktop *efreet_util_desktop_exec_find(const char *exec); + [ :efreet_util_desktop_exec_find, [ :string ], :efreet_desktop ], + # EAPI Efreet_Desktop *efreet_util_desktop_name_find(const char *name); + [ :efreet_util_desktop_name_find, [ :string ], :efreet_desktop ], + # EAPI Efreet_Desktop *efreet_util_desktop_generic_name_find(const char *generic_name); + [ :efreet_util_desktop_generic_name_find, [ :string ], :efreet_desktop ], + # EAPI Eina_List *efreet_util_desktop_name_glob_list(const char *glob); + [ :efreet_util_desktop_name_glob_list, [ :string ], :eina_list ], + # EAPI Eina_List *efreet_util_desktop_exec_glob_list(const char *glob); + [ :efreet_util_desktop_exec_glob_list, [ :string ], :eina_list ], + # EAPI Eina_List *efreet_util_desktop_generic_name_glob_list(const char *glob); + [ :efreet_util_desktop_generic_name_glob_list, [ :string ], :eina_list ], + # EAPI Eina_List *efreet_util_desktop_comment_glob_list(const char *glob); + [ :efreet_util_desktop_comment_glob_list, [ :string ], :eina_list ], + # EAPI Eina_List *efreet_util_desktop_categories_list(void); + [ :efreet_util_desktop_categories_list, [ ], :eina_list ], + # EAPI Eina_List *efreet_util_desktop_category_list(const char *category); + [ :efreet_util_desktop_category_list, [ :string ], :eina_list ], + # EAPI Eina_List *efreet_util_menus_find(void); + [ :efreet_util_menus_find, [ ], :eina_list ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index e3a2b96..635b672 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -53,6 +53,7 @@ for header in \ "${INCLUDE}/efreet-1/efreet_menu.h" \ "${INCLUDE}/efreet-1/efreet_uri.h" \ "${INCLUDE}/efreet-1/efreet_ini.h" \ + "${INCLUDE}/efreet-1/efreet_utils.h" \ "${INCLUDE}/efreet-1/Efreet_Mime.h" \ "${INCLUDE}/efreet-1/Efreet_Trash.h" \ "${INCLUDE}/ethumb-1/Ethumb.h" \ diff --git a/tools/genruby.rb b/tools/genruby.rb index efebcbb..ede2c7e 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -300,6 +300,7 @@ libs << efl_h('efreet','efreet_desktop.h','EfreetDesktop','efreet_desktop',nil,[ libs << efl_h('efreet','efreet_menu.h','EfreetMenu','efreet_menu',nil,["#{NATIVE}/efreet_desktop"]) libs << efl_h('efreet','efreet_uri.h','EfreetUri','efreet_uri') libs << efl_h('efreet','efreet_ini.h','EfreetIni','efreet_ini') +libs << efl_h('efreet','efreet_utils.h','EfreetUtils','efreet_utils',nil,["#{NATIVE}/efreet_desktop"]) libs << efl_h('efreet_mime','Efreet_Mime.h','EfreetMime') libs << efl_h('efreet_trash','Efreet_Trash.h','EfreetTrash',nil,nil,["#{NATIVE}/eina_list","#{NATIVE}/efreet_uri"]) libs << efl_h('ethumb','Ethumb.h','Ethumb') |