summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/eina_hash.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-05 00:13:06 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-05 00:13:06 +0200
commitf3d11962e77d25d19a312b4baa1a390539b2187b (patch)
treed7a3842583a0607cba272a85b210f5947ed9ec57 /lib/efl/native/eina_hash.rb
parente4baccaefd209a25daa3ff8d5277fe86aca1d379 (diff)
downloadffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.zip
ffi-efl-f3d11962e77d25d19a312b4baa1a390539b2187b.tar.gz
all FFI into one module Efl::Native
Diffstat (limited to 'lib/efl/native/eina_hash.rb')
-rw-r--r--lib/efl/native/eina_hash.rb193
1 files changed, 97 insertions, 96 deletions
diff --git a/lib/efl/native/eina_hash.rb b/lib/efl/native/eina_hash.rb
index c0caf8a..a58159e 100644
--- a/lib/efl/native/eina_hash.rb
+++ b/lib/efl/native/eina_hash.rb
@@ -9,105 +9,106 @@ module Efl
#
def self.method_missing m, *args, &block
sym = 'eina_hash_'+m.to_s
- raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::EinaHash::Native.respond_to? sym
- self.module_eval "def self.#{m} *args, &block; r=Efl::EinaHash::Native.#{sym}(*args); yield r if block_given?; r; end"
+ raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::Native.respond_to? sym
+ self.module_eval "def self.#{m} *args, &block; r=Efl::Native.#{sym}(*args); yield r if block_given?; r; end"
self.send m, *args, &block
end
#
- module Native
- #
- extend Efl::FFIHelper
- #
- ffi_lib 'eina'
- #
- # ENUMS
- #
- # TYPEDEFS
- # typedef struct _Eina_Hash Eina_Hash;
- typedef :pointer, :eina_hash
- typedef :pointer, :eina_hash_p
- # typedef struct _Eina_Hash_Tuple Eina_Hash_Tuple;
- typedef :pointer, :eina_hash_tuple
- #
- # CALLBACKS
- # typedef unsigned int (*Eina_Key_Length) (const void *key);
- callback :eina_key_length, [ :void_p ], :uint
- # typedef int (*Eina_Key_Cmp) (const void *key1, int key1_length, const void *key2, int key2_length);
- callback :eina_key_cmp, [ :void_p, :int, :void_p, :int ], :int
- # typedef int (*Eina_Key_Hash) (const void *key, int key_length);
- callback :eina_key_hash, [ :void_p, :int ], :int
- # typedef Eina_Bool (*Eina_Hash_Foreach) (const Eina_Hash *hash, const void *key, void *data, void *fdata);
- callback :eina_hash_foreach, [ :eina_hash_p, :void_p, :void_p, :void_p ], :eina_bool
- #
- # FUNCTIONS
- fcts = [
- # EAPI Eina_Hash *eina_hash_new(Eina_Key_Length key_length_cb, Eina_Key_Cmp key_cmp_cb, Eina_Key_Hash key_hash_cb, Eina_Free_Cb data_free_cb, int buckets_power_size);
- [ :eina_hash_new, [ :eina_key_length, :eina_key_cmp, :eina_key_hash, :eina_free_cb, :int ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_string_djb2_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_string_djb2_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_string_superfast_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_string_small_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_string_small_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_int32_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_int32_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_int64_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_int64_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_pointer_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_pointer_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Hash *eina_hash_stringshared_new(Eina_Free_Cb data_free_cb);
- [ :eina_hash_stringshared_new, [ :eina_free_cb ], :eina_hash_p ],
- # EAPI Eina_Bool eina_hash_add(Eina_Hash *hash, const void *key, const void *data);
- [ :eina_hash_add, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_direct_add(Eina_Hash *hash, const void *key, const void *data);
- [ :eina_hash_direct_add, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, const void *key, const void *data);
- [ :eina_hash_del, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
- # EAPI void *eina_hash_find(const Eina_Hash *hash, const void *key);
- [ :eina_hash_find, [ :eina_hash_p, :void_p ], :void_p ],
- # EAPI void *eina_hash_modify(Eina_Hash *hash, const void *key, const void *data);
- [ :eina_hash_modify, [ :eina_hash_p, :void_p, :void_p ], :void_p ],
- # EAPI void *eina_hash_set(Eina_Hash *hash, const void *key, const void *data);
- [ :eina_hash_set, [ :eina_hash_p, :void_p, :void_p ], :void_p ],
- # EAPI Eina_Bool eina_hash_move(Eina_Hash *hash, const void *old_key, const void *new_key);
- [ :eina_hash_move, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
- # EAPI void eina_hash_free(Eina_Hash *hash);
- [ :eina_hash_free, [ :eina_hash_p ], :void ],
- # EAPI void eina_hash_free_buckets(Eina_Hash *hash);
- [ :eina_hash_free_buckets, [ :eina_hash_p ], :void ],
- # EAPI int eina_hash_population(const Eina_Hash *hash);
- [ :eina_hash_population, [ :eina_hash_p ], :int ],
- # EAPI Eina_Bool eina_hash_add_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
- [ :eina_hash_add_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_direct_add_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
- [ :eina_hash_direct_add_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash);
- [ :eina_hash_del_by_key_hash, [ :eina_hash_p, :void_p, :int, :int ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash *hash, const void *key);
- [ :eina_hash_del_by_key, [ :eina_hash_p, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_del_by_data(Eina_Hash *hash, const void *data);
- [ :eina_hash_del_by_data, [ :eina_hash_p, :void_p ], :eina_bool ],
- # EAPI Eina_Bool eina_hash_del_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
- [ :eina_hash_del_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
- # EAPI void *eina_hash_find_by_hash(const Eina_Hash *hash, const void *key, int key_length, int key_hash);
- [ :eina_hash_find_by_hash, [ :eina_hash_p, :void_p, :int, :int ], :void_p ],
- # EAPI void *eina_hash_modify_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
- [ :eina_hash_modify_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :void_p ],
- # EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash *hash);
- [ :eina_hash_iterator_key_new, [ :eina_hash_p ], :eina_iterator_p ],
- # EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash *hash);
- [ :eina_hash_iterator_data_new, [ :eina_hash_p ], :eina_iterator_p ],
- # EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash);
- [ :eina_hash_iterator_tuple_new, [ :eina_hash_p ], :eina_iterator_p ],
- # EAPI void eina_hash_foreach(const Eina_Hash *hash, Eina_Hash_Foreach cb, const void *fdata);
- [ :eina_hash_foreach, [ :eina_hash_p, :eina_hash_foreach, :void_p ], :void ],
- # EAPI int eina_hash_superfast(const char *key, int len);
- [ :eina_hash_superfast, [ :string, :int ], :int ],
- ]
- #
- attach_fcts fcts
- #
- end
+ end
+ #
+ module Native
+ #
+ extend Efl::FFIHelper
+ #
+ ffi_lib 'eina'
+ #
+ # ENUMS
+ #
+ # TYPEDEFS
+ # typedef struct _Eina_Hash Eina_Hash;
+ typedef :pointer, :eina_hash
+ typedef :pointer, :eina_hash_p
+ # typedef struct _Eina_Hash_Tuple Eina_Hash_Tuple;
+ typedef :pointer, :eina_hash_tuple
+ #
+ # CALLBACKS
+ # typedef unsigned int (*Eina_Key_Length) (const void *key);
+ callback :eina_key_length, [ :void_p ], :uint
+ # typedef int (*Eina_Key_Cmp) (const void *key1, int key1_length, const void *key2, int key2_length);
+ callback :eina_key_cmp, [ :void_p, :int, :void_p, :int ], :int
+ # typedef int (*Eina_Key_Hash) (const void *key, int key_length);
+ callback :eina_key_hash, [ :void_p, :int ], :int
+ # typedef Eina_Bool (*Eina_Hash_Foreach) (const Eina_Hash *hash, const void *key, void *data, void *fdata);
+ callback :eina_hash_foreach, [ :eina_hash_p, :void_p, :void_p, :void_p ], :eina_bool
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI Eina_Hash *eina_hash_new(Eina_Key_Length key_length_cb, Eina_Key_Cmp key_cmp_cb, Eina_Key_Hash key_hash_cb, Eina_Free_Cb data_free_cb, int buckets_power_size);
+ [ :eina_hash_new, [ :eina_key_length, :eina_key_cmp, :eina_key_hash, :eina_free_cb, :int ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_string_djb2_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_string_djb2_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_string_superfast_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_string_small_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_string_small_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_int32_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_int32_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_int64_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_int64_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_pointer_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_pointer_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Hash *eina_hash_stringshared_new(Eina_Free_Cb data_free_cb);
+ [ :eina_hash_stringshared_new, [ :eina_free_cb ], :eina_hash_p ],
+ # EAPI Eina_Bool eina_hash_add(Eina_Hash *hash, const void *key, const void *data);
+ [ :eina_hash_add, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_direct_add(Eina_Hash *hash, const void *key, const void *data);
+ [ :eina_hash_direct_add, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, const void *key, const void *data);
+ [ :eina_hash_del, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
+ # EAPI void *eina_hash_find(const Eina_Hash *hash, const void *key);
+ [ :eina_hash_find, [ :eina_hash_p, :void_p ], :void_p ],
+ # EAPI void *eina_hash_modify(Eina_Hash *hash, const void *key, const void *data);
+ [ :eina_hash_modify, [ :eina_hash_p, :void_p, :void_p ], :void_p ],
+ # EAPI void *eina_hash_set(Eina_Hash *hash, const void *key, const void *data);
+ [ :eina_hash_set, [ :eina_hash_p, :void_p, :void_p ], :void_p ],
+ # EAPI Eina_Bool eina_hash_move(Eina_Hash *hash, const void *old_key, const void *new_key);
+ [ :eina_hash_move, [ :eina_hash_p, :void_p, :void_p ], :eina_bool ],
+ # EAPI void eina_hash_free(Eina_Hash *hash);
+ [ :eina_hash_free, [ :eina_hash_p ], :void ],
+ # EAPI void eina_hash_free_buckets(Eina_Hash *hash);
+ [ :eina_hash_free_buckets, [ :eina_hash_p ], :void ],
+ # EAPI int eina_hash_population(const Eina_Hash *hash);
+ [ :eina_hash_population, [ :eina_hash_p ], :int ],
+ # EAPI Eina_Bool eina_hash_add_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
+ [ :eina_hash_add_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_direct_add_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
+ [ :eina_hash_direct_add_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_del_by_key_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash);
+ [ :eina_hash_del_by_key_hash, [ :eina_hash_p, :void_p, :int, :int ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_del_by_key(Eina_Hash *hash, const void *key);
+ [ :eina_hash_del_by_key, [ :eina_hash_p, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_del_by_data(Eina_Hash *hash, const void *data);
+ [ :eina_hash_del_by_data, [ :eina_hash_p, :void_p ], :eina_bool ],
+ # EAPI Eina_Bool eina_hash_del_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
+ [ :eina_hash_del_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :eina_bool ],
+ # EAPI void *eina_hash_find_by_hash(const Eina_Hash *hash, const void *key, int key_length, int key_hash);
+ [ :eina_hash_find_by_hash, [ :eina_hash_p, :void_p, :int, :int ], :void_p ],
+ # EAPI void *eina_hash_modify_by_hash(Eina_Hash *hash, const void *key, int key_length, int key_hash, const void *data);
+ [ :eina_hash_modify_by_hash, [ :eina_hash_p, :void_p, :int, :int, :void_p ], :void_p ],
+ # EAPI Eina_Iterator *eina_hash_iterator_key_new(const Eina_Hash *hash);
+ [ :eina_hash_iterator_key_new, [ :eina_hash_p ], :eina_iterator_p ],
+ # EAPI Eina_Iterator *eina_hash_iterator_data_new(const Eina_Hash *hash);
+ [ :eina_hash_iterator_data_new, [ :eina_hash_p ], :eina_iterator_p ],
+ # EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash);
+ [ :eina_hash_iterator_tuple_new, [ :eina_hash_p ], :eina_iterator_p ],
+ # EAPI void eina_hash_foreach(const Eina_Hash *hash, Eina_Hash_Foreach cb, const void *fdata);
+ [ :eina_hash_foreach, [ :eina_hash_p, :eina_hash_foreach, :void_p ], :void ],
+ # EAPI int eina_hash_superfast(const char *key, int len);
+ [ :eina_hash_superfast, [ :string, :int ], :int ],
+ ]
+ #
+ attach_fcts fcts
+ #
end
end
#