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
|
2
|
3
|
4
|
5
|
6
|
7
|
|
8
(1) |
9
|
10
|
11
(3) |
12
|
13
|
14
|
|
15
|
16
|
17
|
18
|
19
|
20
(6) |
21
|
|
22
|
23
(8) |
24
(6) |
25
|
26
(10) |
27
(3) |
28
(1) |
|
29
|
30
(2) |
31
(1) |
|
|
|
|
|
From: <eli...@us...> - 2006-10-24 11:17:52
|
Revision: 2603
http://svn.sourceforge.net/java-game-lib/?rev=2603&view=rev
Author: elias_naur
Date: 2006-10-24 04:17:44 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Added locking to LinuxMouse
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:43:52 UTC (rev 2602)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 11:17:44 UTC (rev 2603)
@@ -80,7 +80,12 @@
public LinuxMouse(long display, long window) throws LWJGLException {
this.display = display;
this.window = window;
- this.warp_atom = LinuxDisplay.nInternAtom(display, "_LWJGL", false);
+ LinuxDisplay.lockAWT();
+ try {
+ this.warp_atom = LinuxDisplay.nInternAtom(display, "_LWJGL", false);
+ } finally {
+ LinuxDisplay.unlockAWT();
+ }
reset();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-24 10:43:58
|
Revision: 2602
http://svn.sourceforge.net/java-game-lib/?rev=2602&view=rev
Author: elias_naur
Date: 2006-10-24 03:43:52 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Moved warp Atom from LinuxDisplay to LinuxMouse
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 10:39:14 UTC (rev 2601)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 10:43:52 UTC (rev 2602)
@@ -89,7 +89,6 @@
private int current_displaymode_extension = NONE;
/** Atom used for the pointer warp messages */
- private long warp_atom;
private long delete_atom;
private PeerInfo peer_info;
@@ -461,10 +460,6 @@
}
private static native void nSwitchDisplayMode(long display, int screen, int extension, DisplayMode mode) throws LWJGLException;
- static long getWarpAtom() throws LWJGLException {
- return internAtom("_LWJGL", false);
- }
-
private static long internAtom(String atom_name, boolean only_if_exists) throws LWJGLException {
incDisplay();
try {
@@ -473,7 +468,7 @@
decDisplay();
}
}
- private static native long nInternAtom(long display, String atom_name, boolean only_if_exists);
+ static native long nInternAtom(long display, String atom_name, boolean only_if_exists);
public void resetDisplayMode() {
lockAWT();
@@ -555,7 +550,6 @@
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
- warp_atom = getWarpAtom();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
@@ -709,10 +703,10 @@
return mouse.getButtonCount();
}
- public void createMouse() {
+ public void createMouse() throws LWJGLException {
lockAWT();
try {
- mouse = new LinuxMouse(getDisplay(), getWindow(), warp_atom);
+ mouse = new LinuxMouse(getDisplay(), getWindow());
} finally {
unlockAWT();
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:39:14 UTC (rev 2601)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:43:52 UTC (rev 2602)
@@ -40,6 +40,7 @@
import java.nio.CharBuffer;
import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
import org.lwjgl.input.Mouse;
import java.nio.charset.CharsetDecoder;
@@ -76,10 +77,10 @@
private EventQueue event_queue;
private long last_event_nanos;
- public LinuxMouse(long display, long window, long warp_atom) {
+ public LinuxMouse(long display, long window) throws LWJGLException {
this.display = display;
this.window = window;
- this.warp_atom = warp_atom;
+ this.warp_atom = LinuxDisplay.nInternAtom(display, "_LWJGL", false);
reset();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-24 10:39:24
|
Revision: 2601
http://svn.sourceforge.net/java-game-lib/?rev=2601&view=rev
Author: elias_naur
Date: 2006-10-24 03:39:14 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Moved input event processing to LinuxKeyboard and LinuxMouse
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 09:59:00 UTC (rev 2600)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 10:39:14 UTC (rev 2601)
@@ -638,16 +638,13 @@
while (LinuxEvent.getPending(getDisplay()) > 0) {
event_buffer.nextEvent(getDisplay());
long event_window = event_buffer.getWindow();
- if (event_window != getWindow())
+ if (event_window != getWindow() || event_buffer.filterEvent(event_window) ||
+ (mouse != null && mouse.filterEvent(grab, shouldWarpPointer(), event_buffer)) ||
+ (keyboard != null && keyboard.filterEvent(event_buffer)))
continue;
- if (event_buffer.filterEvent(event_window))
- continue;
switch (event_buffer.getType()) {
case LinuxEvent.ClientMessage:
- if (event_buffer.getClientMessageType() == warp_atom) {
- if (mouse != null)
- mouse.handleWarpEvent(event_buffer.getClientData(0), event_buffer.getClientData(1));
- } else if ((event_buffer.getClientFormat() == 32) && (event_buffer.getClientData(0) == delete_atom))
+ if ((event_buffer.getClientFormat() == 32) && (event_buffer.getClientData(0) == delete_atom))
close_requested = true;
break;
case LinuxEvent.MapNotify:
@@ -661,20 +658,6 @@
case LinuxEvent.Expose:
dirty = true;
break;
- case LinuxEvent.ButtonPress: /* Fall through */
- case LinuxEvent.ButtonRelease:
- if (mouse != null)
- mouse.handleButtonEvent(grab, event_buffer.getButtonTime(), event_buffer.getButtonType(), (byte)event_buffer.getButtonButton());
- break;
- case LinuxEvent.MotionNotify:
- if (mouse != null)
- mouse.handlePointerMotion(grab, shouldWarpPointer(), event_buffer.getButtonTime(), event_buffer.getButtonRoot(), event_buffer.getButtonXRoot(), event_buffer.getButtonYRoot(), event_buffer.getButtonX(), event_buffer.getButtonY());
- break;
- case LinuxEvent.KeyPress: /* Fall through */
- case LinuxEvent.KeyRelease:
- if (keyboard != null)
- keyboard.handleKeyEvent(event_buffer.getKeyAddress(), event_buffer.getKeyTime(), event_buffer.getKeyType(), event_buffer.getKeyKeyCode(), event_buffer.getKeyState());
- break;
default:
break;
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2006-10-24 09:59:00 UTC (rev 2600)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2006-10-24 10:39:14 UTC (rev 2601)
@@ -296,10 +296,22 @@
}
}
- public void handleKeyEvent(long event_ptr, long millis, int event_type, int event_keycode, int event_state) {
+ private void handleKeyEvent(long event_ptr, long millis, int event_type, int event_keycode, int event_state) {
int keycode = getKeycode(event_ptr, event_state);
byte key_state = getKeyState(event_type);
key_down_buffer[keycode] = key_state;
translateEvent(event_ptr, event_type, keycode, key_state, millis*1000000);
}
+
+ public boolean filterEvent(LinuxEvent event) {
+ switch (event.getType()) {
+ case LinuxEvent.KeyPress: /* Fall through */
+ case LinuxEvent.KeyRelease:
+ handleKeyEvent(event.getKeyAddress(), event.getKeyTime(), event.getKeyType(), event.getKeyKeyCode(), event.getKeyState());
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 09:59:00 UTC (rev 2600)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:39:14 UTC (rev 2601)
@@ -190,7 +190,7 @@
}
private static native void nWarpCursor(long display, long window, int x, int y);
- public void handlePointerMotion(boolean grab, boolean warp_pointer, long millis, long root_window, int x_root, int y_root, int x, int y) {
+ private void handlePointerMotion(boolean grab, boolean warp_pointer, long millis, long root_window, int x_root, int y_root, int x, int y) {
doHandlePointerMotion(grab, warp_pointer, root_window, x_root, y_root, x, y, millis*1000000);
}
@@ -239,7 +239,7 @@
}
}
- public void handleButtonEvent(boolean grab, long millis, int type, byte button) {
+ private void handleButtonEvent(boolean grab, long millis, int type, byte button) {
long nanos = millis*1000000;
switch (type) {
case ButtonRelease:
@@ -258,7 +258,28 @@
last_y = transformY(y);
}
- public void handleWarpEvent(int x, int y) {
+ private void handleWarpEvent(int x, int y) {
resetCursor(x, y);
}
+
+ public boolean filterEvent(boolean grab, boolean warp_pointer, LinuxEvent event) {
+ switch (event.getType()) {
+ case LinuxEvent.ClientMessage:
+ if (event.getClientMessageType() == warp_atom) {
+ handleWarpEvent(event.getClientData(0), event.getClientData(1));
+ return true;
+ }
+ break;
+ case LinuxEvent.ButtonPress: /* Fall through */
+ case LinuxEvent.ButtonRelease:
+ handleButtonEvent(grab, event.getButtonTime(), event.getButtonType(), (byte)event.getButtonButton());
+ return true;
+ case LinuxEvent.MotionNotify:
+ handlePointerMotion(grab, warp_pointer, event.getButtonTime(), event.getButtonRoot(), event.getButtonXRoot(), event.getButtonYRoot(), event.getButtonX(), event.getButtonY());
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-24 09:59:12
|
Revision: 2600
http://svn.sourceforge.net/java-game-lib/?rev=2600&view=rev
Author: elias_naur
Date: 2006-10-24 02:59:00 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Removed redundant methods from LinuxDisplay.java
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 09:52:12 UTC (rev 2599)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 09:59:00 UTC (rev 2600)
@@ -645,29 +645,35 @@
switch (event_buffer.getType()) {
case LinuxEvent.ClientMessage:
if (event_buffer.getClientMessageType() == warp_atom) {
- handleWarpEvent(event_buffer.getClientData(0), event_buffer.getClientData(1));
+ if (mouse != null)
+ mouse.handleWarpEvent(event_buffer.getClientData(0), event_buffer.getClientData(1));
} else if ((event_buffer.getClientFormat() == 32) && (event_buffer.getClientData(0) == delete_atom))
- handleCloseEvent();
+ close_requested = true;
break;
case LinuxEvent.MapNotify:
- handleMapNotifyEvent();
+ dirty = true;
+ minimized = false;
break;
case LinuxEvent.UnmapNotify:
- handleUnmapNotifyEvent();
+ dirty = true;
+ minimized = true;
break;
case LinuxEvent.Expose:
- handleExposeEvent();
+ dirty = true;
break;
case LinuxEvent.ButtonPress: /* Fall through */
case LinuxEvent.ButtonRelease:
- handleButtonEvent(event_buffer.getButtonTime(), event_buffer.getButtonType(), event_buffer.getButtonButton(), event_buffer.getButtonState());
+ if (mouse != null)
+ mouse.handleButtonEvent(grab, event_buffer.getButtonTime(), event_buffer.getButtonType(), (byte)event_buffer.getButtonButton());
break;
case LinuxEvent.MotionNotify:
- handlePointerMotionEvent(event_buffer.getButtonTime(), event_buffer.getButtonRoot(), event_buffer.getButtonXRoot(), event_buffer.getButtonYRoot(), event_buffer.getButtonX(), event_buffer.getButtonY(), event_buffer.getButtonState());
+ if (mouse != null)
+ mouse.handlePointerMotion(grab, shouldWarpPointer(), event_buffer.getButtonTime(), event_buffer.getButtonRoot(), event_buffer.getButtonXRoot(), event_buffer.getButtonYRoot(), event_buffer.getButtonX(), event_buffer.getButtonY());
break;
case LinuxEvent.KeyPress: /* Fall through */
case LinuxEvent.KeyRelease:
- handleKeyEvent(event_buffer.getKeyAddress(), event_buffer.getKeyTime(), event_buffer.getKeyType(), event_buffer.getKeyKeyCode(), event_buffer.getKeyState());
+ if (keyboard != null)
+ keyboard.handleKeyEvent(event_buffer.getKeyAddress(), event_buffer.getKeyTime(), event_buffer.getKeyType(), event_buffer.getKeyKeyCode(), event_buffer.getKeyState());
break;
default:
break;
@@ -1065,42 +1071,4 @@
}
private static native void nSetWindowIcon(long display, long window, ByteBuffer icon, int icons_size, int width, int height);
-
- private void handleButtonEvent(long millis, int type, int button, int state) {
- if (mouse != null)
- mouse.handleButtonEvent(grab, millis, type, (byte)button);
- }
-
- private void handleKeyEvent(long event_ptr, long millis, int type, int keycode, int state) {
- if (keyboard != null)
- keyboard.handleKeyEvent(event_ptr, millis, type, keycode, state);
- }
-
- private void handlePointerMotionEvent(long millis, long root_window, int x_root, int y_root, int x, int y, int state) {
- if (mouse != null)
- mouse.handlePointerMotion(grab, shouldWarpPointer(), millis, root_window, x_root, y_root, x, y);
- }
-
- private void handleWarpEvent(int x, int y) {
- if (mouse != null)
- mouse.handleWarpEvent(x, y);
- }
-
- private void handleExposeEvent() {
- dirty = true;
- }
-
- private void handleUnmapNotifyEvent() {
- dirty = true;
- minimized = true;
- }
-
- private void handleMapNotifyEvent() {
- dirty = true;
- minimized = false;
- }
-
- private void handleCloseEvent() {
- close_requested = true;
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-24 09:52:26
|
Revision: 2599
http://svn.sourceforge.net/java-game-lib/?rev=2599&view=rev
Author: elias_naur
Date: 2006-10-24 02:52:12 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Moved more event handling logic to java
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2006-10-24 08:33:09 UTC (rev 2598)
+++ trunk/LWJGL/build.xml 2006-10-24 09:52:12 UTC (rev 2599)
@@ -494,6 +494,7 @@
<target name="headers" description="invokes javah on java classes" depends="compile">
<!-- platform specific classes -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes">
+ <class name="org.lwjgl.opengl.LinuxEvent" />
<class name="org.lwjgl.opengl.LinuxMouse" />
<class name="org.lwjgl.opengl.LinuxKeyboard" />
<class name="org.lwjgl.opengl.LinuxDisplay" />
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 08:33:09 UTC (rev 2598)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 09:52:12 UTC (rev 2599)
@@ -82,11 +82,15 @@
private static int display_connection_usage_count = 0;
+ /** Event buffer */
+ private final LinuxEvent event_buffer = new LinuxEvent();
+
/** Current mode swithcing API */
private int current_displaymode_extension = NONE;
/** Atom used for the pointer warp messages */
private long warp_atom;
+ private long delete_atom;
private PeerInfo peer_info;
@@ -268,8 +272,8 @@
}
}
- private static native long openDisplay() throws LWJGLException;
- private static native void closeDisplay(long display);
+ static native long openDisplay() throws LWJGLException;
+ static native void closeDisplay(long display);
private int getWindowMode(boolean fullscreen) throws LWJGLException {
if (fullscreen) {
@@ -552,6 +556,7 @@
lockAWT();
try {
warp_atom = getWarpAtom();
+ delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
throw new LWJGLException("No display mode extension is available");
@@ -629,18 +634,56 @@
return peer_info;
}
+ private void processEvents() {
+ while (LinuxEvent.getPending(getDisplay()) > 0) {
+ event_buffer.nextEvent(getDisplay());
+ long event_window = event_buffer.getWindow();
+ if (event_window != getWindow())
+ continue;
+ if (event_buffer.filterEvent(event_window))
+ continue;
+ switch (event_buffer.getType()) {
+ case LinuxEvent.ClientMessage:
+ if (event_buffer.getClientMessageType() == warp_atom) {
+ handleWarpEvent(event_buffer.getClientData(0), event_buffer.getClientData(1));
+ } else if ((event_buffer.getClientFormat() == 32) && (event_buffer.getClientData(0) == delete_atom))
+ handleCloseEvent();
+ break;
+ case LinuxEvent.MapNotify:
+ handleMapNotifyEvent();
+ break;
+ case LinuxEvent.UnmapNotify:
+ handleUnmapNotifyEvent();
+ break;
+ case LinuxEvent.Expose:
+ handleExposeEvent();
+ break;
+ case LinuxEvent.ButtonPress: /* Fall through */
+ case LinuxEvent.ButtonRelease:
+ handleButtonEvent(event_buffer.getButtonTime(), event_buffer.getButtonType(), event_buffer.getButtonButton(), event_buffer.getButtonState());
+ break;
+ case LinuxEvent.MotionNotify:
+ handlePointerMotionEvent(event_buffer.getButtonTime(), event_buffer.getButtonRoot(), event_buffer.getButtonXRoot(), event_buffer.getButtonYRoot(), event_buffer.getButtonX(), event_buffer.getButtonY(), event_buffer.getButtonState());
+ break;
+ case LinuxEvent.KeyPress: /* Fall through */
+ case LinuxEvent.KeyRelease:
+ handleKeyEvent(event_buffer.getKeyAddress(), event_buffer.getKeyTime(), event_buffer.getKeyType(), event_buffer.getKeyKeyCode(), event_buffer.getKeyState());
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
public void update() {
lockAWT();
try {
- nUpdate(getDisplay(), getWindow(), warp_atom);
+ processEvents();
checkInput();
- } catch (LWJGLException e) {
- LWJGLUtil.log("Caught exception while processing messages: " + e);
} finally {
unlockAWT();
}
}
- private native void nUpdate(long display, long window, long warp_atom) throws LWJGLException;
public void reshape(int x, int y, int width, int height) {
lockAWT();
@@ -1023,7 +1066,6 @@
private static native void nSetWindowIcon(long display, long window, ByteBuffer icon, int icons_size, int width, int height);
- /* Callbacks from nUpdate() */
private void handleButtonEvent(long millis, int type, int button, int state) {
if (mouse != null)
mouse.handleButtonEvent(grab, millis, type, (byte)button);
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java 2006-10-24 09:52:12 UTC (rev 2599)
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Wrapper class for X11 events.
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2286 $
+ * $Id: LinuxPeerInfo.java 2286 2006-03-23 19:32:21Z matzon $
+ */
+final class LinuxEvent {
+ public final static int KeyPress = 2;
+ public final static int KeyRelease = 3;
+ public final static int ButtonPress = 4;
+ public final static int ButtonRelease = 5;
+ public final static int MotionNotify = 6;
+ public final static int UnmapNotify = 18;
+ public final static int MapNotify = 19;
+ public final static int Expose = 12;
+ public final static int ClientMessage = 33;
+
+ private final ByteBuffer event_buffer;
+
+ public LinuxEvent() {
+ this.event_buffer = createEventBuffer();
+ }
+ private static native ByteBuffer createEventBuffer();
+
+ public final static native int getPending(long display);
+
+ public final boolean filterEvent(long window) {
+ return nFilterEvent(event_buffer, window);
+ }
+ private static native boolean nFilterEvent(ByteBuffer event_buffer, long window);
+
+ public final void nextEvent(long display) {
+ nNextEvent(display, event_buffer);
+ }
+ private static native void nNextEvent(long display, ByteBuffer event_buffer);
+
+ public final int getType() {
+ return nGetType(event_buffer);
+ }
+ private static native int nGetType(ByteBuffer event_buffer);
+
+ public final long getWindow() {
+ return nGetWindow(event_buffer);
+ }
+ private static native long nGetWindow(ByteBuffer event_buffer);
+
+ /* ClientMessage methods */
+
+ public final long getClientMessageType() {
+ return nGetClientMessageType(event_buffer);
+ }
+ private static native long nGetClientMessageType(ByteBuffer event_buffer);
+
+ public final int getClientData(int index) {
+ return nGetClientData(event_buffer, index);
+ }
+ private static native int nGetClientData(ByteBuffer event_buffer, int index);
+
+ public final int getClientFormat() {
+ return nGetClientFormat(event_buffer);
+ }
+ private static native int nGetClientFormat(ByteBuffer event_buffer);
+
+ /* Button methods */
+
+ public final long getButtonTime() {
+ return nGetButtonTime(event_buffer);
+ }
+ private static native long nGetButtonTime(ByteBuffer event_buffer);
+
+ public final int getButtonState() {
+ return nGetButtonState(event_buffer);
+ }
+ private static native int nGetButtonState(ByteBuffer event_buffer);
+
+ public final int getButtonType() {
+ return nGetButtonType(event_buffer);
+ }
+ private static native int nGetButtonType(ByteBuffer event_buffer);
+
+ public final int getButtonButton() {
+ return nGetButtonButton(event_buffer);
+ }
+ private static native int nGetButtonButton(ByteBuffer event_buffer);
+
+ public final long getButtonRoot() {
+ return nGetButtonRoot(event_buffer);
+ }
+ private static native long nGetButtonRoot(ByteBuffer event_buffer);
+
+ public final int getButtonXRoot() {
+ return nGetButtonXRoot(event_buffer);
+ }
+ private static native int nGetButtonXRoot(ByteBuffer event_buffer);
+
+ public final int getButtonYRoot() {
+ return nGetButtonYRoot(event_buffer);
+ }
+ private static native int nGetButtonYRoot(ByteBuffer event_buffer);
+
+ public final int getButtonX() {
+ return nGetButtonX(event_buffer);
+ }
+ private static native int nGetButtonX(ByteBuffer event_buffer);
+
+ public final int getButtonY() {
+ return nGetButtonY(event_buffer);
+ }
+ private static native int nGetButtonY(ByteBuffer event_buffer);
+
+ /* Key methods */
+
+ public final long getKeyAddress() {
+ return nGetKeyAddress(event_buffer);
+ }
+ private static native int nGetKeyAddress(ByteBuffer event_buffer);
+
+ public final long getKeyTime() {
+ return nGetKeyTime(event_buffer);
+ }
+ private static native int nGetKeyTime(ByteBuffer event_buffer);
+
+ public final int getKeyType() {
+ return nGetKeyType(event_buffer);
+ }
+ private static native int nGetKeyType(ByteBuffer event_buffer);
+
+ public final int getKeyKeyCode() {
+ return nGetKeyKeyCode(event_buffer);
+ }
+ private static native int nGetKeyKeyCode(ByteBuffer event_buffer);
+
+ public final int getKeyState() {
+ return nGetKeyState(event_buffer);
+ }
+ private static native int nGetKeyState(ByteBuffer event_buffer);
+}
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2006-10-24 08:33:09 UTC (rev 2598)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2006-10-24 09:52:12 UTC (rev 2599)
@@ -69,7 +69,6 @@
static GLXWindow glx_window = None;
-static Atom delete_atom;
static Colormap cmap;
static int current_depth;
static Pixmap current_icon_pixmap;
@@ -158,73 +157,6 @@
return window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY;
}
-static void handleMessages(JNIEnv *env, jobject disp_obj, Display *disp, Window window, Atom warp_atom) {
- XEvent event;
- jclass disp_class = (*env)->GetObjectClass(env, disp_obj);
- if (disp_class == NULL)
- return;
- jmethodID handleKeyEvent_method = (*env)->GetMethodID(env, disp_class, "handleKeyEvent", "(JJIII)V");
- if (handleKeyEvent_method == NULL)
- return;
- jmethodID handleButtonEvent_method = (*env)->GetMethodID(env, disp_class, "handleButtonEvent", "(JIII)V");
- if (handleButtonEvent_method == NULL)
- return;
- jmethodID handlePointerMotionEvent_method = (*env)->GetMethodID(env, disp_class, "handlePointerMotionEvent", "(JJIIIII)V");
- if (handlePointerMotionEvent_method == NULL)
- return;
- jmethodID handleWarpEvent_method = (*env)->GetMethodID(env, disp_class, "handleWarpEvent", "(II)V");
- if (handleWarpEvent_method == NULL)
- return;
- jmethodID handleMapNotifyEvent_method = (*env)->GetMethodID(env, disp_class, "handleMapNotifyEvent", "()V");
- if (handleMapNotifyEvent_method == NULL)
- return;
- jmethodID handleUnmapNotifyEvent_method = (*env)->GetMethodID(env, disp_class, "handleUnmapNotifyEvent", "()V");
- if (handleUnmapNotifyEvent_method == NULL)
- return;
- jmethodID handleExposeEvent_method = (*env)->GetMethodID(env, disp_class, "handleExposeEvent", "()V");
- if (handleExposeEvent_method == NULL)
- return;
- jmethodID handleCloseEvent_method = (*env)->GetMethodID(env, disp_class, "handleCloseEvent", "()V");
- if (handleCloseEvent_method == NULL)
- return;
- while (!(*env)->ExceptionOccurred(env) && XPending(disp) > 0) {
- XNextEvent(disp, &event);
- if (XFilterEvent(&event, None) == True)
- continue;
- // Ignore events from old windows
- if (event.xany.window != window)
- continue;
- switch (event.type) {
- case ClientMessage:
- if (event.xclient.message_type == warp_atom) {
- (*env)->CallVoidMethod(env, disp_obj, handleWarpEvent_method, (jint)event.xclient.data.l[0], (jint)event.xclient.data.l[1]);
- } else if ((event.xclient.format == 32) && ((Atom)event.xclient.data.l[0] == delete_atom))
- (*env)->CallVoidMethod(env, disp_obj, handleCloseEvent_method);
- break;
- case MapNotify:
- (*env)->CallVoidMethod(env, disp_obj, handleMapNotifyEvent_method);
- break;
- case UnmapNotify:
- (*env)->CallVoidMethod(env, disp_obj, handleUnmapNotifyEvent_method);
- break;
- case Expose:
- (*env)->CallVoidMethod(env, disp_obj, handleExposeEvent_method);
- break;
- case ButtonPress: /* Fall through */
- case ButtonRelease:
- (*env)->CallVoidMethod(env, disp_obj, handleButtonEvent_method, (jlong)event.xbutton.time, (jint)event.xbutton.type, (jint)event.xbutton.button, (jint)event.xbutton.state);
- break;
- case MotionNotify:
- (*env)->CallVoidMethod(env, disp_obj, handlePointerMotionEvent_method, (jlong)event.xbutton.time, (jlong)event.xbutton.root, (jint)event.xbutton.x_root, (jint)event.xbutton.y_root, (jint)event.xbutton.x, (jint)event.xbutton.y, (jint)event.xbutton.state);
- break;
- case KeyPress:
- case KeyRelease:
- (*env)->CallVoidMethod(env, disp_obj, handleKeyEvent_method, (jlong)(intptr_t)&(event.xkey), (jlong)event.xkey.time, (jint)event.xkey.type, (jint)event.xkey.keycode, (jint)event.xkey.state);
- break;
- }
- }
-}
-
static void setWindowTitle(Display *disp, Window window, const char *title) {
XStoreName(disp, window, title);
}
@@ -356,7 +288,7 @@
size_hints->max_height = height;
XSetWMNormalHints(disp, win, size_hints);
XFree(size_hints);
- delete_atom = XInternAtom(disp, "WM_DELETE_WINDOW", False);
+ Atom delete_atom = XInternAtom(disp, "WM_DELETE_WINDOW", False);
XSetWMProtocols(disp, win, &delete_atom, 1);
if (window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_NETWM) {
Atom fullscreen_atom = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
@@ -373,13 +305,6 @@
return win;
}
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUpdate(JNIEnv *env, jobject disp_obj, jlong display, jlong window_ptr, jlong warp_atom_ptr) {
- Display *disp = (Display *)(intptr_t)display;
- Window window = (Window)window_ptr;
- Atom warp_atom = (Atom)warp_atom_ptr;
- handleMessages(env, disp_obj, disp, window, warp_atom);
-}
-
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y) {
Display *disp = (Display *)(intptr_t)display;
X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
Added: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c (rev 0)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c 2006-10-24 09:52:12 UTC (rev 2599)
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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_LinuxEvent.c 2598 2006-10-24 08:33:09Z elias_naur $
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2598 $
+ */
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <jni.h>
+#include "common_tools.h"
+#include "org_lwjgl_opengl_LinuxEvent.h"
+
+JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxEvent_createEventBuffer(JNIEnv *env, jclass unused) {
+ return newJavaManagedByteBuffer(env, sizeof(XEvent));
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_getPending(JNIEnv *env, jclass unused, jlong display_ptr) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ return XPending(disp);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxEvent_nFilterEvent(JNIEnv *env, jclass unused, jobject event_buffer, jlong window_ptr) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ Window window = (Window)window_ptr;
+ return XFilterEvent(event, window) == True ? JNI_TRUE : JNI_FALSE;
+}
+
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nNextEvent(JNIEnv *env, jclass unused, jlong display_ptr, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ XNextEvent(disp, event);
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetType(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->type;
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetWindow(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xany.window;
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientMessageType(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xclient.message_type;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientData(JNIEnv *env, jclass unused, jobject event_buffer, jint index) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xclient.data.l[index];
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientFormat(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xclient.format;
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonTime(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.time;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonState(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.state;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonType(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.type;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonButton(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.button;
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonRoot(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.root;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonXRoot(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.x_root;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonYRoot(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.y_root;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonX(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.x;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonY(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xbutton.y;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyAddress(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return (jlong)(intptr_t)&(event->xkey);
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyTime(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xkey.time;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyType(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xkey.type;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyKeyCode(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xkey.keycode;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyState(JNIEnv *env, jclass unused, jobject event_buffer) {
+ XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
+ return event->xkey.state;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-24 08:33:24
|
Revision: 2598
http://svn.sourceforge.net/java-game-lib/?rev=2598&view=rev
Author: elias_naur
Date: 2006-10-24 01:33:09 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Removed redundant include statements
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/display.c
trunk/LWJGL/src/native/linux/org_lwjgl_input_Cursor.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxMouse.c
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c
Modified: trunk/LWJGL/src/native/linux/display.c
===================================================================
--- trunk/LWJGL/src/native/linux/display.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/display.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -48,7 +48,6 @@
#include <stdlib.h>
#include <math.h>
#include "common_tools.h"
-#include "Window.h"
#include "org_lwjgl_opengl_LinuxDisplay.h"
#define NUM_XRANDR_RETRIES 5
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_input_Cursor.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_input_Cursor.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_input_Cursor.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -44,7 +44,6 @@
#include <X11/Xcursor/Xcursor.h>
#include "org_lwjgl_input_Cursor.h"
#include "org_lwjgl_opengl_LinuxDisplay.h"
-#include "Window.h"
#include "common_tools.h"
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCapabilities
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -51,7 +51,6 @@
#include "common_tools.h"
#include "extgl.h"
#include "extgl_glx.h"
-#include "Window.h"
#include "context.h"
#include "org_lwjgl_opengl_LinuxDisplay.h"
#include "org_lwjgl_opengl_LinuxDisplayPeerInfo.h"
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -44,7 +44,6 @@
#include "org_lwjgl_opengl_LinuxCanvasImplementation.h"
#include "extgl_glx.h"
#include "context.h"
-#include "Window.h"
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxCanvasImplementation_nFindVisualIDFromFormat
(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject pixel_format) {
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -45,7 +45,6 @@
#include "extgl_glx.h"
#include "context.h"
#include "common_tools.h"
-#include "Window.h"
typedef struct {
GLXExtensions extension_flags;
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -43,7 +43,6 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
-#include "Window.h"
#include "common_tools.h"
#include "org_lwjgl_opengl_LinuxKeyboard.h"
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxMouse.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxMouse.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxMouse.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -42,7 +42,6 @@
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#include "Window.h"
#include "common_tools.h"
#include "org_lwjgl_opengl_LinuxMouse.h"
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c 2006-10-23 20:40:48 UTC (rev 2597)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c 2006-10-24 08:33:09 UTC (rev 2598)
@@ -44,7 +44,6 @@
#include "org_lwjgl_opengl_Pbuffer.h"
#include "extgl.h"
#include "context.h"
-#include "Window.h"
#include "common_tools.h"
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCapabilities
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|