Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1107 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!-- NewPage -->
3
<html lang="en">
4
<head>
5
<!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:39 CET 2013 -->
6
<title>InputProcessor (libgdx API)</title>
7
<meta name="date" content="2013-11-03">
8
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9
</head>
10
<body>
11
<script type="text/javascript"><!--
12
    if (location.href.indexOf('is-external=true') == -1) {
13
        parent.document.title="InputProcessor (libgdx API)";
14
    }
15
//-->
16
</script>
17
<noscript>
18
<div>JavaScript is disabled on your browser.</div>
19
</noscript>
20
<!-- ========= START OF TOP NAVBAR ======= -->
21
<div class="topNav"><a name="navbar_top">
22
<!--   -->
23
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
24
<!--   -->
25
</a>
26
<ul class="navList" title="Navigation">
27
<li><a href="../../../overview-summary.html">Overview</a></li>
28
<li><a href="package-summary.html">Package</a></li>
29
<li class="navBarCell1Rev">Class</li>
30
<li><a href="class-use/InputProcessor.html">Use</a></li>
31
<li><a href="package-tree.html">Tree</a></li>
32
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
33
<li><a href="../../../index-all.html">Index</a></li>
34
<li><a href="../../../help-doc.html">Help</a></li>
35
</ul>
36
<div class="aboutLanguage"><em>
37
                                libgdx API
38
                                <style>
