Files
Terrarum/lib/javadoc/lwjgl-javadoc/org/lwjgl/input/Mouse.html
Song Minjae 6b83e25c0b javadoc for LWJGL
Former-commit-id: c9c053368cf5b7bbaf7aa2aa1a986611c3dad698
Former-commit-id: a9835ae3c2b484bcb5b1ee6fa57504c406c61490
2016-12-26 12:00:28 +09:00

976 lines
33 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Tue Jul 28 10:50:04 BST 2015 -->
<TITLE>
Mouse (LWJGL API)
</TITLE>
<META NAME="date" CONTENT="2015-07-28">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Mouse (LWJGL API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mouse.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/lwjgl/input/Mouse.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Mouse.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.lwjgl.input</FONT>
<BR>
Class Mouse</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.lwjgl.input.Mouse</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Mouse</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
<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.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision$
$Id$</DD>
<DT><B>Author:</B></DT>
<DD>cix_foo <cix_foo@users.sourceforge.net>, elias_naur <elias_naur@users.sourceforge.net>, Brian Matzon <brian@matzon.dk></DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#EVENT_SIZE">EVENT_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal use - event size in bytes</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#create()">create</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Create" the mouse.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#destroy()">destroy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Destroy" the mouse.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getButtonCount()">getButtonCount</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getButtonIndex(java.lang.String)">getButtonIndex</A></B>(java.lang.String&nbsp;buttonName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get's a button's index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getButtonName(int)">getButtonName</A></B>(int&nbsp;button)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a button's name</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getDWheel()">getDWheel</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getDX()">getDX</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getDY()">getDY</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventButton()">getEventButton</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventButtonState()">getEventButtonState</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current events button state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventDWheel()">getEventDWheel</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventDX()">getEventDX</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventDY()">getEventDY</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventNanoseconds()">getEventNanoseconds</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the time in nanoseconds of the current event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventX()">getEventX</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getEventY()">getEventY</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getNativeCursor()">getNativeCursor</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the currently bound native cursor, if any.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getX()">getX</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the absolute position.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#getY()">getY</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the absolute position.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#hasWheel()">hasWheel</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#isButtonDown(int)">isButtonDown</A></B>(int&nbsp;button)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See if a particular mouse button is down.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#isClipMouseCoordinatesToWindow()">isClipMouseCoordinatesToWindow</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#isCreated()">isCreated</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#isGrabbed()">isGrabbed</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#isInsideWindow()">isInsideWindow</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves whether or not the mouse cursor is within the bounds of the window.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#next()">next</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the next mouse event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#poll()">poll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Polls the mouse for its current state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#setClipMouseCoordinatesToWindow(boolean)">setClipMouseCoordinatesToWindow</A></B>(boolean&nbsp;clip)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#setCursorPosition(int, int)">setCursorPosition</A></B>(int&nbsp;new_x,
int&nbsp;new_y)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the position of the cursor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#setGrabbed(boolean)">setGrabbed</A></B>(boolean&nbsp;grab)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether or not the mouse has grabbed the cursor
(and thus hidden).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#setNativeCursor(org.lwjgl.input.Cursor)">setNativeCursor</A></B>(<A HREF="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</A>&nbsp;cursor)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds a native cursor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/lwjgl/input/Mouse.html#updateCursor()">updateCursor</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the cursor, so that animation can be changed if needed.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="EVENT_SIZE"><!-- --></A><H3>
EVENT_SIZE</H3>
<PRE>
public static final int <B>EVENT_SIZE</B></PRE>
<DL>
<DD>Internal use - event size in bytes
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.lwjgl.input.Mouse.EVENT_SIZE">Constant Field Values</A></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getNativeCursor()"><!-- --></A><H3>
getNativeCursor</H3>
<PRE>
public static <A HREF="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</A> <B>getNativeCursor</B>()</PRE>
<DL>
<DD>Gets the currently bound native cursor, if any.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the currently bound native cursor, if any.</DL>
</DD>
</DL>
<HR>
<A NAME="setNativeCursor(org.lwjgl.input.Cursor)"><!-- --></A><H3>
setNativeCursor</H3>
<PRE>
public static <A HREF="../../../org/lwjgl/input/Cursor.html" title="class in org.lwjgl.input">Cursor</A> <B>setNativeCursor</B>(<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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cursor</CODE> - the native cursor object to bind. May be null.
<DT><B>Returns:</B><DD>The previous Cursor object set, or null.
<DT><B>Throws:</B>
<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</DL>
</DD>
</DL>
<HR>
<A NAME="isClipMouseCoordinatesToWindow()"><!-- --></A><H3>
isClipMouseCoordinatesToWindow</H3>
<PRE>
public static boolean <B>isClipMouseCoordinatesToWindow</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setClipMouseCoordinatesToWindow(boolean)"><!-- --></A><H3>
setClipMouseCoordinatesToWindow</H3>
<PRE>
public static void <B>setClipMouseCoordinatesToWindow</B>(boolean&nbsp;clip)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCursorPosition(int, int)"><!-- --></A><H3>
setCursorPosition</H3>
<PRE>
public static void <B>setCursorPosition</B>(int&nbsp;new_x,
int&nbsp;new_y)</PRE>
<DL>
<DD>Set the position of the cursor. If the cursor is not grabbed,
the native cursor is moved to the new position.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>new_x</CODE> - The x coordinate of the new cursor position in OpenGL coordinates relative
to the window origin.<DD><CODE>new_y</CODE> - The y coordinate of the new cursor position in OpenGL coordinates relative
to the window origin.</DL>
</DD>
</DL>
<HR>
<A NAME="create()"><!-- --></A><H3>
create</H3>
<PRE>
public static void <B>create</B>()
throws <A HREF="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</A></PRE>
<DL>
<DD>"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.
<P>
<DD><DL>
<DT><B>Throws:</B>
<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</DL>
</DD>
</DL>
<HR>
<A NAME="isCreated()"><!-- --></A><H3>
isCreated</H3>
<PRE>
public static boolean <B>isCreated</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>true if the mouse has been created</DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public static void <B>destroy</B>()</PRE>
<DL>
<DD>"Destroy" the mouse.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="poll()"><!-- --></A><H3>
poll</H3>
<PRE>
public static void <B>poll</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>See Also:</B><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></DL>
</DD>
</DL>
<HR>
<A NAME="isButtonDown(int)"><!-- --></A><H3>
isButtonDown</H3>
<PRE>
public static boolean <B>isButtonDown</B>(int&nbsp;button)</PRE>
<DL>
<DD>See if a particular mouse button is down.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>button</CODE> - The index of the button you wish to test (0..getButtonCount-1)
<DT><B>Returns:</B><DD>true if the specified button is down</DL>
</DD>
</DL>
<HR>
<A NAME="getButtonName(int)"><!-- --></A><H3>
getButtonName</H3>
<PRE>
public static java.lang.String <B>getButtonName</B>(int&nbsp;button)</PRE>
<DL>
<DD>Gets a button's name
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>button</CODE> - The button
<DT><B>Returns:</B><DD>a String with the button's human readable name in it or null if the button is unnamed</DL>
</DD>
</DL>
<HR>
<A NAME="getButtonIndex(java.lang.String)"><!-- --></A><H3>
getButtonIndex</H3>
<PRE>
public static int <B>getButtonIndex</B>(java.lang.String&nbsp;buttonName)</PRE>
<DL>
<DD>Get's a button's index. If the button is unrecognised then -1 is returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>buttonName</CODE> - The button name</DL>
</DD>
</DL>
<HR>
<A NAME="next()"><!-- --></A><H3>
next</H3>
<PRE>
public static boolean <B>next</B>()</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if a mouse event was read, false otherwise<DT><B>See Also:</B><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></DL>
</DD>
</DL>
<HR>
<A NAME="getEventButton()"><!-- --></A><H3>
getEventButton</H3>
<PRE>
public static int <B>getEventButton</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events button. Returns -1 if no button state was changed</DL>
</DD>
</DL>
<HR>
<A NAME="getEventButtonState()"><!-- --></A><H3>
getEventButtonState</H3>
<PRE>
public static boolean <B>getEventButtonState</B>()</PRE>
<DL>
<DD>Get the current events button state.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Current events button state.</DL>
</DD>
</DL>
<HR>
<A NAME="getEventDX()"><!-- --></A><H3>
getEventDX</H3>
<PRE>
public static int <B>getEventDX</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events delta x.</DL>
</DD>
</DL>
<HR>
<A NAME="getEventDY()"><!-- --></A><H3>
getEventDY</H3>
<PRE>
public static int <B>getEventDY</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events delta y.</DL>
</DD>
</DL>
<HR>
<A NAME="getEventX()"><!-- --></A><H3>
getEventX</H3>
<PRE>
public static int <B>getEventX</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events absolute x.</DL>
</DD>
</DL>
<HR>
<A NAME="getEventY()"><!-- --></A><H3>
getEventY</H3>
<PRE>
public static int <B>getEventY</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events absolute y.</DL>
</DD>
</DL>
<HR>
<A NAME="getEventDWheel()"><!-- --></A><H3>
getEventDWheel</H3>
<PRE>
public static int <B>getEventDWheel</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Current events delta z</DL>
</DD>
</DL>
<HR>
<A NAME="getEventNanoseconds()"><!-- --></A><H3>
getEventNanoseconds</H3>
<PRE>
public static long <B>getEventNanoseconds</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The time in nanoseconds of the current event</DL>
</DD>
</DL>
<HR>
<A NAME="getX()"><!-- --></A><H3>
getX</H3>
<PRE>
public static int <B>getX</B>()</PRE>
<DL>
<DD>Retrieves the absolute position. It will be clamped to
0...width-1.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Absolute x axis position of mouse</DL>
</DD>
</DL>
<HR>
<A NAME="getY()"><!-- --></A><H3>
getY</H3>
<PRE>
public static int <B>getY</B>()</PRE>
<DL>
<DD>Retrieves the absolute position. It will be clamped to
0...height-1.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Absolute y axis position of mouse</DL>
</DD>
</DL>
<HR>
<A NAME="getDX()"><!-- --></A><H3>
getDX</H3>
<PRE>
public static int <B>getDX</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Movement on the x axis since last time getDX() was called.</DL>
</DD>
</DL>
<HR>
<A NAME="getDY()"><!-- --></A><H3>
getDY</H3>
<PRE>
public static int <B>getDY</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Movement on the y axis since last time getDY() was called.</DL>
</DD>
</DL>
<HR>
<A NAME="getDWheel()"><!-- --></A><H3>
getDWheel</H3>
<PRE>
public static int <B>getDWheel</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Movement of the wheel since last time getDWheel() was called</DL>
</DD>
</DL>
<HR>
<A NAME="getButtonCount()"><!-- --></A><H3>
getButtonCount</H3>
<PRE>
public static int <B>getButtonCount</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Number of buttons on this mouse</DL>
</DD>
</DL>
<HR>
<A NAME="hasWheel()"><!-- --></A><H3>
hasWheel</H3>
<PRE>
public static boolean <B>hasWheel</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Whether or not this mouse has wheel support</DL>
</DD>
</DL>
<HR>
<A NAME="isGrabbed()"><!-- --></A><H3>
isGrabbed</H3>
<PRE>
public static boolean <B>isGrabbed</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>whether or not the mouse has grabbed the cursor</DL>
</DD>
</DL>
<HR>
<A NAME="setGrabbed(boolean)"><!-- --></A><H3>
setGrabbed</H3>
<PRE>
public static void <B>setGrabbed</B>(boolean&nbsp;grab)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>grab</CODE> - whether the mouse should be grabbed</DL>
</DD>
</DL>
<HR>
<A NAME="updateCursor()"><!-- --></A><H3>
updateCursor</H3>
<PRE>
public static void <B>updateCursor</B>()</PRE>
<DL>
<DD>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
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isInsideWindow()"><!-- --></A><H3>
isInsideWindow</H3>
<PRE>
public static boolean <B>isInsideWindow</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if mouse is inside display, false otherwise.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mouse.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/lwjgl/input/Mouse.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Mouse.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i>
</BODY>
</HTML>