MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / cursorPos

Method cursorPos

src/main/java/field/graphics/Windows.java:228–246  ·  view source on GitHub ↗
(long window, double x, double y)

Source from the content-addressed store, hash-verified

226 @Override
227 public void cursorPos(long window, double x, double y) {
228
229// System.out.println(" -- cursorPos "+window+" "+x+" "+y+" "+checkThread());
230
231 Runnable r = () -> {
232 checkClassLoader();
233 GlfwCallback a = adaptors.get(window);
234 if (a != null)
235 a.cursorPos(window, x, y);
236 };
237
238 if (checkThread()) r.run();
239 else {
240 events.addLast(r);
241 RunLoop.main.shouldSleep.add(Windows.this);
242 RunLoop.main.interrupt();
243 }
244 }
245
246 @Override
247 public void key(long window, int key, int scancode, int action, int mods) {
248
249 // we occasionally get a spurious 'a' (scancode 0) on command-tabbing to our application. If it's just a plain 'a' let's assume that the character callback will handle it

Callers

nothing calls this directly

Calls 7

checkClassLoaderMethod · 0.95
cursorPosMethod · 0.95
checkThreadMethod · 0.95
interruptMethod · 0.80
getMethod · 0.65
runMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected