| Modifier and Type | Class and Description |
|---|---|
| private static class | Cursor.
A single cursor element, used when animating |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CURSOR_8_BIT_ALPHA
8 bit alhpa native cursor |
| public static final int | CURSOR_ANIMATION
animation native cursor |
| public static final int | CURSOR_ONE_BIT_TRANSPARENCY
1 bit transparency for native cursor |
| private final Cursor. | cursors
First element to display |
| private boolean | |
| private int | index
Index into list of cursors |
| Access | Constructor and Description |
|---|---|
| public | Cursor(int
cursor image width width, int cursor image height height, int the x coordinate of the cursor hotspot xHotspot, int the y coordinate of the cursor hotspot yHotspot, int number of cursor images specified. Must be 1 if animations are not supported. numImages, IntBuffer A buffer containing the images. The origin is at the lower left corner, like OpenGL. images, IntBuffer An int buffer of animation frame delays, if numImages is greater than 1, else null delays)Constructs a new Cursor, with the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static void | convertARGBtoABGR(IntBuffer
image to convert imageBuffer)Convert an IntBuffer image of ARGB format into ABGR |
| private static Cursor. | createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays)
Creates the actual cursor, using a platform specific class |
| public void | |
| private static void | |
| private static void | flipImages(int
Width of image width, int Height of images height, int How many images to flip numImages, IntBuffer Source images images, IntBuffer Destination images images_copy)Flips the images so they're oriented according to opengl |
| public static int | Returns: A bit mask with native cursor capabilities.Get the capabilities of the native cursor. |
| pack-priv Object | |
| public static int | Returns: the maximum size of a native cursorGets the maximum size of a native cursor. |
| public static int | Returns: the maximum size of a native cursorGets the minimum size of a native cursor. |
| protected boolean | Returns: true if the this cursor has timed out, false if notDetermines whether this cursor has timed out |
| protected void | |
| protected void |
| CURSOR_8_BIT_ALPHA | back to summary |
|---|---|
| public static final int CURSOR_8_BIT_ALPHA 8 bit alhpa native cursor | |
| CURSOR_ANIMATION | back to summary |
|---|---|
| public static final int CURSOR_ANIMATION animation native cursor | |
| CURSOR_ONE_BIT_TRANSPARENCY | back to summary |
|---|---|
| public static final int CURSOR_ONE_BIT_TRANSPARENCY 1 bit transparency for native cursor | |
| cursors | back to summary |
|---|---|
| private final Cursor. First element to display | |
| destroyed | back to summary |
|---|---|
| private boolean destroyed | |
| index | back to summary |
|---|---|
| private int index Index into list of cursors | |
| Cursor | back to summary |
|---|---|
| public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException 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.
| |
| checkValid | back to summary |
|---|---|
| private void checkValid() | |
| convertARGBtoABGR | back to summary |
|---|---|
| private static void convertARGBtoABGR(IntBuffer imageBuffer) Convert an IntBuffer image of ARGB format into ABGR
| |
| createCursors | back to summary |
|---|---|
| private static Cursor. Creates the actual cursor, using a platform specific class | |
| destroy | back to summary |
|---|---|
| public void destroy() Destroy the native cursor. If the cursor is current, the current native cursor is set to null (the default OS cursor) | |
| flipImage | back to summary |
|---|---|
| private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) | |
| flipImages | back to summary |
|---|---|
| private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) Flips the images so they're oriented according to opengl | |
| getCapabilities | back to summary |
|---|---|
| public static int getCapabilities() 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.
| |
| getHandle | back to summary |
|---|---|
| pack-priv Object getHandle() Gets the native handle associated with the cursor object. | |
| getMaxCursorSize | back to summary |
|---|---|
| public static int getMaxCursorSize() 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.
| |
| getMinCursorSize | back to summary |
|---|---|
| public static int getMinCursorSize() 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.
| |
| hasTimedOut | back to summary |
|---|---|
| protected boolean hasTimedOut() Determines whether this cursor has timed out
| |
| nextCursor | back to summary |
|---|---|
| protected void nextCursor() Changes to the next cursor | |
| setTimeout | back to summary |
|---|---|
| protected void setTimeout() Sets the timout property to the time it should be changed | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Object | cursorHandle
Handle to cursor |
| pack-priv final long | delay
How long a delay this element should have |
| pack-priv long | timeout
Absolute time this element times out |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| cursorHandle | back to summary |
|---|---|
| pack-priv final Object cursorHandle Handle to cursor | |
| delay | back to summary |
|---|---|
| pack-priv final long delay How long a delay this element should have | |
| timeout | back to summary |
|---|---|
| pack-priv long timeout Absolute time this element times out | |
| CursorElement | back to summary |
|---|---|
| pack-priv CursorElement(Object cursorHandle, long delay, long timeout) | |