Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:39 CET 2013 -->
<title>Input (libgdx API)</title>
<meta name="date" content="2013-11-03">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
   if (location.href.indexOf('is-external=true') == -1) {
       parent.document.title="Input (libgdx API)";
   }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Input.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
                                libgdx API
                                <style>
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
                                .TableHeadingColor { background:#EEEEFF; }
                                a { text-decoration:none }
                                a:hover { text-decoration:underline }
                                a:link, a:visited { color:blue }
                                table { border:0px }
                                .TableRowColor td:first-child { border-left:1px solid black }
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
                                hr { border:0px; border-bottom:1px solid #333366; }
                                </style>
                        </em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/badlogic/gdx/Graphics.GraphicsType.html" title="enum in com.badlogic.gdx"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/badlogic/gdx/Input.html" target="_top">Frames</a></li>
<li><a href="Input.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
 allClassesLink = document.getElementById("allclasses_navbar_top");
 if(window==top) {
   allClassesLink.style.display = "block";
 }
 else {
   allClassesLink.style.display = "none";
 }
 //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.badlogic.gdx</div>
<h2 title="Interface Input" class="title">Interface Input</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../com/badlogic/gdx/input/RemoteInput.html" title="class in com.badlogic.gdx.input">RemoteInput</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">Input</span></pre>
<div class="block"><p>
 Interface to the input facilities. This allows polling the state of the keyboard, the touch screen and the accelerometer. On
 some backends (desktop, gwt, etc) the touch screen is replaced by mouse input. The accelerometer is of course not available on
 all backends.
 </p>
 
 <p>
 Instead of polling for events, one can process all input events with an <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a>. You can set the InputProcessor via the
 <a href="../../../com/badlogic/gdx/Input.html#setInputProcessor(com.badlogic.gdx.InputProcessor)"><code>setInputProcessor(InputProcessor)</code></a> method. It will be called before the <a href="../../../com/badlogic/gdx/ApplicationListener.html#render()"><code>ApplicationListener.render()</code></a> method in
 each frame.
 </p>
 
 <p>
 Keyboard keys are translated to the constants in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a> transparently on all systems. Do not use system specific key
 constants.
 </p>
 
 <p>
 The class also offers methods to use (and test for the presence of) other input systems like vibration, compass,
 on-screen keyboards, and cursor capture.  Support for simple input dialogs is also provided.
 </p></div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>mzechner</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx">Input.Buttons</a></strong></code>
<div class="block">Mouse buttons.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx">Input.Keys</a></strong></code>
<div class="block">Keys.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a></strong></code>
<div class="block">Enumeration of potentially available peripherals.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a></strong></code>
<div class="block">Callback interface for <a href="../../../com/badlogic/gdx/Input.html#getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)"><code>getTextInput(TextInputListener, String, String)</code></a></div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#cancelVibrate()">cancelVibrate</a></strong>()</code>
<div class="block">Stops the vibrator</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerX()">getAccelerometerX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerY()">getAccelerometerY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerZ()">getAccelerometerZ</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getAzimuth()">getAzimuth</a></strong>()</code>
<div class="block">The azimuth is the angle of the device's orientation around the z-axis.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getCurrentEventTime()">getCurrentEventTime</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getDeltaX()">getDeltaX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getDeltaX(int)">getDeltaX</a></strong>(int&nbsp;pointer)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getDeltaY()">getDeltaY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getDeltaY(int)">getDeltaY</a></strong>(int&nbsp;pointer)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getInputProcessor()">getInputProcessor</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getNativeOrientation()">getNativeOrientation</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getPitch()">getPitch</a></strong>()</code>
<div class="block">The pitch is the angle of the device's orientation around the x-axis.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getPlaceholderTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">getPlaceholderTextInput</a></strong>(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a>&nbsp;listener,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;placeholder)</code>
<div class="block">System dependent method to input a string of text.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getRoll()">getRoll</a></strong>()</code>
<div class="block">The roll is the angle of the device's orientation around the y-axis.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getRotation()">getRotation</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getRotationMatrix(float[])">getRotationMatrix</a></strong>(float[]&nbsp;matrix)</code>
<div class="block">Returns the rotation matrix describing the devices rotation as per <a href=
"http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])"
>SensorManager#getRotationMatrix(float[], float[], float[], float[])</a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">getTextInput</a></strong>(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a>&nbsp;listener,
            java.lang.String&nbsp;title,
            java.lang.String&nbsp;text)</code>
<div class="block">System dependent method to input a string of text.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getX()">getX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getX(int)">getX</a></strong>(int&nbsp;pointer)</code>
<div class="block">Returns the x coordinate in screen coordinates of the given pointer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getY()">getY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#getY(int)">getY</a></strong>(int&nbsp;pointer)</code>
<div class="block">Returns the y coordinate in screen coordinates of the given pointer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isButtonPressed(int)">isButtonPressed</a></strong>(int&nbsp;button)</code>
<div class="block">Whether a given button is pressed or not.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isCursorCatched()">isCursorCatched</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isKeyPressed(int)">isKeyPressed</a></strong>(int&nbsp;key)</code>
<div class="block">Returns whether the key is pressed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral)">isPeripheralAvailable</a></strong>(<a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a>&nbsp;peripheral)</code>
<div class="block">Queries whether a <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a> is currently available.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isTouched()">isTouched</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#isTouched(int)">isTouched</a></strong>(int&nbsp;pointer)</code>
<div class="block">Whether the screen is currently touched by the pointer with the given index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#justTouched()">justTouched</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setCatchBackKey(boolean)">setCatchBackKey</a></strong>(boolean&nbsp;catchBack)</code>
<div class="block">Sets whether the BACK button on Android should be caught.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setCatchMenuKey(boolean)">setCatchMenuKey</a></strong>(boolean&nbsp;catchMenu)</code>
<div class="block">Sets whether the MENU button on Android should be caught.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setCursorCatched(boolean)">setCursorCatched</a></strong>(boolean&nbsp;catched)</code>
<div class="block">Only viable on the desktop.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setCursorImage(com.badlogic.gdx.graphics.Pixmap, int, int)">setCursorImage</a></strong>(<a href="../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a>&nbsp;pixmap,
              int&nbsp;xHotspot,
              int&nbsp;yHotspot)</code>