39
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
40
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
41
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
42
                                .TableHeadingColor { background:#EEEEFF; }
43
                                a { text-decoration:none }
44
                                a:hover { text-decoration:underline }
45
                                a:link, a:visited { color:blue }
46
                                table { border:0px }
47
                                .TableRowColor td:first-child { border-left:1px solid black }
48
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
49
                                hr { border:0px; border-bottom:1px solid #333366; }
50
                                </style>
51
                        </em></div>
52
</div>
53
<div class="subNav">
54
<ul class="navList">
55
<li><a href="../../../com/badlogic/gdx/InputMultiplexer.html" title="class in com.badlogic.gdx"><span class="strong">Prev Class</span></a></li>
56
<li><a href="../../../com/badlogic/gdx/InputProcessorQueue.html" title="class in com.badlogic.gdx"><span class="strong">Next Class</span></a></li>
57
</ul>
58
<ul class="navList">
59
<li><a href="../../../index.html?com/badlogic/gdx/InputProcessor.html" target="_top">Frames</a></li>
60
<li><a href="InputProcessor.html" target="_top">No Frames</a></li>
61
</ul>
62
<ul class="navList" id="allclasses_navbar_top">
63
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
64
</ul>
65
<div>
66
<script type="text/javascript"><!--
67
  allClassesLink = document.getElementById("allclasses_navbar_top");
68
  if(window==top) {
69
    allClassesLink.style.display = "block";
70
  }
71
  else {
72
    allClassesLink.style.display = "none";
73
  }
74
  //-->
75
</script>
76
</div>
77
<div>
78
<ul class="subNavList">
79
<li>Summary:&nbsp;</li>
80
<li>Nested&nbsp;|&nbsp;</li>
81
<li>Field&nbsp;|&nbsp;</li>
82
<li>Constr&nbsp;|&nbsp;</li>
83
<li><a href="#method_summary">Method</a></li>
84
</ul>
85
<ul class="subNavList">
86
<li>Detail:&nbsp;</li>
87
<li>Field&nbsp;|&nbsp;</li>
88
<li>Constr&nbsp;|&nbsp;</li>
89
<li><a href="#method_detail">Method</a></li>
90
</ul>
91
</div>
92
<a name="skip-navbar_top">
93
<!--   -->
94
</a></div>
95
<!-- ========= END OF TOP NAVBAR ========= -->
96
<!-- ======== START OF CLASS DATA ======== -->
97
<div class="header">
98
<div class="subTitle">com.badlogic.gdx</div>
99
<h2 title="Interface InputProcessor" class="title">Interface InputProcessor</h2>
100
</div>
101
<div class="contentContainer">
102
<div class="description">
103
<ul class="blockList">
104
<li class="blockList">
105
<dl>
106
<dt>All Known Implementing Classes:</dt>
107
<dd><a href="../../../com/badlogic/gdx/graphics/g3d/utils/CameraInputController.html" title="class in com.badlogic.gdx.graphics.g3d.utils">CameraInputController</a>, <a href="../../../com/badlogic/gdx/graphics/g3d/utils/FirstPersonCameraController.html" title="class in com.badlogic.gdx.graphics.g3d.utils">FirstPersonCameraController</a>, <a href="../../../com/badlogic/gdx/input/GestureDetector.html" title="class in com.badlogic.gdx.input">GestureDetector</a>, <a href="../../../com/badlogic/gdx/InputAdapter.html" title="class in com.badlogic.gdx">InputAdapter</a>, <a href="../../../com/badlogic/gdx/InputMultiplexer.html" title="class in com.badlogic.gdx">InputMultiplexer</a>, <a href="../../../com/badlogic/gdx/InputProcessorQueue.html" title="class in com.badlogic.gdx">InputProcessorQueue</a>, <a href="../../../com/badlogic/gdx/input/RemoteSender.html" title="class in com.badlogic.gdx.input">RemoteSender</a>, <a href="../../../com/badlogic/gdx/scenes/scene2d/Stage.html" title="class in com.badlogic.gdx.scenes.scene2d">Stage</a></dd>
108
</dl>
109
<hr>
110
<br>
111
<pre>public interface <span class="strong">InputProcessor</span></pre>
112
<div class="block">An InputProcessor is used to receive input events from the keyboard and the touch screen (mouse on the desktop). For this it
113
 has to be registered with the <a href="../../../com/badlogic/gdx/Input.html#setInputProcessor(com.badlogic.gdx.InputProcessor)"><code>Input.setInputProcessor(InputProcessor)</code></a> method. It will be called each frame before the
114
 call to <a href="../../../com/badlogic/gdx/ApplicationListener.html#render()"><code>ApplicationListener.render()</code></a>. Each method returns a boolean in case you want to use this with the <a href="../../../com/badlogic/gdx/InputMultiplexer.html" title="class in com.badlogic.gdx"><code>InputMultiplexer</code></a>
115
 to chain input processors.</div>
116
<dl><dt><span class="strong">Author:</span></dt>
117
  <dd>mzechner</dd></dl>
118
</li>
119
</ul>
120
</div>
121
<div class="summary">
122
<ul class="blockList">
123
<li class="blockList">
124
<!-- ========== METHOD SUMMARY =========== -->
125
<ul class="blockList">
126
<li class="blockList"><a name="method_summary">
127
<!--   -->
128
</a>
129
<h3>Method Summary</h3>
130
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
131
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
132
<tr>
133
<th class="colFirst" scope="col">Modifier and Type</th>
134
<th class="colLast" scope="col">Method and Description</th>
135
</tr>
136
<tr class="altColor">
137
<td class="colFirst"><code>boolean</code></td>
138
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#keyDown(int)">keyDown</a></strong>(int&nbsp;keycode)</code>
139
<div class="block">Called when a key was pressed</div>
140
</td>
141
</tr>
142
<tr class="rowColor">
143
<td class="colFirst"><code>boolean</code></td>
144
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#keyTyped(char)">keyTyped</a></strong>(char&nbsp;character)</code>
145
<div class="block">Called when a key was typed</div>
146
</td>
147
</tr>
148
<tr class="altColor">
149
<td class="colFirst"><code>boolean</code></td>
150
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#keyUp(int)">keyUp</a></strong>(int&nbsp;keycode)</code>
151
<div class="block">Called when a key was released</div>
152
</td>
153
</tr>
154
<tr class="rowColor">
155
<td class="colFirst"><code>boolean</code></td>
156
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#mouseMoved(int, int)">mouseMoved</a></strong>(int&nbsp;screenX,
157
          int&nbsp;screenY)</code>
158
<div class="block">Called when the mouse was moved without any buttons being pressed.</div>
159
</td>
160
</tr>
161
<tr class="altColor">
162
<td class="colFirst"><code>boolean</code></td>
163
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#scrolled(int)">scrolled</a></strong>(int&nbsp;amount)</code>
164
<div class="block">Called when the mouse wheel was scrolled.</div>
165
</td>
166
</tr>
167
<tr class="rowColor">
168
<td class="colFirst"><code>boolean</code></td>
169
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#touchDown(int, int, int, int)">touchDown</a></strong>(int&nbsp;screenX,
170
         int&nbsp;screenY,
171
         int&nbsp;pointer,
172
         int&nbsp;button)</code>
