From b7ae3255dbe5227660fd72ff05ec9734a42f9140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 6 May 2011 16:47:37 +0200 Subject: bugfix last minutegit status --- lib/efl/eina_rectangle.rb | 2 ++ lib/efl/native.rb | 1 - spec/edje_spec.rb | 38 +++++++++++++++++++------------------- spec/evas_spec.rb | 38 +++++++++++++++++++------------------- 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/lib/efl/eina_rectangle.rb b/lib/efl/eina_rectangle.rb index c8ba256..853df0a 100644 --- a/lib/efl/eina_rectangle.rb +++ b/lib/efl/eina_rectangle.rb @@ -1,6 +1,8 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # +require 'ffi' +# module Efl # module Native diff --git a/lib/efl/native.rb b/lib/efl/native.rb index e6b3568..1908595 100644 --- a/lib/efl/native.rb +++ b/lib/efl/native.rb @@ -5,7 +5,6 @@ require 'efl/native/eet' require 'efl/native/eina' require 'efl/native/eina_hash' require 'efl/native/eina_list' -require 'efl/native/eina_rectangle' require 'efl/native/evas' require 'efl/native/ecore' require 'efl/native/ecore_evas' diff --git a/spec/edje_spec.rb b/spec/edje_spec.rb index 9bfe32e..cf67e4e 100644 --- a/spec/edje_spec.rb +++ b/spec/edje_spec.rb @@ -20,27 +20,27 @@ require 'efl/eina_list' require 'efl/evas' require 'efl/edje' # -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 - einfo = Efl::Native::EngineInfoBufferStruct.new @e.engine_info - einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32 - einfo[:info][:dest_buffer] = @pixels - einfo[:info][:dest_buffer_row_bytes] = width * FFI::type_size(:int); - einfo[:info][:use_color_key] = 0; - einfo[:info][:alpha_threshold] = 0; - einfo[:info][:func][:new_update_region] = nil #FFI::Pointer::NULL; - einfo[:info][:func][:free_update_region] = nil #FFI::Pointer::NULL; - @e.engine_info_set einfo -end -# describe Efl::Edje do # + 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 + einfo = Efl::Native::EngineInfoBufferStruct.new @e.engine_info + einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32 + einfo[:info][:dest_buffer] = @pixels + einfo[:info][:dest_buffer_row_bytes] = width * FFI::type_size(:int); + einfo[:info][:use_color_key] = 0; + einfo[:info][:alpha_threshold] = 0; + einfo[:info][:func][:new_update_region] = nil #FFI::Pointer::NULL; + einfo[:info][:func][:free_update_region] = nil #FFI::Pointer::NULL; + @e.engine_info_set einfo + end + # before(:all) { Edje = Efl::Edje } # before(:each) { diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb index ccba590..6bde803 100644 --- a/spec/evas_spec.rb +++ b/spec/evas_spec.rb @@ -5,27 +5,27 @@ require 'efl/eina_list' require 'efl/ecore' require 'efl/evas' # -def realize_evas - width = 800 - height = 600 - @pixels = FFI::MemoryPointer.new :int, width*height - @e = Evas::REvas.new - @e.output_method_set Evas::render_method_lookup("buffer") - @e.output_viewport_set 0, 0, width, height - @e.output_size_set width, height - einfo = Native::EngineInfoBufferStruct.new @e.engine_info - einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32 - einfo[:info][:dest_buffer] = @pixels - einfo[:info][:dest_buffer_row_bytes] = width * FFI::type_size(:int); - einfo[:info][:use_color_key] = 0; - einfo[:info][:alpha_threshold] = 0; - einfo[:info][:func][:new_update_region] = nil #FFI::Pointer::NULL; - einfo[:info][:func][:free_update_region] = nil #FFI::Pointer::NULL; - @e.engine_info_set einfo -end -# describe Efl::Evas do # + def realize_evas + width = 800 + height = 600 + @pixels = FFI::MemoryPointer.new :int, width*height + @e = Evas::REvas.new + @e.output_method_set Evas::render_method_lookup("buffer") + @e.output_viewport_set 0, 0, width, height + @e.output_size_set width, height + einfo = Native::EngineInfoBufferStruct.new @e.engine_info + einfo[:info][:depth_type] = Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32 + einfo[:info][:dest_buffer] = @pixels + einfo[:info][:dest_buffer_row_bytes] = width * FFI::type_size(:int); + einfo[:info][:use_color_key] = 0; + einfo[:info][:alpha_threshold] = 0; + einfo[:info][:func][:new_update_region] = nil #FFI::Pointer::NULL; + einfo[:info][:func][:free_update_region] = nil #FFI::Pointer::NULL; + @e.engine_info_set einfo + end + # before(:all) { Evas = Efl::Evas Native = Efl::Native unless Kernel.const_defined? 'Native' -- cgit v1.1-2-g2b99