<div class="block">Only viable on the desktop.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setCursorPosition(int, int)">setCursorPosition</a></strong>(int&nbsp;x,
                 int&nbsp;y)</code>
<div class="block">Only viable on the desktop.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setInputProcessor(com.badlogic.gdx.InputProcessor)">setInputProcessor</a></strong>(<a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a>&nbsp;processor)</code>
<div class="block">Sets the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> that will receive all touch and key input events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#setOnscreenKeyboardVisible(boolean)">setOnscreenKeyboardVisible</a></strong>(boolean&nbsp;visible)</code>
<div class="block">Sets the on-screen keyboard visible if available.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#vibrate(int)">vibrate</a></strong>(int&nbsp;milliseconds)</code>
<div class="block">Vibrates for the given amount of time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/badlogic/gdx/Input.html#vibrate(long[], int)">vibrate</a></strong>(long[]&nbsp;pattern,
       int&nbsp;repeat)</code>
<div class="block">Vibrate with a given pattern.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getAccelerometerX()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAccelerometerX</h4>
<pre>float&nbsp;getAccelerometerX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>The value of the accelerometer on its x-axis. ranges between [-10,10].</dd></dl>
</li>
</ul>
<a name="getAccelerometerY()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAccelerometerY</h4>
<pre>float&nbsp;getAccelerometerY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>The value of the accelerometer on its y-axis. ranges between [-10,10].</dd></dl>
</li>
</ul>
<a name="getAccelerometerZ()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAccelerometerZ</h4>
<pre>float&nbsp;getAccelerometerZ()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>The value of the accelerometer on its y-axis. ranges between [-10,10].</dd></dl>
</li>
</ul>
<a name="getX()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getX</h4>
<pre>int&nbsp;getX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the last touch x coordinate for the first pointer in screen coordinates. The screen origin is the top left corner.</dd></dl>
</li>
</ul>
<a name="getX(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getX</h4>
<pre>int&nbsp;getX(int&nbsp;pointer)</pre>
<div class="block">Returns the x coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
 identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
 the touch screen the first free index will be used.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pointer</code> - the pointer id.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the x coordinate</dd></dl>
