File: mouse.js

package info (click to toggle)
freej 0.10git20080824-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,504 kB
  • ctags: 19,398
  • sloc: ansic: 135,255; cpp: 32,550; sh: 9,318; perl: 2,932; asm: 2,355; yacc: 1,178; makefile: 1,119; java: 136; lex: 94; python: 16
file content (13 lines) | stat: -rw-r--r-- 329 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
m = new MouseController();
register_controller(m);

// MouseController.button(button, state, x, y)
m.button = function(b, s, x, y) {
	echo("b"+b+" s"+s+" x"+x+" y"+y);
	this.grab(s);
}

// MouseController.motion(buttonmask, x, y, xrel, yrel)
m.motion = function(b, x, y, dx, dy) {
	echo("b"+b+" x"+x+" y"+y+" dx"+dx+" dy"+dy);
}