diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-22 18:02:11 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-22 18:02:11 +0100 |
commit | 7082e7780cfbadac2ef33e1f5ce7ab6be1026314 (patch) | |
tree | ec100f30b71b10b079705118e081e924fe5bdeaf /lib/efl/native/eina_xattr.rb | |
parent | bb84047c45fda4c5ac9b92e4feff16054e603e87 (diff) | |
download | ffi-efl-7082e7780cfbadac2ef33e1f5ce7ab6be1026314.zip ffi-efl-7082e7780cfbadac2ef33e1f5ce7ab6be1026314.tar.gz |
update lib/efl/native/eina*
Diffstat (limited to 'lib/efl/native/eina_xattr.rb')
-rw-r--r-- | lib/efl/native/eina_xattr.rb | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/efl/native/eina_xattr.rb b/lib/efl/native/eina_xattr.rb index f16f0fd..6cc399d 100644 --- a/lib/efl/native/eina_xattr.rb +++ b/lib/efl/native/eina_xattr.rb @@ -1,18 +1,17 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # -require 'efl/ffi' +require 'efl/native' # module Efl # module EinaXattr # - FCT_PREFIX = 'eina_xattr_' + FCT_PREFIX = 'eina_xattr_' unless const_defined? :FCT_PREFIX # - def self.method_missing m, *args, &block - sym, args_s = ModuleHelper.find_function m, FCT_PREFIX - self.module_eval "def self.#{m} *args, █ r=Efl::Native.#{sym}(#{args_s}); yield r if block_given?; r; end" - self.send m, *args, &block + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block end # end @@ -26,6 +25,8 @@ module Efl enum :eina_xattr_flags, [ :eina_xattr_insert, :eina_xattr_replace, :eina_xattr_created ] # # TYPEDEFS + # typedef struct _Eina_Xattr Eina_Xattr; + typedef :pointer, :eina_xattr # # CALLBACKS # @@ -34,11 +35,17 @@ module Efl # FUNCTIONS fcts = [ # EAPI Eina_Iterator *eina_xattr_ls(const char *file); - [ :eina_xattr_ls, [ :string ], :eina_iterator_p ], + [ :eina_xattr_ls, [ :string ], :pointer ], + # EAPI Eina_Iterator *eina_xattr_value_ls(const char *file); + [ :eina_xattr_value_ls, [ :string ], :pointer ], + # EAPI Eina_Iterator *eina_xattr_fd_ls(int fd); + [ :eina_xattr_fd_ls, [ :int ], :pointer ], + # EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd); + [ :eina_xattr_value_fd_ls, [ :int ], :pointer ], # EAPI void *eina_xattr_get(const char *file, const char *attribute, ssize_t *size); - [ :eina_xattr_get, [ :string, :string, :long_p ], :void_p ], + [ :eina_xattr_get, [ :string, :string, :pointer ], :pointer ], # EAPI Eina_Bool eina_xattr_set(const char *file, const char *attribute, const void *data, ssize_t length, Eina_Xattr_Flags flags); - [ :eina_xattr_set, [ :string, :string, :void_p, :long, :eina_xattr_flags ], :eina_bool ], + [ :eina_xattr_set, [ :string, :string, :pointer, :long, :eina_xattr_flags ], :eina_bool ], # EAPI Eina_Bool eina_xattr_string_set(const char *file, const char *attribute, const char *data, Eina_Xattr_Flags flags); [ :eina_xattr_string_set, [ :string, :string, :string, :eina_xattr_flags ], :eina_bool ], # EAPI char *eina_xattr_string_get(const char *file, const char *attribute); @@ -46,11 +53,11 @@ module Efl # EAPI Eina_Bool eina_xattr_double_set(const char *file, const char *attribute, double value, Eina_Xattr_Flags flags); [ :eina_xattr_double_set, [ :string, :string, :double, :eina_xattr_flags ], :eina_bool ], # EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribute, double *value); - [ :eina_xattr_double_get, [ :string, :string, :double_p ], :eina_bool ], + [ :eina_xattr_double_get, [ :string, :string, :pointer ], :eina_bool ], # EAPI Eina_Bool eina_xattr_int_set(const char *file, const char *attribute, int value, Eina_Xattr_Flags flags); [ :eina_xattr_int_set, [ :string, :string, :int, :eina_xattr_flags ], :eina_bool ], # EAPI Eina_Bool eina_xattr_int_get(const char *file, const char *attribute, int *value); - [ :eina_xattr_int_get, [ :string, :string, :int_p ], :eina_bool ], + [ :eina_xattr_int_get, [ :string, :string, :pointer ], :eina_bool ], ] # attach_fcts fcts |