</li>
</ul>
<a name="getDeltaX()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeltaX</h4>
<pre>int&nbsp;getDeltaX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the different between the current pointer location and the last pointer location on the x-axis.</dd></dl>
</li>
</ul>
<a name="getDeltaX(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeltaX</h4>
<pre>int&nbsp;getDeltaX(int&nbsp;pointer)</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the different between the current pointer location and the last pointer location on the x-axis.</dd></dl>
</li>
</ul>
<a name="getY()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getY</h4>
<pre>int&nbsp;getY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the last touch y coordinate for the first pointer in screen coordinates. The screen origin is the top left corner.</dd></dl>
</li>
</ul>
<a name="getY(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getY</h4>
<pre>int&nbsp;getY(int&nbsp;pointer)</pre>
<div class="block">Returns the y coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
 identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
 the touch screen the first free index will be used.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pointer</code> - the pointer id.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the y coordinate</dd></dl>
</li>
</ul>
<a name="getDeltaY()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeltaY</h4>
<pre>int&nbsp;getDeltaY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the different between the current pointer location and the last pointer location on the y-axis.</dd></dl>
</li>
</ul>
<a name="getDeltaY(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeltaY</h4>
<pre>int&nbsp;getDeltaY(int&nbsp;pointer)</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the different between the current pointer location and the last pointer location on the y-axis.</dd></dl>
</li>
</ul>
<a name="isTouched()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTouched</h4>
<pre>boolean&nbsp;isTouched()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>whether the screen is currently touched.</dd></dl>
</li>
</ul>
<a name="justTouched()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>justTouched</h4>
<pre>boolean&nbsp;justTouched()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>whether a new touch down event just occured.</dd></dl>
</li>
</ul>
<a name="isTouched(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTouched</h4>
<pre>boolean&nbsp;isTouched(int&nbsp;pointer)</pre>
<div class="block">Whether the screen is currently touched by the pointer with the given index. Pointers are indexed from 0 to n. The pointer
 id identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
 the touch screen the first free index will be used.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pointer</code> - the pointer</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the screen is touched by the pointer</dd></dl>
</li>
</ul>
<a name="isButtonPressed(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isButtonPressed</h4>
<pre>boolean&nbsp;isButtonPressed(int&nbsp;button)</pre>
<div class="block">Whether a given button is pressed or not. Button constants can be found in <a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><code>Input.Buttons</code></a>. On Android only the Button#LEFT
 constant is meaningful.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>button</code> - the button to check.</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the button is down or not.</dd></dl>
</li>
</ul>
<a name="isKeyPressed(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isKeyPressed</h4>
<pre>boolean&nbsp;isKeyPressed(int&nbsp;key)</pre>
<div class="block">Returns whether the key is pressed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - The key code as found in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true or false.</dd></dl>
</li>
</ul>
<a name="getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTextInput</h4>
<pre>void&nbsp;getTextInput(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a>&nbsp;listener,
                java.lang.String&nbsp;title,
                java.lang.String&nbsp;text)</pre>
<div class="block">System dependent method to input a string of text. A dialog box will be created with the given title and the given text as a
 message for the user. Once the dialog has been closed the provided <a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx"><code>Input.TextInputListener</code></a> will be called on the rendering
 thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - The TextInputListener.</dd><dd><code>title</code> - The title of the text input dialog.</dd><dd><code>text</code> - The message presented to the user.</dd></dl>
</li>
</ul>
<a name="getPlaceholderTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlaceholderTextInput</h4>
<pre>void&nbsp;getPlaceholderTextInput(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a>&nbsp;listener,
                           java.lang.String&nbsp;title,
                           java.lang.String&nbsp;placeholder)</pre>
<div class="block">System dependent method to input a string of text. A dialog box will be created with the given title and the given text as a
 hint message for the user. Once the dialog has been closed the provided <a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx"><code>Input.TextInputListener</code></a> will be called on the
 rendering thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - The TextInputListener.</dd><dd><code>title</code> - The title of the text input dialog.</dd><dd><code>placeholder</code> - The placeholder text presented to the user.</dd></dl>
