summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/eina.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.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.rb')
-rw-r--r--lib/efl/native/eina.rb67
1 files changed, 34 insertions, 33 deletions
diff --git a/lib/efl/native/eina.rb b/lib/efl/native/eina.rb
index 8e9c892..6303c70 100644
--- a/lib/efl/native/eina.rb
+++ b/lib/efl/native/eina.rb
@@ -9,42 +9,43 @@ module Efl
#
def self.method_missing m, *args, &block
sym = 'eina_'+m.to_s
- raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::Eina::Native.respond_to? sym
- self.module_eval "def self.#{m} *args, &block; r=Efl::Eina::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_Version Eina_Version;
- typedef :pointer, :eina_version
- #
- # CALLBACKS
- #
- # FUNCTIONS
- fcts = [
- # EAPI extern Eina_Version *eina_version;
- # FIXME
- # EAPI int eina_init(void);
- [ :eina_init, [ ], :int ],
- # EAPI int eina_shutdown(void);
- [ :eina_shutdown, [ ], :int ],
- # EAPI int eina_threads_init(void);
- [ :eina_threads_init, [ ], :int ],
- # EAPI int eina_threads_shutdown(void);
- [ :eina_threads_shutdown, [ ], :int ],
- ]
- #
- attach_fcts fcts
- #
- end
+ end
+ #
+ module Native
+ #
+ extend Efl::FFIHelper
+ #
+ ffi_lib 'eina'
+ #
+ # ENUMS
+ #
+ # TYPEDEFS
+ # typedef struct _Eina_Version Eina_Version;
+ typedef :pointer, :eina_version
+ #
+ # CALLBACKS
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI extern Eina_Version *eina_version;
+ # FIXME
+ # EAPI int eina_init(void);
+ [ :eina_init, [ ], :int ],
+ # EAPI int eina_shutdown(void);
+ [ :eina_shutdown, [ ], :int ],
+ # EAPI int eina_threads_init(void);
+ [ :eina_threads_init, [ ], :int ],
+ # EAPI int eina_threads_shutdown(void);
+ [ :eina_threads_shutdown, [ ], :int ],
+ ]
+ #
+ attach_fcts fcts
+ #
end
end
#