You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(3) |
2
|
3
(1) |
4
|
|
5
|
6
(5) |
7
(11) |
8
(7) |
9
|
10
(3) |
11
(12) |
|
12
|
13
(2) |
14
(7) |
15
(3) |
16
(3) |
17
|
18
|
|
19
|
20
(11) |
21
(5) |
22
(12) |
23
(10) |
24
(8) |
25
(4) |
|
26
(1) |
27
|
28
(13) |
29
(1) |
30
|
31
|
|
|
From: Elias N. <eli...@us...> - 2003-10-01 09:33:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv28625/src/java/org/lwjgl/opengl Modified Files: Window.java Added Files: MacOSX.java Log Message: Loading Mac OS X hack through reflection --- NEW FILE: MacOSX.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSX.java /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.opengl; /** * $Id: MacOSX.java,v 1.1 2003/10/01 09:33:22 elias_naur Exp $ * * Mac OS X specific hacks * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ class MacOSX { public static void initMacOSX() { java.awt.Toolkit.getDefaultToolkit(); new com.apple.eawt.Application().addApplicationListener(new com.apple.eawt.ApplicationAdapter() { public void handleQuit(com.apple.eawt.ApplicationEvent e) { e.setHandled(false); setQuitRequested(); } }); } private static native void setQuitRequested(); } Index: Window.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Window.java 29 Sep 2003 09:26:20 -0000 1.12 +++ Window.java 1 Oct 2003 09:33:22 -0000 1.13 @@ -25,6 +25,7 @@ import org.lwjgl.Sys; import java.util.HashSet; +import java.lang.reflect.Method; public final class Window { @@ -53,19 +54,19 @@ * I have posted a bug report to apple regarding the behaviour. * */ - if (Display.getPlatform() == Display.PLATFORM_AGL) { - java.awt.Toolkit.getDefaultToolkit(); - new com.apple.eawt.Application().addApplicationListener(new com.apple.eawt.ApplicationAdapter() { - public void handleQuit(com.apple.eawt.ApplicationEvent e) { - e.setHandled(false); - apple_quit = true; - } - }); - } + if (Display.getPlatform() == Display.PLATFORM_AGL) + initMacOSX(); } - /** Special quit boolean set from the apple version */ - private static boolean apple_quit; + private static void initMacOSX() { + try { + Class mac_class = Class.forName("org.lwjgl.opengl.MacOSX"); + Method init_method = mac_class.getMethod("initMacOSX", null); + init_method.invoke(null, null); + } catch (Exception e) { + e.printStackTrace(); + } + } /** Whether the window is currently created, ie. has a native peer */ private static boolean created; @@ -185,9 +186,7 @@ */ public static boolean isCloseRequested() { assert isCreated() : "Cannot determine state of uncreated window"; - boolean result = nIsCloseRequested() || apple_quit; - apple_quit = false; - return result; + return nIsCloseRequested(); } private static native boolean nIsCloseRequested(); @@ -342,7 +341,6 @@ throws Exception; private static void createWindow() throws Exception { - apple_quit = false; HashSet extensions = new HashSet(); nCreate(title, x, y, width, height, fullscreen, color, alpha, depth, stencil, extensions); GLCaps.determineAvailableExtensions(extensions); |
|
From: Elias N. <eli...@us...> - 2003-10-01 09:33:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv28625/src/native/macosx Modified Files: Makefile.am org_lwjgl_input_Keyboard.cpp org_lwjgl_opengl_Window.cpp tools.h Added Files: Window.h org_lwjgl_opengl_MacOSX.cpp org_lwjgl_opengl_MacOSX.h Log Message: Loading Mac OS X hack through reflection --- NEW FILE: Window.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Window.h /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: Window.h,v 1.1 2003/10/01 09:33:22 elias_naur Exp $ * * Include file to access public window features * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #ifndef _LWJGL_WINDOW_H_INCLUDED_ #define _LWJGL_WINDOW_H_INCLUDED_ #include <jni.h> extern void setQuitRequested(void); #endif /* _LWJGL_WINDOW_H_INCLUDED_ */ --- NEW FILE: org_lwjgl_opengl_MacOSX.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSX.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_opengl_MacOSX.cpp,v 1.1 2003/10/01 09:33:22 elias_naur Exp $ * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #include "Window.h" #include "org_lwjgl_opengl_MacOSX.h" JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSX_setQuitRequested(JNIEnv *, jclass) { setQuitRequested(); } --- NEW FILE: org_lwjgl_opengl_MacOSX.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSX.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_opengl_MacOSX */ #ifndef _Included_org_lwjgl_opengl_MacOSX #define _Included_org_lwjgl_opengl_MacOSX #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_opengl_MacOSX * Method: setQuitRequested * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSX_setQuitRequested (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 1 Oct 2003 09:02:52 -0000 1.6 +++ Makefile.am 1 Oct 2003 09:33:22 -0000 1.7 @@ -8,6 +8,7 @@ org_lwjgl_Sys.cpp \ # org_lwjgl_input_Controller.cpp \ org_lwjgl_input_Keyboard.cpp \ + org_lwjgl_opengl_MacOSX.cpp \ # org_lwjgl_input_Mouse.cpp \ # org_lwjgl_input_Cursor.cpp \ org_lwjgl_opengl_Window.cpp Index: org_lwjgl_input_Keyboard.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Keyboard.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Keyboard.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_input_Keyboard.cpp 1 Oct 2003 09:02:52 -0000 1.6 +++ org_lwjgl_input_Keyboard.cpp 1 Oct 2003 09:33:22 -0000 1.7 @@ -33,7 +33,7 @@ /** * $Id$ * - * Linux keyboard handling. + * Mac OS X keyboard handling. * * @author elias_naur <eli...@us...> * @version $Revision$ Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- org_lwjgl_opengl_Window.cpp 1 Oct 2003 09:02:52 -0000 1.10 +++ org_lwjgl_opengl_Window.cpp 1 Oct 2003 09:33:22 -0000 1.11 @@ -62,8 +62,12 @@ env->ReleaseStringUTFChars(title_obj, title); } -static pascal OSStatus doQuit(EventHandlerCallRef next_handler, EventRef event, void *user_data) { +void setQuitRequested(void) { close_requested = true; +} + +static pascal OSStatus doQuit(EventHandlerCallRef next_handler, EventRef event, void *user_data) { + setQuitRequested(); return noErr; } Index: tools.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/tools.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tools.h 1 Oct 2003 09:02:52 -0000 1.1 +++ tools.h 1 Oct 2003 09:33:22 -0000 1.2 @@ -3,6 +3,6 @@ #include <JavaVM/jni.h> -void throwException(JNIEnv* env, const char* msg); +extern void throwException(JNIEnv* env, const char* msg); #endif |
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv23786/macosx Modified Files: Makefile.am org_lwjgl_input_Keyboard.cpp org_lwjgl_opengl_Window.cpp Added Files: tools.cpp tools.h Removed Files: org_lwjgl_opengl_BaseGL.cpp Log Message: --- NEW FILE: tools.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/tools.cpp #include "tools.h" void throwException(JNIEnv* env, const char* msg) { jclass cls = env->FindClass("java/lang/Exception"); env->ThrowNew(cls, err); env->DeleteLocalRef(cls); } --- NEW FILE: tools.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/tools.h #ifndef TOOLS_H #define TOOLS_H #include <JavaVM/jni.h> void throwException(JNIEnv* env, const char* msg); #endif Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 26 Sep 2003 13:59:50 -0000 1.5 +++ Makefile.am 1 Oct 2003 09:02:52 -0000 1.6 @@ -7,7 +7,7 @@ org_lwjgl_Display.cpp \ org_lwjgl_Sys.cpp \ # org_lwjgl_input_Controller.cpp \ -# org_lwjgl_input_Keyboard.cpp \ + org_lwjgl_input_Keyboard.cpp \ # org_lwjgl_input_Mouse.cpp \ # org_lwjgl_input_Cursor.cpp \ org_lwjgl_opengl_Window.cpp Index: org_lwjgl_input_Keyboard.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Keyboard.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Keyboard.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_input_Keyboard.cpp 30 Sep 2003 10:52:05 -0000 1.5 +++ org_lwjgl_input_Keyboard.cpp 1 Oct 2003 09:02:52 -0000 1.6 @@ -39,6 +39,11 @@ * @version $Revision$ */ +#include <IOKit/IOKitLib.h> +#include <IOKit/hid/IOHIDKeys.h> +#include <CoreFoundation/CoreFoundation.h> +#include <stdlib.h> +#include "tools.h" #include "org_lwjgl_input_Keyboard.h" #define KEYBOARD_BUFFER_SIZE 50 @@ -55,6 +60,36 @@ { } +static void printCFString(CFStringRef str) { + CFIndex buffer_size = CFStringGetLength(str) + 1; + char * buffer = (char *)malloc(buffer_size); + if (buffer != NULL) { + if (CFStringGetCString(str, buffer, buffer_size, CFStringGetSystemEncoding())) + printf("%s", buffer); + free(buffer); + } +} + +static void printCFNumber(CFNumberRef num) { + long number; + + if (CFNumberGetValue(num, kCFNumberLongType, &number)) + printf("0x%lx (%ld)", number, number); +} + +static void printProperty(CFDictionaryRef dict, CFStringRef key) { + CFTypeRef val = CFDictionaryGetValue(dict, key); + if (val != NULL) { + CFTypeID type = CFGetTypeID(val); + if (type == CFArrayGetTypeID()) printf("array\n"); + else if (type == CFBooleanGetTypeID()) printf("boolean\n"); + else if (type == CFDictionaryGetTypeID()) printf("dictionary\n"); + else if (type == CFNumberGetTypeID()) printCFNumber((CFNumberRef)val); + else if (type == CFStringGetTypeID()) printCFString((CFStringRef)val); + else printf("<unknown object type>\n"); + } +} + /* * Class: org_lwjgl_input_Keyboard * Method: nCreate @@ -63,6 +98,31 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Keyboard_nCreate (JNIEnv * env, jclass clazz) { + io_iterator_t device_iterator; + io_object_t hid_device; + kern_return_t kern_err; + CFMutableDictionaryRef dev_props; + CFMutableDictionaryRef matching_dic = IOServiceMatching(kIOHIDDeviceKey); + IOReturn err = IOServiceGetMatchingServices(kIOMasterPortDefault, matching_dic, &device_iterator); + if (err != kIOReturnSuccess) { + throwException(env, "Could not find matching devices"); + return; + } + while ((hid_device = IOIteratorNext(device_iterator)) != NULL) { + kern_err = IORegistryEntryCreateCFProperties(hid_device, &dev_props, kCFAllocatorDefault, kNilOptions); + IOObjectRelease(hid_device); + if (kern_err == KERN_SUCCESS && dev_props != NULL) { + printf("Device found: "); + printProperty(dev_props, CFSTR(kIOHIDProductKey)); + printf(" usage "); + printProperty(dev_props, CFSTR(kIOHIDPrimaryUsageKey)); + printf(" usage page "); + printProperty(dev_props, CFSTR(kIOHIDPrimaryUsagePageKey)); + printf("\n"); + CFRelease(dev_props); + } + } + IOObjectRelease(device_iterator); } /* @@ -90,16 +150,17 @@ * Method: nRead * Signature: (I)V */ -JNIEXPORT int JNICALL Java_org_lwjgl_input_Keyboard_nRead +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Keyboard_nRead (JNIEnv * env, jclass clazz) { +} /* * Class: org_lwjgl_input_Keyboard * Method: nEnableTranslation * Signature: ()I */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Keyboard_nEnableTranslation +JNIEXPORT void JNICALL Java_org_lwjgl_input_Keyboard_nEnableTranslation (JNIEnv *env, jclass clazz) { } Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_opengl_Window.cpp 30 Sep 2003 10:52:05 -0000 1.9 +++ org_lwjgl_opengl_Window.cpp 1 Oct 2003 09:02:52 -0000 1.10 @@ -40,24 +40,14 @@ */ #include <Carbon/Carbon.h> -#include <JavaVM/jni.h> #include "org_lwjgl_opengl_Window.h" #include "extgl.h" +#include "tools.h" static WindowRef win_ref; static AGLContext context; static bool close_requested; -/* - * Utility function to throw an Exception - */ -static void throwException(JNIEnv * env, const char * err) -{ - jclass cls = env->FindClass("java/lang/Exception"); - env->ThrowNew(cls, err); - env->DeleteLocalRef(cls); -} - static void setWindowTitle(JNIEnv *env, jstring title_obj) { const char* title = env->GetStringUTFChars(title_obj, NULL); CFStringRef cf_title = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8); @@ -184,7 +174,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_update (JNIEnv *env, jclass clazz) { - RunApplicationEventLoop(); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_swapBuffers(JNIEnv * env, jclass clazz) --- org_lwjgl_opengl_BaseGL.cpp DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_BaseGL.cpp |