diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-27 17:20:53 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-27 17:20:53 +0200 |
commit | d220a91a8f49a3f2c833d2023eea5539101e6514 (patch) | |
tree | d4f73f586ddb3134b69c23c0ed6c82184742c539 /spec | |
parent | efafef54c51cb1e43a8f5bc321aff65c08ded866 (diff) | |
download | ffi-efl-d220a91a8f49a3f2c833d2023eea5539101e6514.zip ffi-efl-d220a91a8f49a3f2c833d2023eea5539101e6514.tar.gz |
fix evas spec for evas_event_callback_add
Diffstat (limited to 'spec')
-rw-r--r-- | spec/evas_spec.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb index 4350e86..3d579f1 100644 --- a/spec/evas_spec.rb +++ b/spec/evas_spec.rb @@ -217,18 +217,22 @@ describe Efl::Evas do # evas_event_feed_hold # it "event callback should work" do - # FIXME + @cb = false kd_cb = Proc.new do |data, e, obj, event_info| - puts data - data.read_string.should eq "key_down" - puts e - e.should eql @e - puts obj - puts envent_info + data.read_string.should eq "mouse_in" + e.address.should eql @e.ptr.address + obj.address.should eql @bg.ptr.address + @db=true + true end - kd_d = FFI::MemoryPointer.from_string "key down" - @e.event_callback_add :evas_callback_mouse_in, kd_cb, kd_d + kd_d = FFI::MemoryPointer.from_string "mouse_in" + @bg = Evas::EvasObject.new @e.object_rectangle_add + @bg.move 0, 0 + @bg.resize 20, 20 + @bg.show + @bg.event_callback_add 0, kd_cb, kd_d @e.event_feed_mouse_in Time.now.to_i, FFI::Pointer::NULL + @db.should be_true end # end |