173
<div class="block">Called when the screen was touched or a mouse button was pressed.</div>
174
</td>
175
</tr>
176
<tr class="altColor">
177
<td class="colFirst"><code>boolean</code></td>
178
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#touchDragged(int, int, int)">touchDragged</a></strong>(int&nbsp;screenX,
179
            int&nbsp;screenY,
180
            int&nbsp;pointer)</code>
181
<div class="block">Called when a finger or the mouse was dragged.</div>
182
</td>
183
</tr>
184
<tr class="rowColor">
185
<td class="colFirst"><code>boolean</code></td>
186
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/InputProcessor.html#touchUp(int, int, int, int)">touchUp</a></strong>(int&nbsp;screenX,
187
       int&nbsp;screenY,
188
       int&nbsp;pointer,
189
       int&nbsp;button)</code>
190
<div class="block">Called when a finger was lifted or a mouse button was released.</div>
191
</td>
192
</tr>
193
</table>
194
</li>
195
</ul>
196
</li>
197
</ul>
198
</div>
199
<div class="details">
200
<ul class="blockList">
201
<li class="blockList">
202
<!-- ============ METHOD DETAIL ========== -->
203
<ul class="blockList">
204
<li class="blockList"><a name="method_detail">
205
<!--   -->
206
</a>
207
<h3>Method Detail</h3>
208
<a name="keyDown(int)">
209
<!--   -->
210
</a>
211
<ul class="blockList">
212
<li class="blockList">
213
<h4>keyDown</h4>
214
<pre>boolean&nbsp;keyDown(int&nbsp;keycode)</pre>
215
<div class="block">Called when a key was pressed</div>
216
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>keycode</code> - one of the constants in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a></dd>
217
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
218
</li>
219
</ul>
220
<a name="keyUp(int)">
221
<!--   -->
222
</a>
223
<ul class="blockList">
224
<li class="blockList">
225
<h4>keyUp</h4>
226
<pre>boolean&nbsp;keyUp(int&nbsp;keycode)</pre>
227
<div class="block">Called when a key was released</div>
228
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>keycode</code> - one of the constants in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a></dd>
229
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
230
</li>
231
</ul>
232
<a name="keyTyped(char)">
233
<!--   -->
234
</a>
235
<ul class="blockList">
236
<li class="blockList">
237
<h4>keyTyped</h4>
238
<pre>boolean&nbsp;keyTyped(char&nbsp;character)</pre>
239
<div class="block">Called when a key was typed</div>
240
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>character</code> - The character</dd>
241
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
242
</li>
243
</ul>
244
<a name="touchDown(int, int, int, int)">
245
<!--   -->
246
</a>
247
<ul class="blockList">
248
<li class="blockList">
249
<h4>touchDown</h4>
250
<pre>boolean&nbsp;touchDown(int&nbsp;screenX,
251
                int&nbsp;screenY,
252
                int&nbsp;pointer,
253
                int&nbsp;button)</pre>
254
<div class="block">Called when the screen was touched or a mouse button was pressed. The button parameter will be <a href="../../../com/badlogic/gdx/Input.Buttons.html#LEFT"><code>Input.Buttons.LEFT</code></a> on
255
 Android.</div>
256
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>screenX</code> - The x coordinate, origin is in the upper left corner</dd><dd><code>screenY</code> - The y coordinate, origin is in the upper left corner</dd><dd><code>pointer</code> - the pointer for the event.</dd><dd><code>button</code> - the button</dd>
257
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
258
</li>
259
</ul>
260
<a name="touchUp(int, int, int, int)">
261
<!--   -->
262
</a>
263
<ul class="blockList">
264
<li class="blockList">
265
<h4>touchUp</h4>
266
<pre>boolean&nbsp;touchUp(int&nbsp;screenX,
267
              int&nbsp;screenY,
268
              int&nbsp;pointer,
269
              int&nbsp;button)</pre>
270
<div class="block">Called when a finger was lifted or a mouse button was released. The button parameter will be <a href="../../../com/badlogic/gdx/Input.Buttons.html#LEFT"><code>Input.Buttons.LEFT</code></a> on
271
 Android.</div>
272
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pointer</code> - the pointer for the event.</dd><dd><code>button</code> - the button</dd>
273
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
274
</li>
275
</ul>
276
<a name="touchDragged(int, int, int)">
277
<!--   -->
278
</a>
279
<ul class="blockList">
280
<li class="blockList">
281
<h4>touchDragged</h4>
282
<pre>boolean&nbsp;touchDragged(int&nbsp;screenX,
283
                   int&nbsp;screenY,
284
                   int&nbsp;pointer)</pre>
