100 |
return false; |
return false; |
101 |
} |
} |
102 |
|
|
103 |
public void mouse(int x, int y, int button, int what) { |
public void mouse(int x, int y, int button, int what, |
104 |
|
int modifiers) { |
105 |
// Handle mouse wheel. |
// Handle mouse wheel. |
106 |
if(button == 4 || button == 5) { |
if(button == 4 || button == 5) { |
107 |
int r = (button == 4 ? 1 : -1); |
int r = (button == 4 ? 1 : -1); |
108 |
VobMouseEvent ev = new VobMouseEvent( |
VobMouseEvent ev = new VobMouseEvent( |
109 |
VobMouseEvent.MOUSE_WHEEL, |
VobMouseEvent.MOUSE_WHEEL, |
110 |
x, y, |
x, y, |
111 |
r, 0, 0); |
r, modifiers, 0); |
112 |
binder.mouse(ev); |
binder.mouse(ev); |
113 |
return; |
return; |
114 |
} |
} |
121 |
(what==PRESS ? VobMouseEvent.MOUSE_PRESSED |
(what==PRESS ? VobMouseEvent.MOUSE_PRESSED |
122 |
: VobMouseEvent.MOUSE_RELEASED), |
: VobMouseEvent.MOUSE_RELEASED), |
123 |
x, y, |
x, y, |
124 |
0, 0, button |
0, modifiers, button |
125 |
); |
); |
126 |
if(what == RELEASE && !didDrag) { |
if(what == RELEASE && !didDrag) { |
127 |
binder.mouse(ev); |
binder.mouse(ev); |
128 |
ev = new VobMouseEvent( |
ev = new VobMouseEvent( |
129 |
VobMouseEvent.MOUSE_CLICKED, |
VobMouseEvent.MOUSE_CLICKED, |
130 |
x, y, |
x, y, |
131 |
0, 0, button |
0, modifiers, button |
132 |
); |
); |
133 |
} |
} |
134 |
notDragging(x, y); |
notDragging(x, y); |
140 |
ev = new VobMouseEvent( |
ev = new VobMouseEvent( |
141 |
VobMouseEvent.MOUSE_DRAGGED, |
VobMouseEvent.MOUSE_DRAGGED, |
142 |
x, y, |
x, y, |
143 |
0, 0, button |
0, modifiers, button |
144 |
); |
); |
145 |
break; |
break; |
146 |
default: |
default: |