diff options
| -rw-r--r-- | lib/efl/evas.rb | 4 | ||||
| -rw-r--r-- | spec/evas_spec.rb | 4 | 
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb index 1dcc1a4..d18cec8 100644 --- a/lib/efl/evas.rb +++ b/lib/efl/evas.rb @@ -72,6 +72,7 @@ module Efl                  @ptr=nil              end              def object_add t +                # TODO should return Objects                  r = Evas::REvasObject.new Native.send "evas_object_#{t.to_s}_add", @ptr                  yield r if block_given?                  r @@ -91,18 +92,21 @@ module Efl                  Native.evas_output_viewport_get @ptr, x, y, w, h                  [ x.read_int, y.read_int, w.read_int, h.read_int ]              end +            alias :viewport :output_viewport_get              def pointer_output_xy_get                  x = FFI::MemoryPointer.new :int                  y = FFI::MemoryPointer.new :int                  Native.evas_pointer_output_xy_get @ptr, x, y                  [ x.read_int, y.read_int ]              end +            alias :pointer_output :pointer_output_xy_get              def pointer_canvas_xy_get                  x = FFI::MemoryPointer.new :int                  y = FFI::MemoryPointer.new :int                  Native.evas_pointer_canvas_xy_get @ptr, x, y                  [ x.read_int, y.read_int ]              end +            alias :pointer_canvas :pointer_canvas_xy_get          end          #          class REvasObject diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb index 135e8bf..622714a 100644 --- a/spec/evas_spec.rb +++ b/spec/evas_spec.rb @@ -157,10 +157,14 @@ describe Efl::Evas do          it "output size should work" do              @e.output_size_set 69, 666              @e.output_size_get.should == [69,666] +            @e.output_size = 666, 69 +            @e.size == [666,69]          end          it "output viewport should work" do              @e.output_viewport_set 0, 0, 666, 69              @e.output_viewport_get.should == [0,0,666,69] +            @e.output_viewport =  0, 0, 69, 666 +            @e.viewport.should == [0,0,69,666]          end          #          it "coordinates evas<=>world should work" do  | 
