From fbcd19698b2867157709230123e39822301b3670 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 18 Jan 2005 12:34:36 +0000 Subject: [PATCH] Moved Mouse.getNativeCursorCaps() to Cursor.getCapabilities() Renamed Pbuffer.getPbufferCaps() to Pbuffer.getCapabilities() --- src/java/org/lwjgl/input/Cursor.java | 47 ++++++++++++++++++- src/java/org/lwjgl/input/Mouse.java | 46 +----------------- .../lwjgl/opengl/DisplayImplementation.java | 44 ++++++++--------- src/java/org/lwjgl/opengl/LinuxDisplay.java | 12 ++--- src/java/org/lwjgl/opengl/MacOSXDisplay.java | 4 +- src/java/org/lwjgl/opengl/Pbuffer.java | 6 +-- src/java/org/lwjgl/opengl/Win32Display.java | 8 +++- .../org/lwjgl/test/input/HWCursorTest.java | 2 +- .../org/lwjgl/test/opengl/PbufferTest.java | 2 +- .../test/opengl/pbuffers/PbufferTest.java | 2 +- src/native/linux/org_lwjgl_input_Cursor.c | 34 ++++++++++++++ src/native/linux/org_lwjgl_input_Mouse.c | 34 -------------- src/native/linux/org_lwjgl_opengl_Pbuffer.c | 2 +- src/native/win32/org_lwjgl_input_Cursor.c | 13 +++++ src/native/win32/org_lwjgl_input_Mouse.c | 18 ------- src/native/win32/org_lwjgl_opengl_Pbuffer.c | 2 +- 16 files changed, 138 insertions(+), 138 deletions(-) diff --git a/src/java/org/lwjgl/input/Cursor.java b/src/java/org/lwjgl/input/Cursor.java index e7f3a9ea..201d3272 100644 --- a/src/java/org/lwjgl/input/Cursor.java +++ b/src/java/org/lwjgl/input/Cursor.java @@ -50,6 +50,15 @@ import org.lwjgl.opengl.Display; */ public class Cursor { + /** 1 bit transparency for native cursor */ + public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; + + /** 8 bit alhpa native cursor */ + public static final int CURSOR_8_BIT_ALPHA = 2; + + /** animation native cursor */ + public static final int CURSOR_ANIMATION = 4; + /** First element to display */ private final CursorElement[] cursors; @@ -72,6 +81,8 @@ public class Cursor { * @throws LWJGLException if the cursor could not be created for any reason */ public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + if ((getCapabilities() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) + throw new IllegalStateException("Native cursors not supported"); BufferChecks.checkBuffer(images, width*height*numImages); if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); @@ -92,7 +103,41 @@ public class Cursor { // create cursor (or cursors if multiple images supplied) cursors = createCursors(width, height, xHotspot, yHotspot, numImages, images, delays); } - + + /** + * 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. + * + * @return the maximum size of a native cursor + */ + public static int getMinCursorSize() { + return Display.getImplementation().getMinCursorSize(); + } + + /** + * 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. + * + * @return the maximum size of a native cursor + */ + public static int getMaxCursorSize() { + return Display.getImplementation().getMaxCursorSize(); + } + + /** + * 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. + * + * @return A bit mask with native cursor capabilities. + */ + public static int getCapabilities() { + return Display.getImplementation().getNativeCursorCapabilities(); + } + /** * Creates the actual cursor, using a platform specific class */ diff --git a/src/java/org/lwjgl/input/Mouse.java b/src/java/org/lwjgl/input/Mouse.java index 2d93b945..440c0772 100644 --- a/src/java/org/lwjgl/input/Mouse.java +++ b/src/java/org/lwjgl/input/Mouse.java @@ -58,16 +58,6 @@ import org.lwjgl.opengl.Display; * @version $Revision$ */ public class Mouse { - - /** 1 bit transparency for native cursor */ - public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; - - /** 8 bit alhpa native cursor */ - public static final int CURSOR_8_BIT_ALPHA = 2; - - /** animation native cursor */ - public static final int CURSOR_ANIMATION = 4; - /** Mouse constraint */ private static int width, height; @@ -155,18 +145,6 @@ public class Mouse { return currentCursor; } - /** - * 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. - * - * @return A bit mask with native cursor capabilities. - */ - public static int getNativeCursorCaps() { - return Display.getImplementation().getNativeCursorCaps(); - } - /** * Binds a native cursor. If the cursor argument is null, the * native cursor is disabled, as if native cursors were not supported. @@ -183,7 +161,7 @@ public class Mouse { * @throws LWJGLException if the cursor could not be set for any reason */ public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { - if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) + if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) == 0) throw new IllegalStateException("Mouse doesn't support native cursors"); Cursor oldCursor = currentCursor; currentCursor = cursor; @@ -198,28 +176,6 @@ public class Mouse { return oldCursor; } - /** - * 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. - * - * @return the maximum size of a native cursor - */ - public static int getMinCursorSize() { - return Display.getImplementation().getMinCursorSize(); - } - - /** - * 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. - * - * @return the maximum size of a native cursor - */ - public static int getMaxCursorSize() { - return Display.getImplementation().getMaxCursorSize(); - } - /** * Static initialization */ diff --git a/src/java/org/lwjgl/opengl/DisplayImplementation.java b/src/java/org/lwjgl/opengl/DisplayImplementation.java index 7d7098d0..87a45616 100644 --- a/src/java/org/lwjgl/opengl/DisplayImplementation.java +++ b/src/java/org/lwjgl/opengl/DisplayImplementation.java @@ -66,7 +66,7 @@ public interface DisplayImplementation { int getGammaRampLength(); /** - * Native method to set the gamma ramp. + * Method to set the gamma ramp. */ void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; @@ -90,7 +90,7 @@ public interface DisplayImplementation { DisplayMode init(); /** - * Native implementation of setTitle(). This will read the window's title member + * Implementation of setTitle(). This will read the window's title member * and stash it in the native title of the window. */ void setTitle(String title); @@ -131,41 +131,41 @@ public interface DisplayImplementation { void reshape(int x, int y, int width, int height); /** - * Native method for getting displaymodes + * Method for getting displaymodes */ DisplayMode[] getAvailableDisplayModes(); /* * Mouse methods */ - /** Native query of wheel support */ + /** Query of wheel support */ boolean hasWheel(); - /** Native query of button count */ + /** Query of button count */ int getButtonCount(); /** - * Native method to create the mouse. + * Method to create the mouse. */ void createMouse(); /** - * Native method the destroy the mouse + * Method the destroy the mouse */ void destroyMouse(); /** - * Native method to poll the mouse + * Method to poll the mouse */ void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); /** - * Native method to enable the buffer + * Method to enable the buffer */ void enableMouseBuffer() throws LWJGLException; /** - * Native method to read the keyboard buffer + * Method to read the keyboard buffer * * @return the total number of events read. */ @@ -175,17 +175,17 @@ public interface DisplayImplementation { void grabMouse(boolean grab); /** - * Native function to determine native cursor support + * Function to determine native cursor support */ - int getNativeCursorCaps(); + int getNativeCursorCapabilities(); - /** Native method to set the native cursor */ + /** Method to set the native cursor */ void setNativeCursor(Object handle) throws LWJGLException; - /** Native method returning the minimum cursor size */ + /** Method returning the minimum cursor size */ int getMinCursorSize(); - /** Native method returning the maximum cursor size */ + /** Method returning the maximum cursor size */ int getMaxCursorSize(); /* @@ -193,17 +193,17 @@ public interface DisplayImplementation { */ /** - * Native method to create the keyboard + * Method to create the keyboard */ void createKeyboard() throws LWJGLException; /** - * Native method to destroy the keyboard + * Method to destroy the keyboard */ void destroyKeyboard(); /** - * Native method to poll the keyboard. + * Method to poll the keyboard. * * @param keyDownBuffer the address of a 256-byte buffer to place * key states in. @@ -211,18 +211,18 @@ public interface DisplayImplementation { void pollKeyboard(ByteBuffer keyDownBuffer); /** - * Native method to read the keyboard buffer + * Method to read the keyboard buffer * @return the total number of events read. */ int readKeyboard(IntBuffer buffer, int buffer_position); /** - * Native method to enable the translation buffer + * Method to enable the translation buffer */ void enableTranslation() throws LWJGLException; /** - * Native method to enable the buffer + * Method to enable the buffer */ void enableKeyboardBuffer() throws LWJGLException; @@ -234,7 +234,7 @@ public interface DisplayImplementation { void destroyCursor(Object cursor_handle); /* Pbuffer */ - int getPbufferCaps(); + int getPbufferCapabilities(); /** * Method to test for buffer integrity diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index 3337241a..d19b30a9 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -269,13 +269,13 @@ final class LinuxDisplay implements DisplayImplementation { } public native void nGrabMouse(boolean grab); - public int getNativeCursorCaps() { + public int getNativeCursorCapabilities() { lockAWT(); - int caps = nGetNativeCursorCaps(); + int caps = nGetNativeCursorCapabilities(); unlockAWT(); return caps; } - public native int nGetNativeCursorCaps(); + public native int nGetNativeCursorCapabilities(); public void setNativeCursor(Object handle) throws LWJGLException { lockAWT(); @@ -365,13 +365,13 @@ final class LinuxDisplay implements DisplayImplementation { } public native void nDestroyCursor(Object cursorHandle); - public int getPbufferCaps() { + public int getPbufferCapabilities() { lockAWT(); - int caps = nGetPbufferCaps(); + int caps = nGetPbufferCapabilities(); unlockAWT(); return caps; } - public native int nGetPbufferCaps(); + public native int nGetPbufferCapabilities(); public boolean isBufferLost(ByteBuffer handle) { return false; diff --git a/src/java/org/lwjgl/opengl/MacOSXDisplay.java b/src/java/org/lwjgl/opengl/MacOSXDisplay.java index 2e740cae..a4800307 100644 --- a/src/java/org/lwjgl/opengl/MacOSXDisplay.java +++ b/src/java/org/lwjgl/opengl/MacOSXDisplay.java @@ -288,7 +288,7 @@ final class MacOSXDisplay implements DisplayImplementation { private native void nGrabMouse(boolean grab); - public int getNativeCursorCaps() { + public int getNativeCursorCapabilities() { /* int cursor_colors = Toolkit.getDefaultToolkit().getMaximumCursorColors(); boolean supported = cursor_colors >= Short.MAX_VALUE && getMaxCursorSize() > 0; @@ -373,7 +373,7 @@ final class MacOSXDisplay implements DisplayImplementation { public void destroyCursor(Object cursor_handle) { } - public int getPbufferCaps() { + public int getPbufferCapabilities() { return GL11.glGetString(GL11.GL_EXTENSIONS).indexOf("GL_APPLE_pixel_buffer") != -1 ? Pbuffer.PBUFFER_SUPPORTED : 0; } diff --git a/src/java/org/lwjgl/opengl/Pbuffer.java b/src/java/org/lwjgl/opengl/Pbuffer.java index 05ee00c1..2f8f009d 100644 --- a/src/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/java/org/lwjgl/opengl/Pbuffer.java @@ -175,7 +175,7 @@ public final class Pbuffer { * with the Display context (if created). */ public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Pbuffer shared_context) throws LWJGLException { - if ((getPbufferCaps() & PBUFFER_SUPPORTED) == 0) + if ((getCapabilities() & PBUFFER_SUPPORTED) == 0) throw new IllegalStateException("Pbuffers are not supported"); this.width = width; this.height = height; @@ -223,8 +223,8 @@ public final class Pbuffer { * * @return a bitmask of Pbuffer capabilities. */ - public static int getPbufferCaps() { - return Display.getImplementation().getPbufferCaps(); + public static int getCapabilities() { + return Display.getImplementation().getPbufferCapabilities(); } /** diff --git a/src/java/org/lwjgl/opengl/Win32Display.java b/src/java/org/lwjgl/opengl/Win32Display.java index dcfcd1db..a401a6f5 100644 --- a/src/java/org/lwjgl/opengl/Win32Display.java +++ b/src/java/org/lwjgl/opengl/Win32Display.java @@ -44,6 +44,7 @@ import java.nio.IntBuffer; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; +import org.lwjgl.input.Cursor; final class Win32Display implements DisplayImplementation { private static final int CURSOR_HANDLE_SIZE = 8; @@ -81,7 +82,10 @@ final class Win32Display implements DisplayImplementation { public native void enableMouseBuffer() throws LWJGLException; public native int readMouse(IntBuffer buffer, int buffer_position); public native void grabMouse(boolean grab); - public native int getNativeCursorCaps(); + public int getNativeCursorCapabilities() { + return Cursor.CURSOR_ONE_BIT_TRANSPARENCY; + } + public native void setNativeCursor(Object handle) throws LWJGLException; public native int getMinCursorSize(); public native int getMaxCursorSize(); @@ -104,7 +108,7 @@ final class Win32Display implements DisplayImplementation { } public native void destroyCursor(Object cursorHandle); - public native int getPbufferCaps(); + public native int getPbufferCapabilities(); public native boolean isBufferLost(ByteBuffer handle); public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; diff --git a/src/java/org/lwjgl/test/input/HWCursorTest.java b/src/java/org/lwjgl/test/input/HWCursorTest.java index 1fe40418..b8512d1d 100644 --- a/src/java/org/lwjgl/test/input/HWCursorTest.java +++ b/src/java/org/lwjgl/test/input/HWCursorTest.java @@ -114,7 +114,7 @@ public class HWCursorTest { } private static void initNativeCursors() throws Exception { - if ((Mouse.getNativeCursorCaps() & Mouse.CURSOR_ONE_BIT_TRANSPARENCY) == 0) { + if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) == 0) { System.out.println("No HW cursor support!"); System.exit(0); } diff --git a/src/java/org/lwjgl/test/opengl/PbufferTest.java b/src/java/org/lwjgl/test/opengl/PbufferTest.java index e1756b47..4541cea2 100644 --- a/src/java/org/lwjgl/test/opengl/PbufferTest.java +++ b/src/java/org/lwjgl/test/opengl/PbufferTest.java @@ -102,7 +102,7 @@ public class PbufferTest { // start of in windowed mode Display.create(); // gl = new GLWindow("Test", 50, 50, mode.width, mode.height, mode.bpp, 0, 0, 0); - if ((Pbuffer.getPbufferCaps() & Pbuffer.PBUFFER_SUPPORTED) == 0) { + if ((Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0) { System.out.println("No Pbuffer support!"); System.exit(1); } diff --git a/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java b/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java index ebefba1f..0aa6412c 100644 --- a/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java +++ b/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java @@ -114,7 +114,7 @@ public final class PbufferTest { glInit(); - if ( (Pbuffer.getPbufferCaps() & Pbuffer.PBUFFER_SUPPORTED) == 0 ) { + if ( (Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0 ) { System.out.println("No Pbuffer support!"); System.exit(-1); } diff --git a/src/native/linux/org_lwjgl_input_Cursor.c b/src/native/linux/org_lwjgl_input_Cursor.c index 853edb29..63f7b77c 100644 --- a/src/native/linux/org_lwjgl_input_Cursor.c +++ b/src/native/linux/org_lwjgl_input_Cursor.c @@ -47,6 +47,40 @@ #include "Window.h" #include "common_tools.h" +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCapabilities + (JNIEnv *env, jobject this) { + int caps = 0; + Display *disp = incDisplay(env); + if (disp == NULL) + return caps; + XcursorBool argb_supported = XcursorSupportsARGB(getDisplay()); + XcursorBool anim_supported = XcursorSupportsAnim(getDisplay()); + if (argb_supported) + caps |= org_lwjgl_input_Cursor_CURSOR_8_BIT_ALPHA | org_lwjgl_input_Cursor_CURSOR_ONE_BIT_TRANSPARENCY; + if (anim_supported) + caps |= org_lwjgl_input_Cursor_CURSOR_ANIMATION; + decDisplay(); + return caps; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMinCursorSize + (JNIEnv *env, jobject this) +{ + unsigned int width_return = 0; + unsigned int height_return = 0; + XQueryBestCursor(getDisplay(), getCurrentWindow(), 1, 1, &width_return, &height_return); + return width_return > height_return ? width_return : height_return; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMaxCursorSize + (JNIEnv *env, jobject this) +{ + unsigned int width_return = 0; + unsigned int height_return = 0; + XQueryBestCursor(getDisplay(), getCurrentWindow(), 0xffffffff, 0xffffffff, &width_return, &height_return); + return width_return > height_return ? height_return : width_return; +} + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateCursor (JNIEnv *env, jobject this, jobject handle_buffer, jint width, jint height, jint x_hotspot, jint y_hotspot, jint num_images, jobject image_buffer, jint images_offset, jobject delay_buffer, jint delays_offset) { diff --git a/src/native/linux/org_lwjgl_input_Mouse.c b/src/native/linux/org_lwjgl_input_Mouse.c index 9fd52e72..15eeab09 100644 --- a/src/native/linux/org_lwjgl_input_Mouse.c +++ b/src/native/linux/org_lwjgl_input_Mouse.c @@ -193,22 +193,6 @@ static void doWarpPointer(int center_x, int center_y) { XWarpPointer(getDisplay(), None, getCurrentWindow(), 0, 0, 0, 0, center_x, center_y); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCaps - (JNIEnv *env, jobject this) { - int caps = 0; - Display *disp = incDisplay(env); - if (disp == NULL) - return caps; - XcursorBool argb_supported = XcursorSupportsARGB(getDisplay()); - XcursorBool anim_supported = XcursorSupportsAnim(getDisplay()); - if (argb_supported) - caps |= org_lwjgl_input_Mouse_CURSOR_8_BIT_ALPHA | org_lwjgl_input_Mouse_CURSOR_ONE_BIT_TRANSPARENCY; - if (anim_supported) - caps |= org_lwjgl_input_Mouse_CURSOR_ANIMATION; - decDisplay(); - return caps; -} - JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetNativeCursor(JNIEnv *env, jobject this, jobject cursor_handle) { if (cursor_handle != NULL) { Cursor *cursor = (Cursor *)(*env)->GetDirectBufferAddress(env, cursor_handle); @@ -218,24 +202,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetNativeCursor(JNIEn updateCursor(); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMinCursorSize - (JNIEnv *env, jobject this) -{ - unsigned int width_return = 0; - unsigned int height_return = 0; - XQueryBestCursor(getDisplay(), getCurrentWindow(), 1, 1, &width_return, &height_return); - return width_return > height_return ? width_return : height_return; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMaxCursorSize - (JNIEnv *env, jobject this) -{ - unsigned int width_return = 0; - unsigned int height_return = 0; - XQueryBestCursor(getDisplay(), getCurrentWindow(), 0xffffffff, 0xffffffff, &width_return, &height_return); - return width_return > height_return ? height_return : width_return; -} - JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetButtonCount(JNIEnv *env, jobject this) { return NUM_BUTTONS; } diff --git a/src/native/linux/org_lwjgl_opengl_Pbuffer.c b/src/native/linux/org_lwjgl_opengl_Pbuffer.c index 59dee7c3..de3f8fe7 100644 --- a/src/native/linux/org_lwjgl_opengl_Pbuffer.c +++ b/src/native/linux/org_lwjgl_opengl_Pbuffer.c @@ -51,7 +51,7 @@ typedef struct _PbufferInfo { GLXContext context; } PbufferInfo; -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCaps +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCapabilities (JNIEnv *env, jobject this) { // Only support the GLX 1.3 Pbuffers and ignore the GLX_SGIX_pbuffer extension diff --git a/src/native/win32/org_lwjgl_input_Cursor.c b/src/native/win32/org_lwjgl_input_Cursor.c index daba968b..20c24159 100644 --- a/src/native/win32/org_lwjgl_input_Cursor.c +++ b/src/native/win32/org_lwjgl_input_Cursor.c @@ -44,6 +44,19 @@ #include "org_lwjgl_opengl_Win32Display.h" #include "common_tools.h" +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getMaxCursorSize + (JNIEnv *env, jobject self) +{ + return GetSystemMetrics(SM_CXCURSOR); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getMinCursorSize + (JNIEnv *env, jobject self) +{ + return GetSystemMetrics(SM_CXCURSOR); +} + + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_nCreateCursor (JNIEnv *env, jobject self, jobject handle_buffer, jint width, jint height, jint x_hotspot, jint y_hotspot, jint num_images, jobject image_buffer, jint images_offset, jobject delay_buffer, jint delays_offset) { diff --git a/src/native/win32/org_lwjgl_input_Mouse.c b/src/native/win32/org_lwjgl_input_Mouse.c index 189deec4..7361adc1 100644 --- a/src/native/win32/org_lwjgl_input_Mouse.c +++ b/src/native/win32/org_lwjgl_input_Mouse.c @@ -334,12 +334,6 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_readMouse return copyEvents(&event_queue, buffer_ptr, buffer_size); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getNativeCursorCaps - (JNIEnv *env, jobject self) -{ - return org_lwjgl_input_Mouse_CURSOR_ONE_BIT_TRANSPARENCY; -} - JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setNativeCursor (JNIEnv *env, jobject self, jobject handle_buffer) { @@ -356,18 +350,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setNativeCursor } } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getMaxCursorSize - (JNIEnv *env, jobject self) -{ - return GetSystemMetrics(SM_CXCURSOR); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getMinCursorSize - (JNIEnv *env, jobject self) -{ - return GetSystemMetrics(SM_CXCURSOR); -} - JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_destroyMouse(JNIEnv *env, jobject self) { ShutdownMouse(); } diff --git a/src/native/win32/org_lwjgl_opengl_Pbuffer.c b/src/native/win32/org_lwjgl_opengl_Pbuffer.c index 178ea056..48523db0 100644 --- a/src/native/win32/org_lwjgl_opengl_Pbuffer.c +++ b/src/native/win32/org_lwjgl_opengl_Pbuffer.c @@ -55,7 +55,7 @@ typedef struct _PbufferInfo { HDC Pbuffer_dc; } PbufferInfo; -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getPbufferCaps +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getPbufferCapabilities (JNIEnv *env, jobject self) { int caps = 0;