opsu-dance/lib/lwjgl-2.9.1/javadoc/org/lwjgl/input/Mouse.html
2014-06-29 22:17:04 -04:00

815 lines
31 KiB
HTML

<!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 Mon Dec 02 20:33:00 CET 2013 -->
<title>Mouse (LWJGL API)</title>
<meta name="date" content="2013-12-02">
<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="Mouse (LWJGL 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/Mouse.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/lwjgl/input/Mouse.html" target="_top">Frames</a></li>
<li><a href="Mouse.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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">org.lwjgl.input</div>
<h2 title="Class Mouse" class="title">Class Mouse</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.lwjgl.input.Mouse</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Mouse</span>
extends java.lang.Object</pre>
<div class="block"><br>
A raw Mouse interface. This can be used to poll the current state of the
mouse buttons, and determine the mouse movement delta since the last poll.
n buttons supported, n being a native limit. A scrolly wheel is also
supported, if one such is available. Movement is reported as delta from
last position or as an absolute position. If the window has been created
the absolute position will be clamped to 0 - width | height.</div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Revision$
$Id$</dd>
<dt><span class="strong">Author:</span></dt>
<dd>cix_foo <cix_foo@users.sourceforge.net>, elias_naur <elias_naur@users.sourceforge.net>, Brian Matzon <brian@matzon.dk></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#EVENT_SIZE">EVENT_SIZE</a></strong></code>
<div class="block">Internal use - event size in bytes</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>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#create()">create</a></strong>()</code>
<div class="block">"Create" the mouse.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#destroy()">destroy</a></strong>()</code>
<div class="block">"Destroy" the mouse.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getButtonCount()">getButtonCount</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getButtonIndex(java.lang.String)">getButtonIndex</a></strong>(java.lang.String&nbsp;buttonName)</code>
<div class="block">Get's a button's index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getButtonName(int)">getButtonName</a></strong>(int&nbsp;button)</code>
<div class="block">Gets a button's name</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getDWheel()">getDWheel</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getDX()">getDX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getDY()">getDY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventButton()">getEventButton</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventButtonState()">getEventButtonState</a></strong>()</code>
<div class="block">Get the current events button state.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventDWheel()">getEventDWheel</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventDX()">getEventDX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventDY()">getEventDY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventNanoseconds()">getEventNanoseconds</a></strong>()</code>
<div class="block">Gets the time in nanoseconds of the current event.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventX()">getEventX</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getEventY()">getEventY</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getNativeCursor()">getNativeCursor</a></strong>()</code>
<div class="block">Gets the currently bound native cursor, if any.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getX()">getX</a></strong>()</code>
<div class="block">Retrieves the absolute position.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#getY()">getY</a></strong>()</code>
<div class="block">Retrieves the absolute position.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#hasWheel()">hasWheel</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#isButtonDown(int)">isButtonDown</a></strong>(int&nbsp;button)</code>
<div class="block">See if a particular mouse button is down.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#isClipMouseCoordinatesToWindow()">isClipMouseCoordinatesToWindow</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#isCreated()">isCreated</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#isGrabbed()">isGrabbed</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#isInsideWindow()">isInsideWindow</a></strong>()</code>
<div class="block">Retrieves whether or not the mouse cursor is within the bounds of the window.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#next()">next</a></strong>()</code>
<div class="block">Gets the next mouse event.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#poll()">poll</a></strong>()</code>
<div class="block">Polls the mouse for its current state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#setClipMouseCoordinatesToWindow(boolean)">setClipMouseCoordinatesToWindow</a></strong>(boolean&nbsp;clip)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#setCursorPosition(int, int)">setCursorPosition</a></strong>(int&nbsp;new_x,
int&nbsp;new_y)</code>
<div class="block">Set the position of the cursor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#setGrabbed(boolean)">setGrabbed</a></strong>(boolean&nbsp;grab)</code>
<div class="block">Sets whether or not the mouse has grabbed the cursor
(and thus hidden).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#setNativeCursor(org.lwjgl.input.Cursor)">setNativeCursor</a></strong>(<a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a>&nbsp;cursor)</code>
<div class="block">Binds a native cursor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Mouse.html#updateCursor()">updateCursor</a></strong>()</code>
<div class="block">Updates the cursor, so that animation can be changed if needed.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="EVENT_SIZE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EVENT_SIZE</h4>
<pre>public static final&nbsp;int EVENT_SIZE</pre>
<div class="block">Internal use - event size in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.lwjgl.input.Mouse.EVENT_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getNativeCursor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNativeCursor</h4>
<pre>public static&nbsp;<a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a>&nbsp;getNativeCursor()</pre>
<div class="block">Gets the currently bound native cursor, if any.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the currently bound native cursor, if any.</dd></dl>
</li>
</ul>
<a name="setNativeCursor(org.lwjgl.input.Cursor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNativeCursor</h4>
<pre>public static&nbsp;<a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a>&nbsp;setNativeCursor(<a href="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</a>&nbsp;cursor)
throws <a href="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</a></pre>
<div class="block">Binds a native cursor. If the cursor argument is null, any
currently bound native cursor is disabled, and the cursor reverts
to the default operating system supplied cursor.
NOTE: The native cursor is not constrained to the window, but
relative events will not be generated if the cursor is outside.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cursor</code> - the native cursor object to bind. May be null.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The previous Cursor object set, or null.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</a></code> - if the cursor could not be set for any reason</dd></dl>
</li>
</ul>
<a name="isClipMouseCoordinatesToWindow()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClipMouseCoordinatesToWindow</h4>
<pre>public static&nbsp;boolean&nbsp;isClipMouseCoordinatesToWindow()</pre>
</li>
</ul>
<a name="setClipMouseCoordinatesToWindow(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setClipMouseCoordinatesToWindow</h4>
<pre>public static&nbsp;void&nbsp;setClipMouseCoordinatesToWindow(boolean&nbsp;clip)</pre>
</li>
</ul>
<a name="setCursorPosition(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCursorPosition</h4>
<pre>public static&nbsp;void&nbsp;setCursorPosition(int&nbsp;new_x,
int&nbsp;new_y)</pre>
<div class="block">Set the position of the cursor. If the cursor is not grabbed,
the native cursor is moved to the new position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>new_x</code> - The x coordinate of the new cursor position in OpenGL coordinates relative
to the window origin.</dd><dd><code>new_y</code> - The y coordinate of the new cursor position in OpenGL coordinates relative
to the window origin.</dd></dl>
</li>
</ul>
<a name="create()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;void&nbsp;create()
throws <a href="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</a></pre>
<div class="block">"Create" the mouse. The display must first have been created.
Initially, the mouse is not grabbed and the delta values are reported
with respect to the center of the display.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</a></code> - if the mouse could not be created for any reason</dd></dl>
</li>
</ul>
<a name="isCreated()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCreated</h4>
<pre>public static&nbsp;boolean&nbsp;isCreated()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mouse has been created</dd></dl>
</li>
</ul>
<a name="destroy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>destroy</h4>
<pre>public static&nbsp;void&nbsp;destroy()</pre>
<div class="block">"Destroy" the mouse.</div>
</li>
</ul>
<a name="poll()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>poll</h4>
<pre>public static&nbsp;void&nbsp;poll()</pre>
<div class="block">Polls the mouse for its current state. Access the polled values using the
get<value> methods.
By using this method, it is possible to "miss" mouse click events if you don't
poll fast enough.
To use buffered values, you have to call <code>next</code> for each event you
want to read. You can query which button caused the event by using
<code>getEventButton</code>. To get the state of that button, for that event, use
<code>getEventButtonState</code>.
NOTE: This method does not query the operating system for new events. To do that,
Display.processMessages() (or Display.update()) must be called first.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/lwjgl/input/Mouse.html#next()"><code>next()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getEventButton()"><code>getEventButton()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getEventButtonState()"><code>getEventButtonState()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#isButtonDown(int)"><code>isButtonDown(int button)</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getX()"><code>getX()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getY()"><code>getY()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getDX()"><code>getDX()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getDY()"><code>getDY()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getDWheel()"><code>getDWheel()</code></a></dd></dl>
</li>
</ul>
<a name="isButtonDown(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isButtonDown</h4>
<pre>public static&nbsp;boolean&nbsp;isButtonDown(int&nbsp;button)</pre>
<div class="block">See if a particular mouse button is down.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>button</code> - The index of the button you wish to test (0..getButtonCount-1)</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the specified button is down</dd></dl>
</li>
</ul>
<a name="getButtonName(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getButtonName</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getButtonName(int&nbsp;button)</pre>
<div class="block">Gets a button's name</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>button</code> - The button</dd>
<dt><span class="strong">Returns:</span></dt><dd>a String with the button's human readable name in it or null if the button is unnamed</dd></dl>
</li>
</ul>
<a name="getButtonIndex(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getButtonIndex</h4>
<pre>public static&nbsp;int&nbsp;getButtonIndex(java.lang.String&nbsp;buttonName)</pre>
<div class="block">Get's a button's index. If the button is unrecognised then -1 is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buttonName</code> - The button name</dd></dl>
</li>
</ul>
<a name="next()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre>public static&nbsp;boolean&nbsp;next()</pre>
<div class="block">Gets the next mouse event. You can query which button caused the event by using
<code>getEventButton()</code> (if any). To get the state of that key, for that event, use
<code>getEventButtonState</code>. To get the current mouse delta values use <code>getEventDX()</code>
and <code>getEventDY()</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if a mouse event was read, false otherwise</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/lwjgl/input/Mouse.html#getEventButton()"><code>getEventButton()</code></a>,
<a href="../../../org/lwjgl/input/Mouse.html#getEventButtonState()"><code>getEventButtonState()</code></a></dd></dl>
</li>
</ul>
<a name="getEventButton()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventButton</h4>
<pre>public static&nbsp;int&nbsp;getEventButton()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events button. Returns -1 if no button state was changed</dd></dl>
</li>
</ul>
<a name="getEventButtonState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventButtonState</h4>
<pre>public static&nbsp;boolean&nbsp;getEventButtonState()</pre>
<div class="block">Get the current events button state.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events button state.</dd></dl>
</li>
</ul>
<a name="getEventDX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventDX</h4>
<pre>public static&nbsp;int&nbsp;getEventDX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events delta x.</dd></dl>
</li>
</ul>
<a name="getEventDY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventDY</h4>
<pre>public static&nbsp;int&nbsp;getEventDY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events delta y.</dd></dl>
</li>
</ul>
<a name="getEventX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventX</h4>
<pre>public static&nbsp;int&nbsp;getEventX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events absolute x.</dd></dl>
</li>
</ul>
<a name="getEventY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventY</h4>
<pre>public static&nbsp;int&nbsp;getEventY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events absolute y.</dd></dl>
</li>
</ul>
<a name="getEventDWheel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventDWheel</h4>
<pre>public static&nbsp;int&nbsp;getEventDWheel()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current events delta z</dd></dl>
</li>
</ul>
<a name="getEventNanoseconds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventNanoseconds</h4>
<pre>public static&nbsp;long&nbsp;getEventNanoseconds()</pre>
<div class="block">Gets the time in nanoseconds of the current event.
Only useful for relative comparisons with other
Mouse events, as the absolute time has no defined
origin.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The time in nanoseconds of the current event</dd></dl>
</li>
</ul>
<a name="getX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getX</h4>
<pre>public static&nbsp;int&nbsp;getX()</pre>
<div class="block">Retrieves the absolute position. It will be clamped to
0...width-1.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Absolute x axis position of mouse</dd></dl>
</li>
</ul>
<a name="getY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getY</h4>
<pre>public static&nbsp;int&nbsp;getY()</pre>
<div class="block">Retrieves the absolute position. It will be clamped to
0...height-1.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Absolute y axis position of mouse</dd></dl>
</li>
</ul>
<a name="getDX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDX</h4>
<pre>public static&nbsp;int&nbsp;getDX()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Movement on the x axis since last time getDX() was called.</dd></dl>
</li>
</ul>
<a name="getDY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDY</h4>
<pre>public static&nbsp;int&nbsp;getDY()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Movement on the y axis since last time getDY() was called.</dd></dl>
</li>
</ul>
<a name="getDWheel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDWheel</h4>
<pre>public static&nbsp;int&nbsp;getDWheel()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Movement of the wheel since last time getDWheel() was called</dd></dl>
</li>
</ul>
<a name="getButtonCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getButtonCount</h4>
<pre>public static&nbsp;int&nbsp;getButtonCount()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of buttons on this mouse</dd></dl>
</li>
</ul>
<a name="hasWheel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasWheel</h4>
<pre>public static&nbsp;boolean&nbsp;hasWheel()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>Whether or not this mouse has wheel support</dd></dl>
</li>
</ul>
<a name="isGrabbed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isGrabbed</h4>
<pre>public static&nbsp;boolean&nbsp;isGrabbed()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>whether or not the mouse has grabbed the cursor</dd></dl>
</li>
</ul>
<a name="setGrabbed(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGrabbed</h4>
<pre>public static&nbsp;void&nbsp;setGrabbed(boolean&nbsp;grab)</pre>
<div class="block">Sets whether or not the mouse has grabbed the cursor
(and thus hidden). If grab is false, the getX() and getY()
will return delta movement in pixels clamped to the display
dimensions, from the center of the display.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>grab</code> - whether the mouse should be grabbed</dd></dl>
</li>
</ul>
<a name="updateCursor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateCursor</h4>
<pre>public static&nbsp;void&nbsp;updateCursor()</pre>
<div class="block">Updates the cursor, so that animation can be changed if needed.
This method is called automatically by the window on its update, and
shouldn't be called otherwise</div>
</li>
</ul>
<a name="isInsideWindow()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isInsideWindow</h4>
<pre>public static&nbsp;boolean&nbsp;isInsideWindow()</pre>
<div class="block">Retrieves whether or not the mouse cursor is within the bounds of the window.
If the mouse cursor was moved outside the display during a drag, then the result of calling
this method will be true until the button is released.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if mouse is inside display, false otherwise.</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/Mouse.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/lwjgl/input/Mouse.html" target="_top">Frames</a></li>
<li><a href="Mouse.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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><i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i></small></p>
</body>
</html>