1 /*******************************************************************************
\r
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.proconf.g3d.input;
\r
15 * InputProvider is used to listen inputs from AWT-thread,
\r
16 * and then input actions can be polled from the provider.
\r
18 * TODO : use methods instead of public members
\r
20 * @author Marko Luukkainen
\r
23 public interface InputProvider {
\r
27 public boolean keyPressed(int i);
\r
29 public boolean keyDown(int i);
\r
31 public boolean keyUp(int i);
\r
33 public int mouseX();
\r
35 public int mouseY();
\r
37 public int prevMouseX();
\r
39 public int prevMouseY();
\r
41 public boolean mousePressed();
\r
43 public boolean mouseMoved();
\r
45 public boolean mouseReleased();
\r
47 public boolean mouseClicked();
\r
49 public boolean mouseDragged();
\r
51 public int pressModifiers();
\r
53 public int clickModifiers();
\r
55 public int dragModifiers();
\r
57 public int moveModifiers();
\r
59 public int clickButton();
\r
62 public void update();
\r
64 // FIXME : when dnd is used, mouse inputs won't get passed
\r
66 public void setMouseX(int x);
\r
67 public void setMouseY(int y);
\r
68 public void setMouseMoved(boolean b);
\r