mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-02-07 08:15:12 +01:00
Removed Keyboard.isStateKeySet() - it is easily replaced by Toolkit.getLockingKeyState()
This commit is contained in:
parent
6e6bdb1fa0
commit
9f41ecaedb
|
|
@ -191,10 +191,10 @@ public class Keyboard {
|
|||
public static final int KEY_POWER = 0xDE;
|
||||
public static final int KEY_SLEEP = 0xDF;
|
||||
|
||||
public static final int STATE_ON = 0;
|
||||
/* public static final int STATE_ON = 0;
|
||||
public static final int STATE_OFF = 1;
|
||||
public static final int STATE_UNKNOWN = 2;
|
||||
|
||||
*/
|
||||
public static final int KEYBOARD_SIZE = 256;
|
||||
|
||||
/** Buffer size in events */
|
||||
|
|
@ -334,7 +334,6 @@ public class Keyboard {
|
|||
* character for that event.
|
||||
*
|
||||
* @see org.lwjgl.input.Keyboard#isKeyDown(int key)
|
||||
* @see org.lwjgl.input.Keyboard#isStateKeySet(int key)
|
||||
* @see org.lwjgl.input.Keyboard#next()
|
||||
* @see org.lwjgl.input.Keyboard#getEventKey()
|
||||
* @see org.lwjgl.input.Keyboard#getEventKeyState()
|
||||
|
|
@ -371,12 +370,12 @@ public class Keyboard {
|
|||
* @param key State key to test (KEY_CAPITAL | KEY_NUMLOCK | KEY_SYSRQ)
|
||||
* @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown
|
||||
*/
|
||||
public static int isStateKeySet(int key) {
|
||||
/* public static int isStateKeySet(int key) {
|
||||
if (!created)
|
||||
throw new IllegalStateException("Keyboard must be created before you can query key state");
|
||||
return Display.getImplementation().isStateKeySet(key);
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* Gets a key's name
|
||||
* @param key The key
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ public interface DisplayImplementation {
|
|||
*/
|
||||
int readKeyboard(IntBuffer buffer, int buffer_position);
|
||||
|
||||
int isStateKeySet(int key);
|
||||
// int isStateKeySet(int key);
|
||||
|
||||
/** Native cursor handles */
|
||||
Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException;
|
||||
|
|
|
|||
|
|
@ -625,10 +625,10 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
}
|
||||
private static native int nReadKeyboard(IntBuffer buffer, int buffer_position);
|
||||
|
||||
public int isStateKeySet(int key) {
|
||||
/* public int isStateKeySet(int key) {
|
||||
return Keyboard.STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
*/
|
||||
private static native ByteBuffer nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException;
|
||||
|
||||
public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException {
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ final class MacOSXDisplay implements DisplayImplementation {
|
|||
return keyboard_queue.copyEvents(buffer);
|
||||
}
|
||||
|
||||
public int isStateKeySet(int key) {
|
||||
/* public int isStateKeySet(int key) {
|
||||
int awt_key;
|
||||
switch (key) {
|
||||
case Keyboard.KEY_CAPITAL:
|
||||
|
|
@ -436,7 +436,7 @@ final class MacOSXDisplay implements DisplayImplementation {
|
|||
return Keyboard.STATE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/** Native cursor handles */
|
||||
public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException {
|
||||
BufferedImage cursor_image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ final class Win32Display implements DisplayImplementation {
|
|||
}
|
||||
private native int nReadKeyboard(IntBuffer buffer, int buffer_position);
|
||||
|
||||
public native int isStateKeySet(int key);
|
||||
// public native int isStateKeySet(int key);
|
||||
|
||||
public native ByteBuffer nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException;
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_nReadKeyboard
|
|||
return num_events;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_isStateKeySet(JNIEnv *env, jobject self, jint key)
|
||||
/*JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_isStateKeySet(JNIEnv *env, jobject self, jint key)
|
||||
{
|
||||
int state = org_lwjgl_input_Keyboard_STATE_UNKNOWN;
|
||||
switch(key) {
|
||||
|
|
@ -293,4 +293,4 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_isStateKeySet(JNIEnv *
|
|||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
}*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue