]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/input/InputProvider.java
git-svn-id: https://www.simantics.org/svn/simantics/3d/trunk@22279 ac1ea38d-2e2b...
[simantics/3d.git] / org.simantics.proconf.g3d / src / org / simantics / proconf / g3d / input / InputProvider.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007- VTT Technical Research Centre of Finland.\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
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.proconf.g3d.input;\r
12 \r
13 \r
14 /**\r
15  * InputProvider is used to listen inputs from AWT-thread, \r
16  * and then input actions can be polled from the provider.\r
17  * \r
18  * TODO : use methods instead of public members\r
19  * \r
20  * @author Marko Luukkainen\r
21  *\r
22  */\r
23 public interface InputProvider {\r
24     \r
25     \r
26     \r
27     public boolean keyPressed(int i);\r
28     \r
29     public boolean keyDown(int i);\r
30     \r
31     public boolean keyUp(int i);\r
32     \r
33     public int mouseX();\r
34     \r
35     public int mouseY();\r
36     \r
37     public int prevMouseX();\r
38     \r
39     public int prevMouseY();\r
40     \r
41     public boolean mousePressed();\r
42     \r
43     public boolean mouseMoved();\r
44     \r
45     public boolean mouseReleased();\r
46     \r
47     public boolean mouseClicked();\r
48     \r
49     public boolean mouseDragged();\r
50     \r
51     public int pressModifiers();\r
52     \r
53     public int clickModifiers();\r
54     \r
55     public int dragModifiers();\r
56     \r
57     public int moveModifiers();\r
58     \r
59     public int clickButton();\r
60     \r
61     \r
62     public void update();\r
63     \r
64     // FIXME : when dnd is used, mouse inputs won't get passed\r
65     \r
66     public void setMouseX(int x);\r
67     public void setMouseY(int y);\r
68     public void setMouseMoved(boolean b);\r
69     \r
70     \r
71    \r
72 }