diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:44:55 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-12-21 15:44:55 +0100 |
commit | 7571a2e2097e0ad0d4411144786329db507a2325 (patch) | |
tree | 6a0a1578e296b70952547125bf499d5c9aad008a | |
parent | 3cdb867f1baa91cb8aa873e295b30fcb4b52c588 (diff) | |
download | ffi-efl-7571a2e2097e0ad0d4411144786329db507a2325.zip ffi-efl-7571a2e2097e0ad0d4411144786329db507a2325.tar.gz |
generate efreet_ini native binding
-rw-r--r-- | lib/efl/native/efreet_ini.rb | 68 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 1 |
3 files changed, 70 insertions, 0 deletions
diff --git a/lib/efl/native/efreet_ini.rb b/lib/efl/native/efreet_ini.rb new file mode 100644 index 0000000..88c77ab --- /dev/null +++ b/lib/efl/native/efreet_ini.rb @@ -0,0 +1,68 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +# +module Efl + # + module EfreetIni + # + FCT_PREFIX = 'efreet_ini_' 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_Ini Efreet_Ini; + typedef :pointer, :efreet_ini + # + # FUNCTIONS + fcts = [ + # EAPI Efreet_Ini *efreet_ini_new(const char *file); + [ :efreet_ini_new, [ :string ], :efreet_ini ], + # EAPI void efreet_ini_free(Efreet_Ini *ini); + [ :efreet_ini_free, [ :efreet_ini ], :void ], + # EAPI int efreet_ini_save(Efreet_Ini *ini, const char *path); + [ :efreet_ini_save, [ :efreet_ini, :string ], :int ], + # EAPI int efreet_ini_section_set(Efreet_Ini *ini, const char *section); + [ :efreet_ini_section_set, [ :efreet_ini, :string ], :int ], + # EAPI void efreet_ini_section_add(Efreet_Ini *ini, const char *section); + [ :efreet_ini_section_add, [ :efreet_ini, :string ], :void ], + # EAPI const char *efreet_ini_string_get(Efreet_Ini *ini, const char *key); + [ :efreet_ini_string_get, [ :efreet_ini, :string ], :string ], + # EAPI void efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value); + [ :efreet_ini_string_set, [ :efreet_ini, :string, :string ], :void ], + # EAPI const char *efreet_ini_localestring_get(Efreet_Ini *ini, const char *key); + [ :efreet_ini_localestring_get, [ :efreet_ini, :string ], :string ], + # EAPI void efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value); + [ :efreet_ini_localestring_set, [ :efreet_ini, :string, :string ], :void ], + # EAPI unsigned int efreet_ini_boolean_get(Efreet_Ini *ini, const char *key); + [ :efreet_ini_boolean_get, [ :efreet_ini, :string ], :uint ], + # EAPI void efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value); + [ :efreet_ini_boolean_set, [ :efreet_ini, :string, :uint ], :void ], + # EAPI int efreet_ini_int_get(Efreet_Ini *ini, const char *key); + [ :efreet_ini_int_get, [ :efreet_ini, :string ], :int ], + # EAPI void efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value); + [ :efreet_ini_int_set, [ :efreet_ini, :string, :int ], :void ], + # EAPI double efreet_ini_double_get(Efreet_Ini *ini, const char *key); + [ :efreet_ini_double_get, [ :efreet_ini, :string ], :double ], + # EAPI void efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value); + [ :efreet_ini_double_set, [ :efreet_ini, :string, :double ], :void ], + # EAPI void efreet_ini_key_unset(Efreet_Ini *ini, const char *key); + [ :efreet_ini_key_unset, [ :efreet_ini, :string ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 5ddefa4..e3a2b96 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_ini.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 ce67cc2..efebcbb 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -299,6 +299,7 @@ libs << efl_h('efreet','efreet_icon.h','EfreetIcon','efreet_icon',nil,["#{NATIVE libs << efl_h('efreet','efreet_desktop.h','EfreetDesktop','efreet_desktop',nil,["#{NATIVE}/eina_list"]) 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_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') |