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:43 CET 2013 -->
6
<title>GestureDetector.GestureListener (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="GestureDetector.GestureListener (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/GestureDetector.GestureListener.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/input/GestureDetector.GestureAdapter.html" title="class in com.badlogic.gdx.input"><span class="strong">Prev Class</span></a></li>
56
<li><a href="../../../../com/badlogic/gdx/input/RemoteInput.html" title="class in com.badlogic.gdx.input"><span class="strong">Next Class</span></a></li>
57
</ul>
58
<ul class="navList">
59
<li><a href="../../../../index.html?com/badlogic/gdx/input/GestureDetector.GestureListener.html" target="_top">Frames</a></li>
60
<li><a href="GestureDetector.GestureListener.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.input</div>
99
<h2 title="Interface GestureDetector.GestureListener" class="title">Interface GestureDetector.GestureListener</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.CameraGestureListener.html" title="class in com.badlogic.gdx.graphics.g3d.utils">CameraInputController.CameraGestureListener</a>, <a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureAdapter.html" title="class in com.badlogic.gdx.input">GestureDetector.GestureAdapter</a></dd>
108
</dl>
109
<dl>
110
<dt>Enclosing class:</dt>
111
<dd><a href="../../../../com/badlogic/gdx/input/GestureDetector.html" title="class in com.badlogic.gdx.input">GestureDetector</a></dd>
112
</dl>
113
<hr>
114
<br>
115
<pre>public static interface <span class="strong">GestureDetector.GestureListener</span></pre>
116
<div class="block">Register an instance of this class with a <a href="../../../../com/badlogic/gdx/input/GestureDetector.html" title="class in com.badlogic.gdx.input"><code>GestureDetector</code></a> to receive gestures such as taps, long presses, flings,
117
 panning or pinch zooming. Each method returns a boolean indicating if the event should be handed to the next listener (false
118
 to hand it to the next listener, true otherwise).</div>
119
<dl><dt><span class="strong">Author:</span></dt>
120
  <dd>mzechner</dd></dl>
121
</li>
122
</ul>
123
</div>
124
<div class="summary">
125
<ul class="blockList">
126
<li class="blockList">
127
<!-- ========== METHOD SUMMARY =========== -->
128
<ul class="blockList">
129
<li class="blockList"><a name="method_summary">
130
<!--   -->
131
</a>
132
<h3>Method Summary</h3>
133
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
134
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
135
<tr>
136
<th class="colFirst" scope="col">Modifier and Type</th>
137
<th class="colLast" scope="col">Method and Description</th>
138
</tr>
139
<tr class="altColor">
140
<td class="colFirst"><code>boolean</code></td>
141
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#fling(float, float, int)">fling</a></strong>(float&nbsp;velocityX,
142
     float&nbsp;velocityY,
143
     int&nbsp;button)</code>
144
<div class="block">Called when the user dragged a finger over the screen and lifted it.</div>
145
</td>
146
</tr>
147
<tr class="rowColor">
148
<td class="colFirst"><code>boolean</code></td>
149
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#longPress(float, float)">longPress</a></strong>(float&nbsp;x,
150
         float&nbsp;y)</code>&nbsp;</td>
151
</tr>
152
<tr class="altColor">
153
<td class="colFirst"><code>boolean</code></td>
154
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#pan(float, float, float, float)">pan</a></strong>(float&nbsp;x,
155
   float&nbsp;y,
156
   float&nbsp;deltaX,
157
   float&nbsp;deltaY)</code>
158
<div class="block">Called when the user drags a finger over the screen.</div>
159
</td>
160
</tr>
161
<tr class="rowColor">
162
<td class="colFirst"><code>boolean</code></td>
163
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#panStop(float, float, int, int)">panStop</a></strong>(float&nbsp;x,
164
       float&nbsp;y,
165
       int&nbsp;pointer,
166
       int&nbsp;button)</code>
167
<div class="block">Called when no longer panning.</div>
168
</td>
169
</tr>
170
<tr class="altColor">
171
<td class="colFirst"><code>boolean</code></td>
172
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#pinch(com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2)">pinch</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;initialPointer1,
173
     <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;initialPointer2,
174
     <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;pointer1,
175
     <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;pointer2)</code>
176
<div class="block">Called when a user performs a pinch zoom gesture.</div>
177
</td>
178
</tr>
179
<tr class="rowColor">
180
<td class="colFirst"><code>boolean</code></td>
181
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#tap(float, float, int, int)">tap</a></strong>(float&nbsp;x,
182
   float&nbsp;y,
183
   int&nbsp;count,
