lib/mac-robot.rb in mac-robot-0.5.0 vs lib/mac-robot.rb in mac-robot-0.5.1

- old
+ new

@@ -1,7 +1,7 @@ -require 'event_dispatcher' -require 'util' +require 'event_dispatcher.h' +require 'util.h' module Mac class Robot class Error < StandardError; end class OutOfResolution < Error; end @@ -15,11 +15,11 @@ } def initialize @x = 0 @y = 0 - + @state = :mouse_up @dispatcher = EventDispatcher.new end def mouse_press(button = :left) @@ -43,10 +43,10 @@ @x = x @y = y mouse_event(:left, :mouse_drag) end - + def mouse_current_location loc = Util.get_mouse_current_location Struct.new(:x, :y).new(*loc) end