13 lines
313 B
Plaintext
13 lines
313 B
Plaintext
import Nanoquery.Util.Windows
|
|
|
|
// a function to handle the mouse moved event
|
|
def mouse_moved($caller, $e)
|
|
println "(" + $e.getX() + ", " + $e.getY() + ")"
|
|
end
|
|
|
|
// create a window, set the handler for mouse moved, and show it
|
|
w = new("Window")
|
|
w.setSize(500, 500)
|
|
w.setHandler(w.mouseMoved, mouse_moved)
|
|
w.show()
|