184
   int&nbsp;button)</code>
185
<div class="block">Called when a tap occured.</div>
186
</td>
187
</tr>
188
<tr class="altColor">
189
<td class="colFirst"><code>boolean</code></td>
190
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#touchDown(float, float, int, int)">touchDown</a></strong>(float&nbsp;x,
191
         float&nbsp;y,
192
         int&nbsp;pointer,
193
         int&nbsp;button)</code>&nbsp;</td>
194
</tr>
195
<tr class="rowColor">
196
<td class="colFirst"><code>boolean</code></td>
197
<td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureListener.html#zoom(float, float)">zoom</a></strong>(float&nbsp;initialDistance,
198
    float&nbsp;distance)</code>
199
<div class="block">Called when the user performs a pinch zoom gesture.</div>
200
</td>
201
</tr>
202
</table>
203
</li>
204
</ul>
205
</li>
206
</ul>
207
</div>
208
<div class="details">
209
<ul class="blockList">
210
<li class="blockList">
211
<!-- ============ METHOD DETAIL ========== -->
212
<ul class="blockList">
213
<li class="blockList"><a name="method_detail">
214
<!--   -->
215
</a>
216
<h3>Method Detail</h3>
217
<a name="touchDown(float, float, int, int)">
218
<!--   -->
219
</a>
220
<ul class="blockList">
221
<li class="blockList">
222
<h4>touchDown</h4>
223
<pre>boolean&nbsp;touchDown(float&nbsp;x,
224
                float&nbsp;y,
225
                int&nbsp;pointer,
226
                int&nbsp;button)</pre>
227
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../com/badlogic/gdx/InputProcessor.html#touchDown(int, int, int, int)"><code>InputProcessor.touchDown(int, int, int, int)</code></a></dd></dl>
228
</li>
229
</ul>
230
<a name="tap(float, float, int, int)">
231
<!--   -->
232
</a>
233
<ul class="blockList">
234
<li class="blockList">
235
<h4>tap</h4>
236
<pre>boolean&nbsp;tap(float&nbsp;x,
237
          float&nbsp;y,
238
          int&nbsp;count,
239
          int&nbsp;button)</pre>
240
<div class="block">Called when a tap occured. A tap happens if a touch went down on the screen and was lifted again without moving outside
241
 of the tap square. The tap square is a rectangular area around the initial touch position as specified on construction
242
 time of the <a href="../../../../com/badlogic/gdx/input/GestureDetector.html" title="class in com.badlogic.gdx.input"><code>GestureDetector</code></a>.</div>
243
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>count</code> - the number of taps.</dd></dl>
244
</li>
245
</ul>
246
<a name="longPress(float, float)">
247
<!--   -->
248
</a>
249
<ul class="blockList">
250
<li class="blockList">
251
<h4>longPress</h4>
252
<pre>boolean&nbsp;longPress(float&nbsp;x,
253
                float&nbsp;y)</pre>
254
</li>
255
</ul>
256
<a name="fling(float, float, int)">
257
<!--   -->
258
</a>
259
<ul class="blockList">
260
<li class="blockList">
261
<h4>fling</h4>
262
<pre>boolean&nbsp;fling(float&nbsp;velocityX,
263
            float&nbsp;velocityY,
264
            int&nbsp;button)</pre>
265
<div class="block">Called when the user dragged a finger over the screen and lifted it. Reports the last known velocity of the finger in
266
 pixels per second.</div>
267
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>velocityX</code> - velocity on x in seconds</dd><dd><code>velocityY</code> - velocity on y in seconds</dd></dl>
268
</li>
269
</ul>
270
<a name="pan(float, float, float, float)">
271
<!--   -->
272
</a>
273
<ul class="blockList">
274
<li class="blockList">
275
<h4>pan</h4>
276
<pre>boolean&nbsp;pan(float&nbsp;x,
277
          float&nbsp;y,
278
          float&nbsp;deltaX,
279
          float&nbsp;deltaY)</pre>
280
<div class="block">Called when the user drags a finger over the screen.</div>
281
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>deltaX</code> - the difference in pixels to the last drag event on x.</dd><dd><code>deltaY</code> - the difference in pixels to the last drag event on y.</dd></dl>
282
</li>
283
</ul>
284
<a name="panStop(float, float, int, int)">
285
<!--   -->
286
</a>
287
<ul class="blockList">
288
<li class="blockList">
289
<h4>panStop</h4>
290
<pre>boolean&nbsp;panStop(float&nbsp;x,
291
              float&nbsp;y,
292
              int&nbsp;pointer,
293
              int&nbsp;button)</pre>
