473 lines
17 KiB
HTML
473 lines
17 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>Cursor (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="Cursor (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/Cursor.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/Controllers.html" title="class in org.lwjgl.input"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?org/lwjgl/input/Cursor.html" target="_top">Frames</a></li>
|
|
<li><a href="Cursor.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: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field_summary">Field</a> | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field_detail">Field</a> | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </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 Cursor" class="title">Class Cursor</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>org.lwjgl.input.Cursor</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">Cursor</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">A class representing a native cursor. Instances of this
|
|
class can be used with Mouse.setCursor(), if available.</div>
|
|
<dl><dt><span class="strong">Version:</span></dt>
|
|
<dd>$Revision$
|
|
$Id$</dd>
|
|
<dt><span class="strong">Author:</span></dt>
|
|
<dd>elias_naur <elias_naur@users.sourceforge.net></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"> </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/Cursor.html#CURSOR_8_BIT_ALPHA">CURSOR_8_BIT_ALPHA</a></strong></code>
|
|
<div class="block">8 bit alhpa native cursor</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#CURSOR_ANIMATION">CURSOR_ANIMATION</a></strong></code>
|
|
<div class="block">animation native cursor</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#CURSOR_ONE_BIT_TRANSPARENCY">CURSOR_ONE_BIT_TRANSPARENCY</a></strong></code>
|
|
<div class="block">1 bit transparency for native cursor</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#Cursor(int, int, int, int, int, java.nio.IntBuffer, java.nio.IntBuffer)">Cursor</a></strong>(int width,
|
|
int height,
|
|
int xHotspot,
|
|
int yHotspot,
|
|
int numImages,
|
|
java.nio.IntBuffer images,
|
|
java.nio.IntBuffer delays)</code>
|
|
<div class="block">Constructs a new Cursor, with the given parameters.</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"> </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="../../../org/lwjgl/input/Cursor.html#destroy()">destroy</a></strong>()</code>
|
|
<div class="block">Destroy the native cursor.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#getCapabilities()">getCapabilities</a></strong>()</code>
|
|
<div class="block">Get the capabilities of the native cursor.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#getMaxCursorSize()">getMaxCursorSize</a></strong>()</code>
|
|
<div class="block">Gets the maximum size of a native cursor.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#getMinCursorSize()">getMinCursorSize</a></strong>()</code>
|
|
<div class="block">Gets the minimum size of a native cursor.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#hasTimedOut()">hasTimedOut</a></strong>()</code>
|
|
<div class="block">Determines whether this cursor has timed out</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#nextCursor()">nextCursor</a></strong>()</code>
|
|
<div class="block">Changes to the next cursor</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../org/lwjgl/input/Cursor.html#setTimeout()">setTimeout</a></strong>()</code>
|
|
<div class="block">Sets the timout property to the time it should be changed</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 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="CURSOR_ONE_BIT_TRANSPARENCY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CURSOR_ONE_BIT_TRANSPARENCY</h4>
|
|
<pre>public static final int CURSOR_ONE_BIT_TRANSPARENCY</pre>
|
|
<div class="block">1 bit transparency for native cursor</div>
|
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.lwjgl.input.Cursor.CURSOR_ONE_BIT_TRANSPARENCY">Constant Field Values</a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="CURSOR_8_BIT_ALPHA">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>CURSOR_8_BIT_ALPHA</h4>
|
|
<pre>public static final int CURSOR_8_BIT_ALPHA</pre>
|
|
<div class="block">8 bit alhpa native cursor</div>
|
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.lwjgl.input.Cursor.CURSOR_8_BIT_ALPHA">Constant Field Values</a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="CURSOR_ANIMATION">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>CURSOR_ANIMATION</h4>
|
|
<pre>public static final int CURSOR_ANIMATION</pre>
|
|
<div class="block">animation native cursor</div>
|
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.lwjgl.input.Cursor.CURSOR_ANIMATION">Constant Field Values</a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Cursor(int, int, int, int, int, java.nio.IntBuffer, java.nio.IntBuffer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Cursor</h4>
|
|
<pre>public Cursor(int width,
|
|
int height,
|
|
int xHotspot,
|
|
int yHotspot,
|
|
int numImages,
|
|
java.nio.IntBuffer images,
|
|
java.nio.IntBuffer delays)
|
|
throws <a href="../../../org/lwjgl/LWJGLException.html" title="class in org.lwjgl">LWJGLException</a></pre>
|
|
<div class="block">Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create
|
|
Cursor objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported.
|
|
So to maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values.
|
|
The constructor will copy the images and delays, so there's no need to keep them around.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - cursor image width</dd><dd><code>height</code> - cursor image height</dd><dd><code>xHotspot</code> - the x coordinate of the cursor hotspot</dd><dd><code>yHotspot</code> - the y coordinate of the cursor hotspot</dd><dd><code>numImages</code> - number of cursor images specified. Must be 1 if animations are not supported.</dd><dd><code>images</code> - A buffer containing the images. The origin is at the lower left corner, like OpenGL.</dd><dd><code>delays</code> - An int buffer of animation frame delays, if numImages is greater than 1, else 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 created for any reason</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="getMinCursorSize()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMinCursorSize</h4>
|
|
<pre>public static int getMinCursorSize()</pre>
|
|
<div class="block">Gets the minimum size of a native cursor. Can only be called if
|
|
The Mouse is created and cursor caps includes at least
|
|
CURSOR_ONE_BIT_TRANSPARANCY.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the maximum size of a native cursor</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getMaxCursorSize()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMaxCursorSize</h4>
|
|
<pre>public static int getMaxCursorSize()</pre>
|
|
<div class="block">Gets the maximum size of a native cursor. Can only be called if
|
|
The Mouse is created and cursor caps includes at least
|
|
CURSOR_ONE_BIT_TRANSPARANCY.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the maximum size of a native cursor</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCapabilities()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCapabilities</h4>
|
|
<pre>public static int getCapabilities()</pre>
|
|
<div class="block">Get the capabilities of the native cursor. Return a bit mask of the native cursor capabilities.
|
|
The CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy,
|
|
the CURSOR_8_BIT_ALPHA indicates support for 8 bit alpha and CURSOR_ANIMATION indicates
|
|
support for cursor animations.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>A bit mask with native cursor capabilities.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="destroy()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>destroy</h4>
|
|
<pre>public void destroy()</pre>
|
|
<div class="block">Destroy the native cursor. If the cursor is current,
|
|
the current native cursor is set to null (the default
|
|
OS cursor)</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setTimeout()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setTimeout</h4>
|
|
<pre>protected void setTimeout()</pre>
|
|
<div class="block">Sets the timout property to the time it should be changed</div>
|
|
</li>
|
|
</ul>
|
|
<a name="hasTimedOut()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hasTimedOut</h4>
|
|
<pre>protected boolean hasTimedOut()</pre>
|
|
<div class="block">Determines whether this cursor has timed out</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the this cursor has timed out, false if not</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextCursor()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>nextCursor</h4>
|
|
<pre>protected void nextCursor()</pre>
|
|
<div class="block">Changes to the next cursor</div>
|
|
</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/Cursor.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/Controllers.html" title="class in org.lwjgl.input"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../org/lwjgl/input/Keyboard.html" title="class in org.lwjgl.input"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?org/lwjgl/input/Cursor.html" target="_top">Frames</a></li>
|
|
<li><a href="Cursor.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: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field_summary">Field</a> | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field_detail">Field</a> | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </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 © 2002-2009 lwjgl.org. All Rights Reserved.</i></small></p>
|
|
</body>
|
|
</html>
|