class Net::VNC::PointerState
Attributes
x[R]
y[R]
Public Class Methods
new(vnc)
click to toggle source
# File lib/net/vnc.rb, line 34 def initialize vnc @x = @y = @button = 0 @vnc = vnc end
Public Instance Methods
refresh()
click to toggle source
# File lib/net/vnc.rb, line 50 def refresh packet = 0.chr * 6 packet[0] = 5.chr packet[1] = button.chr packet[2, 2] = [x].pack 'n' packet[4, 2] = [y].pack 'n' @vnc.socket.write packet end
update(x, y, button=@button)
click to toggle source
# File lib/net/vnc.rb, line 45 def update x, y, button=@button @x, @y, @button = x, y, button refresh end