294
<div class="block">Called when no longer panning.</div>
295
</li>
296
</ul>
297
<a name="zoom(float, float)">
298
<!--   -->
299
</a>
300
<ul class="blockList">
301
<li class="blockList">
302
<h4>zoom</h4>
303
<pre>boolean&nbsp;zoom(float&nbsp;initialDistance,
304
           float&nbsp;distance)</pre>
305
<div class="block">Called when the user performs a pinch zoom gesture. The original distance is the distance in pixels when the gesture
306
 started.</div>
307
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialDistance</code> - distance between fingers when the gesture started.</dd><dd><code>distance</code> - current distance between fingers.</dd></dl>
308
</li>
309
</ul>
310
<a name="pinch(com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2, com.badlogic.gdx.math.Vector2)">
311
<!--   -->
312
</a>
313
<ul class="blockListLast">
314
<li class="blockList">
315
<h4>pinch</h4>
316
<pre>boolean&nbsp;pinch(<a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;initialPointer1,
317
            <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;initialPointer2,
318
            <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;pointer1,
319
            <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>&nbsp;pointer2)</pre>
320
<div class="block">Called when a user performs a pinch zoom gesture. Reports the initial positions of the two involved fingers and their
321
 current positions.</div>
322
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialPointer1</code> - </dd><dd><code>initialPointer2</code> - </dd><dd><code>pointer1</code> - </dd><dd><code>pointer2</code> - </dd></dl>
323
</li>
324
</ul>
325
</li>
326
</ul>
327
</li>
328
</ul>
329
</div>
330
</div>
331
<!-- ========= END OF CLASS DATA ========= -->
332
<!-- ======= START OF BOTTOM NAVBAR ====== -->
333
<div class="bottomNav"><a name="navbar_bottom">
334
<!--   -->
335
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
336
<!--   -->
337
</a>
338
<ul class="navList" title="Navigation">
339
<li><a href="../../../../overview-summary.html">Overview</a></li>
340
<li><a href="package-summary.html">Package</a></li>
341
<li class="navBarCell1Rev">Class</li>
342
<li><a href="class-use/GestureDetector.GestureListener.html">Use</a></li>
343
<li><a href="package-tree.html">Tree</a></li>
344
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
345
<li><a href="../../../../index-all.html">Index</a></li>
346
<li><a href="../../../../help-doc.html">Help</a></li>
347
</ul>
348
<div class="aboutLanguage"><em>libgdx API</em></div>
349
</div>
350
<div class="subNav">
351
<ul class="navList">
352
<li><a href="../../../../com/badlogic/gdx/input/GestureDetector.GestureAdapter.html" title="class in com.badlogic.gdx.input"><span class="strong">Prev Class</span></a></li>
353
<li><a href="../../../../com/badlogic/gdx/input/RemoteInput.html" title="class in com.badlogic.gdx.input"><span class="strong">Next Class</span></a></li>
354
</ul>
355
<ul class="navList">
356
<li><a href="../../../../index.html?com/badlogic/gdx/input/GestureDetector.GestureListener.html" target="_top">Frames</a></li>
357
<li><a href="GestureDetector.GestureListener.html" target="_top">No Frames</a></li>
358
</ul>
359
<ul class="navList" id="allclasses_navbar_bottom">
360
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
361
</ul>
362
<div>
363
<script type="text/javascript"><!--
364
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
365
  if(window==top) {
366
    allClassesLink.style.display = "block";
367
  }
368
  else {
369
    allClassesLink.style.display = "none";
370
  }
371
  //-->
372
</script>
373
</div>
374
<div>
375
<ul class="subNavList">
376
<li>Summary:&nbsp;</li>
377
<li>Nested&nbsp;|&nbsp;</li>
378
<li>Field&nbsp;|&nbsp;</li>
379
<li>Constr&nbsp;|&nbsp;</li>
380
<li><a href="#method_summary">Method</a></li>
381
</ul>
382
<ul class="subNavList">
383
<li>Detail:&nbsp;</li>
384
<li>Field&nbsp;|&nbsp;</li>
385
<li>Constr&nbsp;|&nbsp;</li>
386
<li><a href="#method_detail">Method</a></li>
387
</ul>
388
</div>
389
<a name="skip-navbar_bottom">
390
<!--   -->
391
</a></div>
392
<!-- ======== END OF BOTTOM NAVBAR ======= -->
393
<p class="legalCopy"><small>
394
                                <div style="font-size:9pt"><i>
395
                                Copyright &copy; 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
396
                                </i></div>
397
                        </small></p>
398
</body>
399
</html>