285
<div class="block">Called when a finger or the mouse was dragged.</div>
286
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pointer</code> - the pointer for the event.</dd>
287
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
288
</li>
289
</ul>
290
<a name="mouseMoved(int, int)">
291
<!--   -->
292
</a>
293
<ul class="blockList">
294
<li class="blockList">
295
<h4>mouseMoved</h4>
296
<pre>boolean&nbsp;mouseMoved(int&nbsp;screenX,
297
                 int&nbsp;screenY)</pre>
298
<div class="block">Called when the mouse was moved without any buttons being pressed. Will not be called on Android.</div>
299
<dl><dt><span class="strong">Returns:</span></dt><dd>whether the input was processed</dd></dl>
300
</li>
301
</ul>
302
<a name="scrolled(int)">
303
<!--   -->
304
</a>
305
<ul class="blockListLast">
306
<li class="blockList">
307
<h4>scrolled</h4>
308
<pre>boolean&nbsp;scrolled(int&nbsp;amount)</pre>
309
<div class="block">Called when the mouse wheel was scrolled. Will not be called on Android.</div>
310
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>amount</code> - the scroll amount, -1 or 1 depending on the direction the wheel was scrolled.</dd>
311
<dt><span class="strong">Returns:</span></dt><dd>whether the input was processed.</dd></dl>
312
</li>
313
</ul>
314
</li>
315
</ul>
316
</li>
317
</ul>
318
</div>
319
</div>
320
<!-- ========= END OF CLASS DATA ========= -->
321
<!-- ======= START OF BOTTOM NAVBAR ====== -->
322
<div class="bottomNav"><a name="navbar_bottom">
323
<!--   -->
324
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
325
<!--   -->
326
</a>
327
<ul class="navList" title="Navigation">
328
<li><a href="../../../overview-summary.html">Overview</a></li>
329
<li><a href="package-summary.html">Package</a></li>
330
<li class="navBarCell1Rev">Class</li>
331
<li><a href="class-use/InputProcessor.html">Use</a></li>
332
<li><a href="package-tree.html">Tree</a></li>
333
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
334
<li><a href="../../../index-all.html">Index</a></li>
335
<li><a href="../../../help-doc.html">Help</a></li>
336
</ul>
337
<div class="aboutLanguage"><em>libgdx API</em></div>
338
</div>
339
<div class="subNav">
340
<ul class="navList">
341
<li><a href="../../../com/badlogic/gdx/InputMultiplexer.html" title="class in com.badlogic.gdx"><span class="strong">Prev Class</span></a></li>
342
<li><a href="../../../com/badlogic/gdx/InputProcessorQueue.html" title="class in com.badlogic.gdx"><span class="strong">Next Class</span></a></li>
343
</ul>
344
<ul class="navList">
345
<li><a href="../../../index.html?com/badlogic/gdx/InputProcessor.html" target="_top">Frames</a></li>
346
<li><a href="InputProcessor.html" target="_top">No Frames</a></li>
347
</ul>
348
<ul class="navList" id="allclasses_navbar_bottom">
349
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
350
</ul>
351
<div>
352
<script type="text/javascript"><!--
353
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
354
  if(window==top) {
355
    allClassesLink.style.display = "block";
356
  }
357
  else {
358
    allClassesLink.style.display = "none";
359
  }
360
  //-->
361
</script>
362
</div>
363
<div>
364
<ul class="subNavList">
365
<li>Summary:&nbsp;</li>
366
<li>Nested&nbsp;|&nbsp;</li>
367
<li>Field&nbsp;|&nbsp;</li>
368
<li>Constr&nbsp;|&nbsp;</li>
369
<li><a href="#method_summary">Method</a></li>
370
</ul>
371
<ul class="subNavList">
372
<li>Detail:&nbsp;</li>
373
<li>Field&nbsp;|&nbsp;</li>
374
<li>Constr&nbsp;|&nbsp;</li>
375
<li><a href="#method_detail">Method</a></li>
376
</ul>
377
</div>
378
<a name="skip-navbar_bottom">
379
<!--   -->
380
</a></div>
381
<!-- ======== END OF BOTTOM NAVBAR ======= -->
382
<p class="legalCopy"><small>
383
                                <div style="font-size:9pt"><i>
384
                                Copyright &copy; 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
385
                                </i></div>
386
                        </small></p>
387
</body>
388
</html>