diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 15:48:45 +0100 |
commit | ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3 (patch) | |
tree | c2bb690ccc1be37c03f6dcdcf892fbf3e17f5067 /spec/helper.rb | |
parent | dbb2c5713e11489dfaeb318a82785017f1794dde (diff) | |
parent | b030c490265bb13ee98a650da419a033495042ed (diff) | |
download | ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.zip ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.tar.gz |
Merge branch 'wip'
Conflicts:
tools/genruby.rb
Diffstat (limited to 'spec/helper.rb')
-rw-r--r-- | spec/helper.rb | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/spec/helper.rb b/spec/helper.rb index efdc2b3..eb98117 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,18 +1,19 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # -require 'efl/eina' -require 'efl/evas' -require 'efl/ecore' +require 'efl/eina_log' +Efl::Eina.init +Efl::EinaLog.level_set :eina_log_level_critical # def realize_evas width = 300 height = 200 @pixels = FFI::MemoryPointer.new :int, width*height - @e = Efl::Evas::REvas.new - @e.output_method_set Efl::Evas::render_method_lookup("buffer") - @e.output_viewport_set 0, 0, width, height - @e.output_size_set width, height + @e = Efl::Evas::REvas.new do + output_method_set Efl::Evas::render_method_lookup("buffer") + output_viewport_set 0, 0, width, height + output_size_set width, height + end einfo = Efl::Native::EngineInfoBufferStruct.new @e.engine_info einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32 einfo[:info][:dest_buffer] = @pixels @@ -58,15 +59,15 @@ def char_check t, fct, delay=nil end # def realize_win - @win = Elm::ElmWin.new(nil, 'TEST') do |w| - w.title= 'spec win' - w.move 100, 100 - w.resize 100, 100 + @win = Elm::ElmWin.new(nil, 'TEST') do + title= 'spec win' + move 100, 100 + resize 100, 100 end - @bg = Elm::ElmBg.new(@win) do |bg| - bg.size_hint_weight_set 1.0, 1.0 - bg.evas_object_color_set 200,255,100,150 - bg.show + @bg = Elm::ElmBg.new(@win) do + size_hint_weight_set 1.0, 1.0 + evas_object_color_set 200,255,100,150 + show end @win.show end |