summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-28 17:00:26 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-28 17:00:26 +0200
commitaa7ddc693a3bf6fed5c346f83b3aa7791ba83a8a (patch)
tree610ef37319d2a32ef587bbf3c34ca2048e971bde
parent35eceb0f17b46aeb56dcbd72569a42676cf63923 (diff)
downloadffi-efl-aa7ddc693a3bf6fed5c346f83b3aa7791ba83a8a.zip
ffi-efl-aa7ddc693a3bf6fed5c346f83b3aa7791ba83a8a.tar.gz
fix efl/ffi/ecore_input generation, add specs
-rw-r--r--lib/efl/ecore/ecore_input.rb13
-rw-r--r--lib/efl/ffi/ecore/ecore_input.rb4
-rw-r--r--spec/ecore/ecore_input_spec.rb24
-rwxr-xr-xtools/genruby.rb2
4 files changed, 40 insertions, 3 deletions
diff --git a/lib/efl/ecore/ecore_input.rb b/lib/efl/ecore/ecore_input.rb
new file mode 100644
index 0000000..b7f579d
--- /dev/null
+++ b/lib/efl/ecore/ecore_input.rb
@@ -0,0 +1,13 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/ffi/ecore/ecore_input'
+#
+module Efl
+ module EcoreInput
+ #
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/ffi/ecore/ecore_input.rb b/lib/efl/ffi/ecore/ecore_input.rb
index e88e7fb..9583639 100644
--- a/lib/efl/ffi/ecore/ecore_input.rb
+++ b/lib/efl/ffi/ecore/ecore_input.rb
@@ -7,14 +7,14 @@ module Efl
#
module EcoreInput
def self.method_missing m, *args, &block
- return Efl::FFI.send 'ecore_'+m.to_s, *args, &block
+ return Efl::FFI.send 'ecore_event_'+m.to_s, *args, &block
end
end
#
module FFI
#
#
- ffi_lib 'ecore'
+ ffi_lib 'ecore_input'
#
# ENUMS
# typedef enum _Ecore_Event_Modifier {...} Ecore_Event_Modifier;
diff --git a/spec/ecore/ecore_input_spec.rb b/spec/ecore/ecore_input_spec.rb
new file mode 100644
index 0000000..041f422
--- /dev/null
+++ b/spec/ecore/ecore_input_spec.rb
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/ecore/ecore_input'
+#
+describe Efl::EcoreInput do
+ #
+ before(:all) do
+ EcoreInput = Efl::EcoreInput
+ end
+ #
+ it "should init" do
+ EcoreInput.init.should eql 1
+ EcoreInput.init.should eql 2
+ EcoreInput.init.should eql 3
+ end
+ #
+ it "should shutdown" do
+ EcoreInput.shutdown.should eql 2
+ EcoreInput.shutdown.should eql 1
+ EcoreInput.shutdown.should eql 0
+ end
+ #
+end
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 4ee6405..3fe31a5 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -17,7 +17,7 @@ libraries = [
[ 'Edje.h', 'Edje', 'edje', 'edje', 'edje.rb' ],
[ 'Ecore.h', 'Ecore', 'ecore', 'ecore', 'ecore.rb' ],
# [ 'Ecore_Con.h', 'EcoreCon', 'ecore_con', 'ecore', 'ecore/ecore_con.rb' ],
- [ 'Ecore_Input.h', 'EcoreInput', 'ecore', 'ecore', 'ecore/ecore_input.rb' ],
+ [ 'Ecore_Input.h', 'EcoreInput', 'ecore_event', 'ecore_input', 'ecore/ecore_input.rb' ],
[ 'Ecore_Getopt.h', 'EcoreGetopt', 'ecore_getopt', 'ecore', 'ecore/ecore_getopt.rb' ],
[ 'Ecore_Evas.h', 'EcoreEvas', 'ecore', 'ecore_evas', 'ecore/ecore_evas.rb' ],
# [ 'Ecore_Fb.h', 'EcoreFb', 'ecore', 'ecore', 'ecore/ecore_fb.rb' ],