From 7571a2e2097e0ad0d4411144786329db507a2325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 21 Dec 2012 15:44:55 +0100 Subject: generate efreet_ini native binding --- lib/efl/native/efreet_ini.rb | 68 ++++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 1 + 3 files changed, 70 insertions(+) create mode 100644 lib/efl/native/efreet_ini.rb 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') -- cgit v1.1-2-g2b99