</li>
</ul>
<a name="setOnscreenKeyboardVisible(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOnscreenKeyboardVisible</h4>
<pre>void&nbsp;setOnscreenKeyboardVisible(boolean&nbsp;visible)</pre>
<div class="block">Sets the on-screen keyboard visible if available.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>visible</code> - visible or not</dd></dl>
</li>
</ul>
<a name="vibrate(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vibrate</h4>
<pre>void&nbsp;vibrate(int&nbsp;milliseconds)</pre>
<div class="block">Vibrates for the given amount of time. Note that you'll need the permission
 <code> <uses-permission android:name="android.permission.VIBRATE" /></code> in your manifest file in order for this to work.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>milliseconds</code> - the number of milliseconds to vibrate.</dd></dl>
</li>
</ul>
<a name="vibrate(long[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vibrate</h4>
<pre>void&nbsp;vibrate(long[]&nbsp;pattern,
           int&nbsp;repeat)</pre>
<div class="block">Vibrate with a given pattern. Pass in an array of ints that are the times at which to turn on or off the vibrator. The first
 one is how long to wait before turning it on, and then after that it alternates. If you want to repeat, pass the index into
 the pattern at which to start the repeat.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pattern</code> - an array of longs of times to turn the vibrator on or off.</dd><dd><code>repeat</code> - the index into pattern at which to repeat, or -1 if you don't want to repeat.</dd></dl>
</li>
</ul>
<a name="cancelVibrate()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cancelVibrate</h4>
<pre>void&nbsp;cancelVibrate()</pre>
<div class="block">Stops the vibrator</div>
</li>
</ul>
<a name="getAzimuth()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAzimuth</h4>
<pre>float&nbsp;getAzimuth()</pre>
<div class="block">The azimuth is the angle of the device's orientation around the z-axis. The positive z-axis points towards the earths
 center.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the azimuth in degrees</dd><dt><span class="strong">See Also:</span></dt><dd><a
     href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd></dl>
</li>
</ul>
<a name="getPitch()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPitch</h4>
<pre>float&nbsp;getPitch()</pre>
<div class="block">The pitch is the angle of the device's orientation around the x-axis. The positive x-axis roughly points to the west and is
 orthogonal to the z- and y-axis.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the pitch in degrees</dd><dt><span class="strong">See Also:</span></dt><dd><a
     href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd></dl>
</li>
</ul>
<a name="getRoll()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRoll</h4>
<pre>float&nbsp;getRoll()</pre>
<div class="block">The roll is the angle of the device's orientation around the y-axis. The positive y-axis points to the magnetic north pole
 of the earth.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the roll in degrees</dd><dt><span class="strong">See Also:</span></dt><dd><a
     href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd></dl>
</li>
</ul>
<a name="getRotationMatrix(float[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRotationMatrix</h4>
<pre>void&nbsp;getRotationMatrix(float[]&nbsp;matrix)</pre>
<div class="block">Returns the rotation matrix describing the devices rotation as per <a href=
"http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])"
>SensorManager#getRotationMatrix(float[], float[], float[], float[])</a>. Does not manipulate the matrix if the platform
 does not have an accelerometer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - </dd></dl>
</li>
</ul>
<a name="getCurrentEventTime()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentEventTime</h4>
<pre>long&nbsp;getCurrentEventTime()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the time of the event currently reported to the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a>.</dd></dl>
</li>
</ul>
<a name="setCatchBackKey(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCatchBackKey</h4>
<pre>void&nbsp;setCatchBackKey(boolean&nbsp;catchBack)</pre>
<div class="block">Sets whether the BACK button on Android should be caught. This will prevent the app from being paused. Will have no effect
 on the desktop.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>catchBack</code> - whether to catch the back button</dd></dl>
</li>
</ul>
<a name="setCatchMenuKey(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCatchMenuKey</h4>
<pre>void&nbsp;setCatchMenuKey(boolean&nbsp;catchMenu)</pre>
<div class="block">Sets whether the MENU button on Android should be caught. This will prevent the onscreen keyboard to show up. Will have no
 effect on the desktop.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>catchMenu</code> - whether to catch the back button</dd></dl>
