diff options
Diffstat (limited to 'lib/efl/native/eina_xattr.rb')
-rw-r--r-- | lib/efl/native/eina_xattr.rb | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/lib/efl/native/eina_xattr.rb b/lib/efl/native/eina_xattr.rb index f16f0fd..f2f0e88 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,31 +25,35 @@ module Efl enum :eina_xattr_flags, [ :eina_xattr_insert, :eina_xattr_replace, :eina_xattr_created ] # # TYPEDEFS - # - # CALLBACKS - # - # VARIABLES + # typedef struct _Eina_Xattr Eina_Xattr; + typedef :pointer, :eina_xattr # # 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 ], :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 ], + [ :eina_xattr_string_set, [ :string, :string, :string, :eina_xattr_flags ], :bool ], # EAPI char *eina_xattr_string_get(const char *file, const char *attribute); [ :eina_xattr_string_get, [ :string, :string ], :string ], # 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 ], + [ :eina_xattr_double_set, [ :string, :string, :double, :eina_xattr_flags ], :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 ], :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 ], + [ :eina_xattr_int_set, [ :string, :string, :int, :eina_xattr_flags ], :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 ], :bool ], ] # attach_fcts fcts |