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-30 15:49:20
|
Revision: 2619
http://svn.sourceforge.net/java-game-lib/?rev=2619&view=rev
Author: elias_naur
Date: 2006-10-30 07:49:02 -0800 (Mon, 30 Oct 2006)
Log Message:
-----------
Windows: Fix compiler warning
Modified Paths:
--------------
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-30 15:46:42 UTC (rev 2618)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-30 15:49:02 UTC (rev 2619)
@@ -61,5 +61,5 @@
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd(JNIEnv *env, jclass unused, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- return peer_info->u.hwnd;
+ return (intptr_t)peer_info->u.hwnd;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2006-10-30 15:47:06
|
Revision: 2618
http://svn.sourceforge.net/java-game-lib/?rev=2618&view=rev
Author: elias_naur
Date: 2006-10-30 07:46:42 -0800 (Mon, 30 Oct 2006)
Log Message:
-----------
Windows: Implemented AWTInputAdapter.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsPeerInfo.java
trunk/LWJGL/src/native/windows/context.h
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsAWTInput.java
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTInput.c
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/build.xml 2006-10-30 15:46:42 UTC (rev 2618)
@@ -508,6 +508,7 @@
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes">
+ <class name="org.lwjgl.opengl.WindowsAWTInput" />
<class name="org.lwjgl.opengl.WindowsKeyboard" />
<class name="org.lwjgl.opengl.WindowsDirectInput8" />
<class name="org.lwjgl.opengl.WindowsDirectInputDevice8" />
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsAWTInput.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsAWTInput.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsAWTInput.java 2006-10-30 15:46:42 UTC (rev 2618)
@@ -0,0 +1,150 @@
+/*
+ * 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.IntBuffer;
+import java.nio.ByteBuffer;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.LWJGLUtil;
+import org.lwjgl.BufferUtils;
+
+import java.awt.Cursor;
+import java.awt.Point;
+
+/**
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2586 $
+ * $Id: LinuxAWTGLCanvasPeerInfo.java 2586 2006-10-20 11:51:34Z elias_naur $
+ */
+final class WindowsAWTInput extends AbstractAWTInput {
+ private final static int WS_CHILD = 0x40000000;
+ private final Cursor blank_cursor;
+ private Cursor cached_cursor;
+
+ private long cached_hwnd;
+ private WindowsMouse cached_mouse;
+ private boolean has_grabbed;
+
+ public WindowsAWTInput(AWTGLCanvas canvas) throws LWJGLException {
+ super(canvas);
+ int w = AWTUtil.getMinCursorSize();
+ int h = AWTUtil.getMinCursorSize();
+ blank_cursor = AWTUtil.createCursor(w, h, 0, 0, 1, BufferUtils.createIntBuffer(w*h), null);
+ }
+
+ public synchronized void destroy() {
+ super.destroy();
+ if (cached_mouse != null) {
+ grab(false);
+ cached_mouse.destroy();
+ }
+ }
+
+ public synchronized void processInput(PeerInfo peer_info) {
+ WindowsPeerInfo windows_peerinfo = (WindowsPeerInfo)peer_info;
+ long hwnd = windows_peerinfo.getHwnd();
+ try {
+ hwnd = findTopLevelWindow(hwnd);
+ if (cached_mouse == null || hwnd != cached_hwnd) {
+ has_grabbed = false;
+ cached_hwnd = hwnd;
+ if (cached_mouse != null)
+ cached_mouse.destroy();
+ cached_mouse = new WindowsMouse(WindowsDisplay.createDirectInput(), hwnd);
+ }
+ if (isGrabbed() && getCanvas().getCursor() != blank_cursor) {
+ cached_cursor = getCanvas().getCursor();
+ /**
+ * For some reason, DirectInput won't let us blank the cursor
+ * with the EXCLUSIVE access mode, so we'll work around it with a
+ * custom blank cursor
+ */
+ getCanvas().setCursor(blank_cursor);
+ }
+ grab(isGrabbed());
+ } catch (LWJGLException e) {
+ LWJGLUtil.log("Failed to create windows mouse: " + e);
+ }
+ }
+ private static native int getWindowStyles(long hwnd) throws LWJGLException;
+ private static native long getParentWindow(long hwnd);
+
+ private static long findTopLevelWindow(long hwnd) throws LWJGLException {
+ int window_styles = getWindowStyles(hwnd);
+ while ((window_styles & WS_CHILD) != 0) {
+ hwnd = getParentWindow(hwnd);
+ window_styles = getWindowStyles(hwnd);
+ }
+ return hwnd;
+ }
+
+ private void grab(boolean grab) {
+ if (has_grabbed != grab) {
+ cached_mouse.grab(grab);
+ has_grabbed = grab;
+ if (!grab)
+ getCanvas().setCursor(cached_cursor);
+ }
+ }
+
+ public synchronized void grabMouse(boolean grab) {
+ if (grab != isGrabbed()) {
+ super.grabMouse(grab);
+ /* Only ungrab since grabbing can only occur in processInput
+ * when the hwnd is guaranteed valid
+ */
+ if (cached_mouse != null && !grab)
+ grab(grab);
+ }
+ }
+
+ public void update() {
+ }
+
+ public synchronized void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) {
+ if (isGrabbed()) {
+ if (cached_mouse != null)
+ cached_mouse.poll(coord_buffer, buttons);
+ } else
+ super.pollMouse(coord_buffer, buttons);
+ }
+
+ public synchronized void readMouse(ByteBuffer buffer) {
+ if (isGrabbed()) {
+ if (cached_mouse != null)
+ cached_mouse.read(buffer);
+ } else
+ super.readMouse(buffer);
+ }
+}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java 2006-10-30 15:46:42 UTC (rev 2618)
@@ -66,7 +66,7 @@
}
public AWTCanvasInputImplementation createInput(AWTGLCanvas canvas) throws LWJGLException {
- throw new UnsupportedOperationException();
+ return new WindowsAWTInput(canvas);
}
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2006-10-30 15:46:42 UTC (rev 2618)
@@ -76,14 +76,14 @@
public void setDataFormat(int type) throws LWJGLException {
int ret = setDataFormat(di_device, type);
if (ret != WindowsDirectInput.DI_OK)
- throw new LWJGLException("Failed to set data format (" + ret + ")");
+ throw new LWJGLException("Failed to set data format (" + Integer.toHexString(ret) + ")");
}
protected abstract int setDataFormat(long di_device, int type);
public void setCooperateLevel(long hwnd, int flags) throws LWJGLException {
int ret = setCooperativeLevel(di_device, hwnd, flags);
if (ret != WindowsDirectInput.DI_OK)
- throw new LWJGLException("Failed to set cooperative level (" + ret + ")");
+ throw new LWJGLException("Failed to set cooperative level (" + Integer.toHexString(ret) + ")");
}
protected abstract int setCooperativeLevel(long di_device, long hwnd, int flags);
@@ -95,7 +95,7 @@
public void setBufferSize(int buffer_size) throws LWJGLException {
int ret = setBufferSize(di_device, buffer_size);
if (ret != WindowsDirectInput.DI_OK && ret != WindowsDirectInput.DI_PROPNOEFFECT && ret != WindowsDirectInput.DI_POLLEDDEVICE)
- throw new LWJGLException("Failed to set buffer size (" + ret + ")");
+ throw new LWJGLException("Failed to set buffer size (" + Integer.toHexString(ret) + ")");
int event_buffer_size = getEventSize()*buffer_size;
event_buffer = BufferUtils.createByteBuffer(event_buffer_size);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2006-10-30 15:46:42 UTC (rev 2618)
@@ -289,6 +289,7 @@
peer_info = new WindowsDisplayPeerInfo(pixel_format);
return peer_info;
}
+
public void update() {
nUpdate();
if (did_maximize) {
@@ -581,7 +582,7 @@
}
}
- private static WindowsDirectInput createDirectInput() throws LWJGLException {
+ static WindowsDirectInput createDirectInput() throws LWJGLException {
try {
return new WindowsDirectInput8(getDllInstance());
} catch (LWJGLException e) {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsPeerInfo.java 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsPeerInfo.java 2006-10-30 15:46:42 UTC (rev 2618)
@@ -52,4 +52,9 @@
nChoosePixelFormat(getHandle(), origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, support_window, support_pbuffer, double_buffered);
}
private static native void nChoosePixelFormat(ByteBuffer peer_info_handle, int origin_x, int origin_y, PixelFormat pixel_format, IntBuffer pixel_format_caps, boolean use_hdc_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException;
+
+ public final long getHwnd() {
+ return nGetHwnd(getHandle());
+ }
+ private static native long nGetHwnd(ByteBuffer handle);
}
Modified: trunk/LWJGL/src/native/windows/context.h
===================================================================
--- trunk/LWJGL/src/native/windows/context.h 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/native/windows/context.h 2006-10-30 15:46:42 UTC (rev 2618)
@@ -47,12 +47,15 @@
#include "extgl_wgl.h"
typedef struct {
- struct {
- HPBUFFERARB pbuffer;
- // Contains the function pointers that
- // created the pbuffer
- WGLExtensions extensions;
- } pbuffer;
+ union {
+ HWND hwnd;
+ struct {
+ HPBUFFERARB pbuffer;
+ // Contains the function pointers that
+ // created the pbuffer
+ WGLExtensions extensions;
+ } pbuffer;
+ } u;
HDC drawable_hdc;
} WindowsPeerInfo;
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-10-30 15:46:42 UTC (rev 2618)
@@ -169,23 +169,23 @@
throwException(env, "Could not get Pbuffer DC");
return;
}
- peer_info->pbuffer.extensions = extensions;
- peer_info->pbuffer.pbuffer = Pbuffer;
+ peer_info->u.pbuffer.extensions = extensions;
+ peer_info->u.pbuffer.pbuffer = Pbuffer;
peer_info->drawable_hdc = Pbuffer_dc;
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nDestroy
(JNIEnv *env, jclass clazz, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->pbuffer.extensions.wglReleasePbufferDCARB(peer_info->pbuffer.pbuffer, peer_info->drawable_hdc);
- peer_info->pbuffer.extensions.wglDestroyPbufferARB(peer_info->pbuffer.pbuffer);
+ peer_info->u.pbuffer.extensions.wglReleasePbufferDCARB(peer_info->u.pbuffer.pbuffer, peer_info->drawable_hdc);
+ peer_info->u.pbuffer.extensions.wglDestroyPbufferARB(peer_info->u.pbuffer.pbuffer);
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nIsBufferLost
(JNIEnv *env, jclass clazz, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
BOOL buffer_lost;
- peer_info->pbuffer.extensions.wglQueryPbufferARB(peer_info->pbuffer.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost);
+ peer_info->u.pbuffer.extensions.wglQueryPbufferARB(peer_info->u.pbuffer.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost);
return buffer_lost ? JNI_TRUE : JNI_FALSE;
}
@@ -198,17 +198,17 @@
attribs[1] = value;
attribs[2] = 0;
- peer_info->pbuffer.extensions.wglSetPbufferAttribARB(peer_info->pbuffer.pbuffer, attribs);
+ peer_info->u.pbuffer.extensions.wglSetPbufferAttribARB(peer_info->u.pbuffer.pbuffer, attribs);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nBindTexImageToPbuffer
(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->pbuffer.extensions.wglBindTexImageARB(peer_info->pbuffer.pbuffer, buffer);
+ peer_info->u.pbuffer.extensions.wglBindTexImageARB(peer_info->u.pbuffer.pbuffer, buffer);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nReleaseTexImageFromPbuffer
(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->pbuffer.extensions.wglReleaseTexImageARB(peer_info->pbuffer.pbuffer, buffer);
+ peer_info->u.pbuffer.extensions.wglReleaseTexImageARB(peer_info->u.pbuffer.pbuffer, buffer);
}
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c 2006-10-30 15:46:42 UTC (rev 2618)
@@ -51,4 +51,5 @@
AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle);
JAWT_Win32DrawingSurfaceInfo *win32_dsi = (JAWT_Win32DrawingSurfaceInfo *)surface->dsi->platformInfo;
peer_info->drawable_hdc = win32_dsi->hdc;
+ peer_info->u.hwnd = win32_dsi->hwnd;
}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTInput.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTInput.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTInput.c 2006-10-30 15:46:42 UTC (rev 2618)
@@ -0,0 +1,57 @@
+/*
+ * 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_WindowsAWTGLCanvasPeerInfo.c 2575 2006-09-19 14:17:13Z elias_naur $
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2575 $
+ */
+
+#include <jni.h>
+#include "context.h"
+#include "org_lwjgl_opengl_WindowsAWTInput.h"
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsAWTInput_getWindowStyles(JNIEnv *env, jclass unused, jlong hwnd_ptr) {
+ HWND hwnd = (HWND)(intptr_t)hwnd_ptr;
+ WINDOWINFO window_info;
+ if (!GetWindowInfo(hwnd, &window_info)) {
+ throwFormattedException(env, "Failed to get window info (%d).", GetLastError());
+ return 0;
+ }
+ return window_info.dwStyle;
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsAWTInput_getParentWindow(JNIEnv *env, jclass unused, jlong hwnd_ptr) {
+ HWND hwnd = (HWND)(intptr_t)hwnd_ptr;
+ return (intptr_t)GetParent(hwnd);
+}
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c 2006-10-30 15:46:42 UTC (rev 2618)
@@ -47,4 +47,5 @@
(JNIEnv *env, jclass clazz, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
peer_info->drawable_hdc = getCurrentHDC();
+ peer_info->u.hwnd = getCurrentHWND();
}
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-28 22:06:24 UTC (rev 2617)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c 2006-10-30 15:46:42 UTC (rev 2618)
@@ -58,3 +58,8 @@
// Let it throw
applyPixelFormat(env, peer_info->drawable_hdc, pixel_format_id);
}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd(JNIEnv *env, jclass unused, jobject peer_info_handle) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ return peer_info->u.hwnd;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|