</li>
</ul>
<a name="setInputProcessor(com.badlogic.gdx.InputProcessor)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInputProcessor</h4>
<pre>void&nbsp;setInputProcessor(<a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a>&nbsp;processor)</pre>
<div class="block">Sets the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> that will receive all touch and key input events. It will be called before the
 <a href="../../../com/badlogic/gdx/ApplicationListener.html#render()"><code>ApplicationListener.render()</code></a> method each frame.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>processor</code> - the InputProcessor</dd></dl>
</li>
</ul>
<a name="getInputProcessor()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputProcessor</h4>
<pre><a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a>&nbsp;getInputProcessor()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the currently set <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> or null.</dd></dl>
</li>
</ul>
<a name="isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPeripheralAvailable</h4>
<pre>boolean&nbsp;isPeripheralAvailable(<a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a>&nbsp;peripheral)</pre>
<div class="block">Queries whether a <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a> is currently available. In case of Android and the <a href="../../../com/badlogic/gdx/Input.Peripheral.html#HardwareKeyboard"><code>Input.Peripheral.HardwareKeyboard</code></a>
 this returns the whether the keyboard is currently slid out or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>peripheral</code> - the <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the peripheral is available or not.</dd></dl>
</li>
</ul>
<a name="getRotation()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRotation</h4>
<pre>int&nbsp;getRotation()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the rotation of the device with respect to its native orientation.</dd></dl>
</li>
</ul>
<a name="getNativeOrientation()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNativeOrientation</h4>
<pre><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a>&nbsp;getNativeOrientation()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the native orientation of the device.</dd></dl>
</li>
</ul>
<a name="setCursorCatched(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCursorCatched</h4>
<pre>void&nbsp;setCursorCatched(boolean&nbsp;catched)</pre>
<div class="block">Only viable on the desktop. Will confine the mouse cursor location to the window and hide the mouse cursor.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>catched</code> - whether to catch or not to catch the mouse cursor</dd></dl>
</li>
</ul>
<a name="isCursorCatched()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCursorCatched</h4>
<pre>boolean&nbsp;isCursorCatched()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>whether the mouse cursor is catched.</dd></dl>
</li>
</ul>
<a name="setCursorPosition(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCursorPosition</h4>
<pre>void&nbsp;setCursorPosition(int&nbsp;x,
                     int&nbsp;y)</pre>
<div class="block">Only viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the x-position</dd><dd><code>y</code> - the y-position</dd></dl>
</li>
</ul>
<a name="setCursorImage(com.badlogic.gdx.graphics.Pixmap, int, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setCursorImage</h4>
<pre>void&nbsp;setCursorImage(<a href="../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics">Pixmap</a>&nbsp;pixmap,
                  int&nbsp;xHotspot,
                  int&nbsp;yHotspot)</pre>
<div class="block">Only viable on the desktop. Will set the mouse cursor image to the image represented by the <a href="../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><code>Pixmap</code></a>.
 The Pixmap must be in RGBA8888 format, width & height must be powers-of-two greater than zero (not necessarily equal), and alpha transparency must be single-bit (i.e., 0x00 or 0xFF only).
To revert to the default operating system cursor, pass in a null Pixmap; xHotspot & yHotspot are ignored in this case.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pixmap</code> - the mouse cursor image as a <a href="../../../com/badlogic/gdx/graphics/Pixmap.html" title="class in com.badlogic.gdx.graphics"><code>Pixmap</code></a>, or null to revert to the default operating system cursor</dd><dd><code>xHotspot</code> - the x location of the hotspot pixel within the cursor image (origin top-left corner)</dd><dd><code>yHotspot</code> - the y location of the hotspot pixel within the cursor image (origin top-left corner)</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Input.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>libgdx API</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/badlogic/gdx/Graphics.GraphicsType.html" title="enum in com.badlogic.gdx"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/badlogic/gdx/Input.html" target="_top">Frames</a></li>
<li><a href="Input.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
 allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                                <div style="font-size:9pt"><i>
                                Copyright &copy; 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
                                </i></div>
                        </small></p>
</body>
</html>